@sgpdirectory/mcp 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # @sgpdirectory/mcp
2
2
 
3
- Official local MCP (Model Context Protocol) wrapper for the `sgpdirectory` remote server. Singapore business directory: search entities, UENs, and SSIC industry classifications.
3
+ Official local MCP (Model Context Protocol) package for the [SGP Directory](https://sgpdirectory.com) remote server. Singapore business directory: search companies, UENs, and SSIC industry classifications.
4
4
 
5
- This package provides a standard `stdio` interface compatible with local MCP clients (like Claude Desktop and Cursor), proxying requests securely to the remote HTTP streamable sgpdirectory server (`https://mcp.sgpdirectory.com/mcp`).
5
+ This package provides a standard `stdio` interface compatible with local MCP clients (like Claude Desktop and Cursor), proxying requests securely to the remote HTTP streamable SGP Directory server (`https://mcp.sgpdirectory.com/mcp`).
6
6
 
7
7
  ## Usage with Cursor
8
8
  Run the following package directly using `npx`:
@@ -18,7 +18,7 @@ Add this to your `mcp-servers.json` configuration file:
18
18
  ```json
19
19
  {
20
20
  "mcpServers": {
21
- "sgpdirectory": {
21
+ "sgp-directory": {
22
22
  "command": "npx",
23
23
  "args": ["-y", "@sgpdirectory/mcp"]
24
24
  }
@@ -34,7 +34,7 @@ If your proxy is behind an access token, you can pass it via `SGP_DIRECTORY_API_
34
34
  ```json
35
35
  {
36
36
  "mcpServers": {
37
- "sgpdirectory": {
37
+ "sgp-directory": {
38
38
  "command": "npx",
39
39
  "args": ["-y", "@sgpdirectory/mcp"],
40
40
  "env": {
package/index.js CHANGED
@@ -16,7 +16,7 @@ const REMOTE_URL = 'https://mcp.sgpdirectory.com/mcp';
16
16
  const mcpRemoteBin = require.resolve('mcp-remote/dist/proxy.js'); // Standard resolution or fallback to npx
17
17
 
18
18
  function startProxy() {
19
- const args = ['mcp-remote', REMOTE_URL];
19
+ const args = [mcpRemoteBin, REMOTE_URL];
20
20
 
21
21
  // If the user provided an API token via SGP_DIRECTORY_API_KEY environment variable,
22
22
  // append it as an Authorization header to the mcp-remote call.
@@ -25,9 +25,8 @@ function startProxy() {
25
25
  args.push('--header', `Authorization: Bearer ${token}`);
26
26
  }
27
27
 
28
- // We use npx mcp-remote because mcp-remote exposes its proxy utility.
29
- // Instead of importing, we spawn the CLI directly to inherit its exact stdio behavior.
30
- const child = spawn('npx', args, {
28
+ // Start the local node process with the exact stdio behavior.
29
+ const child = spawn(process.execPath, args, {
31
30
  stdio: 'inherit',
32
31
  env: {
33
32
  ...process.env,
package/package.json CHANGED
@@ -1,14 +1,25 @@
1
1
  {
2
2
  "name": "@sgpdirectory/mcp",
3
- "version": "1.1.0",
4
- "description": "Singapore business directory. Search entities, UENs, and SSIC industry classifications.",
3
+ "version": "1.2.0",
4
+ "description": "Singapore business directory. Search companies, UENs, and SSIC industry classifications.",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
7
  "start": "node ./index.js",
8
- "test": "node scripts/smoke-test.js"
8
+ "test": "node scripts/smoke-test.js",
9
+ "version": "node scripts/sync-version.js",
10
+ "deploy": "sh scripts/4-publish.sh"
9
11
  },
10
- "keywords": [],
11
- "author": "",
12
+ "keywords": [
13
+ "mcp",
14
+ "mcp-server",
15
+ "singapore",
16
+ "business",
17
+ "directory",
18
+ "company",
19
+ "uen",
20
+ "ssic"
21
+ ],
22
+ "author": "SGP Directory <info@sgpdirectory.com>",
12
23
  "license": "ISC",
13
24
  "type": "commonjs",
14
25
  "dependencies": {
@@ -20,5 +31,5 @@
20
31
  "publishConfig": {
21
32
  "access": "public"
22
33
  },
23
- "mcpName": "com.sgpdirectory/mcp"
34
+ "mcpName": "com.sgpdirectory/business-directory"
24
35
  }
@@ -0,0 +1,21 @@
1
+ const fs = require('fs');
2
+ const path = require('path');
3
+
4
+ const packageJsonPath = path.join(__dirname, '../package.json');
5
+ const serverJsonPath = path.join(__dirname, '../server.json');
6
+
7
+ const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
8
+ const serverJson = JSON.parse(fs.readFileSync(serverJsonPath, 'utf8'));
9
+
10
+ const version = packageJson.version;
11
+
12
+ // Update root version
13
+ serverJson.version = version;
14
+
15
+ // Update package version
16
+ if (serverJson.packages && serverJson.packages.length > 0) {
17
+ serverJson.packages[0].version = version;
18
+ }
19
+
20
+ fs.writeFileSync(serverJsonPath, JSON.stringify(serverJson, null, 2) + '\n');
21
+ console.log(`✅ Synced server.json version to ${version}`);
package/server.json CHANGED
@@ -1,24 +1,33 @@
1
1
  {
2
2
  "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
- "name": "com.sgpdirectory/mcp",
4
- "description": "Singapore business directory. Search entities, UENs, and SSIC industry classifications.",
5
- "repository": {
6
- "url": "https://github.com/sgpdirectory/sgpdirectory-mcp-package",
7
- "source": "github"
8
- },
9
- "version": "1.1.0",
3
+ "name": "com.sgpdirectory/business-directory",
4
+ "description": "Singapore business directory. Search companies, UENs, and SSIC industry classifications.",
5
+ "title": "Singapore Business Directory",
6
+ "version": "1.2.0",
7
+ "websiteUrl": "https://sgpdirectory.com",
8
+ "icons": [
9
+ {
10
+ "src": "https://sgpdirectory.com/logo.svg",
11
+ "mimeType": "image/svg+xml"
12
+ }
13
+ ],
10
14
  "remotes": [
11
15
  {
12
16
  "type": "streamable-http",
13
17
  "url": "https://mcp.sgpdirectory.com/mcp",
14
- "environmentVariables": [
18
+ "headers": [
15
19
  {
16
- "name": "SGP_DIRECTORY_API_KEY",
17
- "description": "Your API key for the service",
20
+ "name": "Authorization",
21
+ "value": "Bearer {SGP_DIRECTORY_API_KEY}"
22
+ }
23
+ ],
24
+ "variables": {
25
+ "SGP_DIRECTORY_API_KEY": {
26
+ "description": "SGP Directory API Key",
18
27
  "isRequired": false,
19
28
  "isSecret": true
20
29
  }
21
- ]
30
+ }
22
31
  }
23
32
  ],
24
33
  "packages": [
@@ -26,14 +35,14 @@
26
35
  "registryType": "npm",
27
36
  "registryBaseUrl": "https://registry.npmjs.org",
28
37
  "identifier": "@sgpdirectory/mcp",
29
- "version": "1.1.0",
38
+ "version": "1.2.0",
30
39
  "transport": {
31
40
  "type": "stdio"
32
41
  },
33
42
  "environmentVariables": [
34
43
  {
35
44
  "name": "SGP_DIRECTORY_API_KEY",
36
- "description": "Your API key for the service",
45
+ "description": "SGP Directory API Key",
37
46
  "isRequired": false,
38
47
  "isSecret": true
39
48
  }