@i18n-agent/mcp-client 1.8.6 → 1.8.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/install.js +20 -5
- package/package.json +1 -1
package/install.js
CHANGED
|
@@ -297,12 +297,27 @@ function updateGenericMCPConfig(configPath) {
|
|
|
297
297
|
config.mcpServers = {};
|
|
298
298
|
}
|
|
299
299
|
|
|
300
|
-
const
|
|
301
|
-
|
|
300
|
+
const nodeEnv = detectNodeEnvironment();
|
|
301
|
+
const { mcpClientPath, packageDir } = getMcpClientPaths();
|
|
302
302
|
|
|
303
|
-
//
|
|
304
|
-
if (
|
|
305
|
-
|
|
303
|
+
// Use absolute node path for nvm environments, 'node' for system installations
|
|
304
|
+
if (nodeEnv.isNvm) {
|
|
305
|
+
console.log(' 🔧 Using absolute node path for nvm environment');
|
|
306
|
+
config.mcpServers["i18n-agent"] = {
|
|
307
|
+
command: nodeEnv.nodePath,
|
|
308
|
+
args: [mcpClientPath],
|
|
309
|
+
cwd: packageDir,
|
|
310
|
+
env: {
|
|
311
|
+
MCP_SERVER_URL: "https://mcp.i18nagent.ai",
|
|
312
|
+
API_KEY: existingApiKey || ""
|
|
313
|
+
}
|
|
314
|
+
};
|
|
315
|
+
} else {
|
|
316
|
+
const baseConfig = createMCPConfig();
|
|
317
|
+
config.mcpServers["i18n-agent"] = baseConfig.mcpServers["i18n-agent"];
|
|
318
|
+
if (existingApiKey) {
|
|
319
|
+
config.mcpServers["i18n-agent"].env.API_KEY = existingApiKey;
|
|
320
|
+
}
|
|
306
321
|
}
|
|
307
322
|
|
|
308
323
|
// Write config
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@i18n-agent/mcp-client",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.7",
|
|
4
4
|
"description": "🌍 i18n-agent MCP Client - 48 languages, AI-powered translation for Claude, Claude Code, Cursor, VS Code, Codex. Get API key at https://app.i18nagent.ai",
|
|
5
5
|
"main": "mcp-client.js",
|
|
6
6
|
"bin": {
|