@fonoster/mcp 0.16.6 → 0.16.7

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
@@ -68,9 +68,9 @@ Add the following to your `claude_desktop_config.json`:
68
68
  "@fonoster/mcp"
69
69
  ],
70
70
  "env": {
71
- "WORKSPACE_ACCESS_KEY_ID": "your-workspace-access-key-id",
72
- "APIKEY_ACCESS_KEY_ID": "your-apikey-access-key-id",
73
- "APIKEY_ACCESS_KEY_SECRET": "your-apikey-access-key-secret"
71
+ "MCP_WORKSPACE_ACCESS_KEY_ID": "your-workspace-access-key-id",
72
+ "MCP_APIKEY_ACCESS_KEY_ID": "your-apikey-access-key-id",
73
+ "MCP_APIKEY_ACCESS_KEY_SECRET": "your-apikey-access-key-secret"
74
74
  }
75
75
  }
76
76
  }
@@ -89,29 +89,39 @@ Add the following to your `claude_desktop_config.json`:
89
89
  "-i",
90
90
  "--rm",
91
91
  "-e",
92
- "WORKSPACE_ACCESS_KEY_ID",
92
+ "MCP_WORKSPACE_ACCESS_KEY_ID",
93
93
  "-e",
94
- "APIKEY_ACCESS_KEY_ID",
94
+ "MCP_APIKEY_ACCESS_KEY_ID",
95
95
  "-e",
96
- "APIKEY_ACCESS_KEY_SECRET",
96
+ "MCP_APIKEY_ACCESS_KEY_SECRET",
97
97
  "fonoster/mcp"
98
98
  ],
99
99
  "env": {
100
- "WORKSPACE_ACCESS_KEY_ID": "your-workspace-access-key-id",
101
- "APIKEY_ACCESS_KEY_ID": "your-apikey-access-key-id",
102
- "APIKEY_ACCESS_KEY_SECRET": "your-apikey-access-key-secret"
100
+ "MCP_WORKSPACE_ACCESS_KEY_ID": "your-workspace-access-key-id",
101
+ "MCP_APIKEY_ACCESS_KEY_ID": "your-apikey-access-key-id",
102
+ "MCP_APIKEY_ACCESS_KEY_SECRET": "your-apikey-access-key-secret"
103
103
  }
104
104
  }
105
105
  }
106
106
  }
107
107
  ```
108
108
 
109
+ ### Environment Variables
110
+
111
+ | Variable | Description | Required |
112
+ |----------|-------------|----------|
113
+ | `MCP_WORKSPACE_ACCESS_KEY_ID` | Your workspace access key ID | Yes |
114
+ | `MCP_APIKEY_ACCESS_KEY_ID` | Your API key access key ID | Yes |
115
+ | `MCP_APIKEY_ACCESS_KEY_SECRET` | Your API key secret | Yes |
116
+ | `MCP_ENDPOINT` | Custom API endpoint (e.g., `localhost:50051`) | No |
117
+ | `MCP_ALLOW_INSECURE` | Allow insecure connections (`true`/`false`) | No |
118
+
109
119
  ### Testing with the MCP Inspector
110
120
 
111
121
  ```bash
112
- WORKSPACE_ACCESS_KEY_ID="your-workspace-access-key-id" \
113
- APIKEY_ACCESS_KEY_ID="your-apikey-access-key-id" \
114
- APIKEY_ACCESS_KEY_SECRET="your-apikey-access-key_secret" \
122
+ MCP_WORKSPACE_ACCESS_KEY_ID="your-workspace-access-key-id" \
123
+ MCP_APIKEY_ACCESS_KEY_ID="your-apikey-access-key-id" \
124
+ MCP_APIKEY_ACCESS_KEY_SECRET="your-apikey-access-key-secret" \
115
125
  npx @modelcontextprotocol/inspector \
116
126
  node /path/to/fonoster/mods/mcp/dist/index.js
117
127
  ```
package/dist/env.d.ts CHANGED
@@ -1,4 +1,6 @@
1
1
  declare const WORKSPACE_ACCESS_KEY_ID: string;
2
2
  declare const ACCESS_KEY_ID: string;
3
3
  declare const ACCESS_KEY_SECRET: string;
4
- export { WORKSPACE_ACCESS_KEY_ID, ACCESS_KEY_ID, ACCESS_KEY_SECRET };
4
+ declare const ENDPOINT: string;
5
+ declare const ALLOW_INSECURE: boolean;
6
+ export { WORKSPACE_ACCESS_KEY_ID, ACCESS_KEY_ID, ACCESS_KEY_SECRET, ENDPOINT, ALLOW_INSECURE };
package/dist/env.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ACCESS_KEY_SECRET = exports.ACCESS_KEY_ID = exports.WORKSPACE_ACCESS_KEY_ID = void 0;
3
+ exports.ALLOW_INSECURE = exports.ENDPOINT = exports.ACCESS_KEY_SECRET = exports.ACCESS_KEY_ID = exports.WORKSPACE_ACCESS_KEY_ID = void 0;
4
4
  /**
5
5
  * Copyright (C) 2025 by Fonoster Inc (https://fonoster.com)
6
6
  * http://github.com/fonoster/fonoster
@@ -21,13 +21,17 @@ exports.ACCESS_KEY_SECRET = exports.ACCESS_KEY_ID = exports.WORKSPACE_ACCESS_KEY
21
21
  */
22
22
  const common_1 = require("@fonoster/common");
23
23
  (0, common_1.assertEnvsAreSet)([
24
- "WORKSPACE_ACCESS_KEY_ID",
25
- "APIKEY_ACCESS_KEY_ID",
26
- "APIKEY_ACCESS_KEY_SECRET"
24
+ "MCP_WORKSPACE_ACCESS_KEY_ID",
25
+ "MCP_APIKEY_ACCESS_KEY_ID",
26
+ "MCP_APIKEY_ACCESS_KEY_SECRET"
27
27
  ]);
28
- const WORKSPACE_ACCESS_KEY_ID = process.env.WORKSPACE_ACCESS_KEY_ID;
28
+ const WORKSPACE_ACCESS_KEY_ID = process.env.MCP_WORKSPACE_ACCESS_KEY_ID;
29
29
  exports.WORKSPACE_ACCESS_KEY_ID = WORKSPACE_ACCESS_KEY_ID;
30
- const ACCESS_KEY_ID = process.env.APIKEY_ACCESS_KEY_ID;
30
+ const ACCESS_KEY_ID = process.env.MCP_APIKEY_ACCESS_KEY_ID;
31
31
  exports.ACCESS_KEY_ID = ACCESS_KEY_ID;
32
- const ACCESS_KEY_SECRET = process.env.APIKEY_ACCESS_KEY_SECRET;
32
+ const ACCESS_KEY_SECRET = process.env.MCP_APIKEY_ACCESS_KEY_SECRET;
33
33
  exports.ACCESS_KEY_SECRET = ACCESS_KEY_SECRET;
34
+ const ENDPOINT = process.env.MCP_ENDPOINT;
35
+ exports.ENDPOINT = ENDPOINT;
36
+ const ALLOW_INSECURE = process.env.MCP_ALLOW_INSECURE === "true";
37
+ exports.ALLOW_INSECURE = ALLOW_INSECURE;
package/dist/index.js CHANGED
@@ -30,27 +30,34 @@ Object.defineProperty(exports, "__esModule", { value: true });
30
30
  */
31
31
  const fs_1 = require("fs");
32
32
  const path_1 = require("path");
33
+ const logger_1 = require("@fonoster/logger");
33
34
  const mcp_js_1 = require("@modelcontextprotocol/sdk/server/mcp.js");
34
35
  const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
35
36
  const index_1 = require("./prompts/index");
36
37
  const index_2 = require("./tools/index");
38
+ const logger = (0, logger_1.getLogger)({ service: "mcp", filePath: __filename });
37
39
  function main() {
38
40
  return __awaiter(this, void 0, void 0, function* () {
39
41
  // Read package.json using fs module
40
42
  const packageJsonPath = (0, path_1.join)(__dirname, "..", "package.json");
41
43
  const packageJson = JSON.parse((0, fs_1.readFileSync)(packageJsonPath, "utf8"));
44
+ logger.info(`starting Fonoster MCP Server v${packageJson.version}`);
42
45
  const server = new mcp_js_1.McpServer({
43
46
  name: "Fonoster MCP Server",
44
47
  version: packageJson.version
45
48
  });
46
49
  // Register all prompts
47
50
  (0, index_1.registerPrompts)(server);
51
+ logger.verbose("prompts registered successfully");
48
52
  // Register all tools
49
53
  yield (0, index_2.registerTools)(server);
54
+ logger.verbose("tools registered successfully");
50
55
  const transport = new stdio_js_1.StdioServerTransport();
51
56
  yield server.connect(transport);
57
+ logger.info("server connected and ready to accept requests");
52
58
  });
53
59
  }
54
60
  main().catch((error) => {
61
+ logger.error("failed to start MCP server", { error: error.message });
55
62
  process.exit(1);
56
63
  });
@@ -65,7 +65,11 @@ const SDK = __importStar(require("@fonoster/sdk"));
65
65
  const env_1 = require("../env");
66
66
  function createClient() {
67
67
  return __awaiter(this, void 0, void 0, function* () {
68
- const client = new SDK.Client({ accessKeyId: env_1.WORKSPACE_ACCESS_KEY_ID });
68
+ const client = new SDK.Client({
69
+ accessKeyId: env_1.WORKSPACE_ACCESS_KEY_ID,
70
+ endpoint: env_1.ENDPOINT,
71
+ allowInsecure: env_1.ALLOW_INSECURE
72
+ });
69
73
  yield client.loginWithApiKey(env_1.ACCESS_KEY_ID, env_1.ACCESS_KEY_SECRET);
70
74
  return client;
71
75
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fonoster/mcp",
3
- "version": "0.16.6",
3
+ "version": "0.16.7",
4
4
  "description": "Model Context Protocol for Fonoster",
5
5
  "author": "Pedro Sanders <psanders@fonoster.com>",
6
6
  "homepage": "https://github.com/fonoster/fonoster#readme",
@@ -18,12 +18,13 @@
18
18
  "prebuild": "rimraf ./dist tsconfig.tsbuildinfo",
19
19
  "build": "tsc -b tsconfig.json",
20
20
  "postbuild": "chmod +x ./dist/index.js",
21
- "clean": "rimraf ./dist node_modules tsconfig.tsbuildinfo"
21
+ "clean": "rimraf ./dist node_modules tsconfig.tsbuildinfo",
22
+ "start:dev": "nodemon --exec tsx --watch src src/index.ts"
22
23
  },
23
24
  "dependencies": {
24
- "@fonoster/common": "^0.16.6",
25
- "@fonoster/logger": "^0.16.6",
26
- "@fonoster/sdk": "^0.16.6",
25
+ "@fonoster/common": "^0.16.7",
26
+ "@fonoster/logger": "^0.16.7",
27
+ "@fonoster/sdk": "^0.16.7",
27
28
  "@modelcontextprotocol/sdk": "^1.4.0"
28
29
  },
29
30
  "files": [
@@ -39,5 +40,5 @@
39
40
  "bugs": {
40
41
  "url": "https://github.com/fonoster/fonoster/issues"
41
42
  },
42
- "gitHead": "25e4c9da3bf18462aef501184b8a73aad65c11be"
43
+ "gitHead": "90c180a6ebd2f17070a049ba5ec0b4717f55a6bc"
43
44
  }