@i18n-agent/mcp-client 1.15.3 → 1.15.5

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.
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
3
3
  "name": "i18n-agent",
4
- "version": "1.15.3",
4
+ "version": "1.15.5",
5
5
  "owner": {
6
6
  "name": "FatCouple OÜ",
7
7
  "email": "support@i18nagent.ai"
8
8
  },
9
9
  "metadata": {
10
10
  "description": "Professional AI-powered translation service for Claude Code with 48 languages support",
11
- "version": "1.15.3"
11
+ "version": "1.15.5"
12
12
  },
13
13
  "plugins": [
14
14
  {
@@ -18,7 +18,7 @@
18
18
  "repo": "i18n-agent/mcp-client"
19
19
  },
20
20
  "description": "šŸŒ Professional translation service with context-aware translations, file translation (JSON, YAML, CSV, Markdown), credit tracking, and 48 language support with regional variants",
21
- "version": "1.15.3",
21
+ "version": "1.15.5",
22
22
  "author": {
23
23
  "name": "FatCouple OÜ",
24
24
  "email": "support@i18nagent.ai"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "i18n-agent",
3
3
  "description": "šŸŒ i18n-agent MCP Client - 48 languages, AI-powered translation for Claude Code. Professional translation service with context-aware translations, file translation support, and 48 language variants.",
4
- "version": "1.15.3",
4
+ "version": "1.15.5",
5
5
  "author": {
6
6
  "name": "FatCouple OÜ",
7
7
  "email": "support@i18nagent.ai"
@@ -22,10 +22,10 @@
22
22
  "mcpServers": {
23
23
  "i18n-agent": {
24
24
  "command": "npx",
25
- "args": ["-y", "-p", "@i18n-agent/mcp-client@latest", "--", "i18n-agent-server"],
25
+ "args": ["-y", "@i18n-agent/mcp-client@latest"],
26
26
  "env": {
27
27
  "MCP_SERVER_URL": "https://mcp.i18nagent.ai",
28
- "API_KEY": "${API_KEY}"
28
+ "I18N_AGENT_API_KEY": "${I18N_AGENT_API_KEY}"
29
29
  },
30
30
  "disabled": false
31
31
  }
package/README.md CHANGED
@@ -36,7 +36,7 @@ For Claude Code users, you can install directly from the marketplace:
36
36
 
37
37
  **Step 2: Set environment variable**
38
38
  ```bash
39
- echo 'export API_KEY=your-api-key-here' >> ~/.zshrc
39
+ echo 'export I18N_AGENT_API_KEY=your-api-key-here' >> ~/.zshrc
40
40
  source ~/.zshrc
41
41
  ```
42
42
 
@@ -58,12 +58,12 @@ That's it! The plugin will automatically use your API key from the environment v
58
58
 
59
59
  2. **Set environment variable**:
60
60
  ```bash
61
- export API_KEY=your-api-key-here
61
+ export I18N_AGENT_API_KEY=your-api-key-here
62
62
  ```
63
63
 
64
64
  3. **Make it permanent** (add to ~/.bashrc or ~/.zshrc):
65
65
  ```bash
66
- echo 'export API_KEY=your-api-key-here' >> ~/.zshrc
66
+ echo 'export I18N_AGENT_API_KEY=your-api-key-here' >> ~/.zshrc
67
67
  ```
68
68
 
69
69
  4. **Restart your AI IDE** to load the new configuration
@@ -187,7 +187,7 @@ Edit `~/Library/Application Support/Claude/claude_desktop_config.json`:
187
187
  "args": ["/path/to/i18n-agent.js"],
188
188
  "env": {
189
189
  "MCP_SERVER_URL": "https://mcp.i18nagent.ai",
190
- "API_KEY": "your-api-key-here"
190
+ "I18N_AGENT_API_KEY": "your-api-key-here"
191
191
  }
192
192
  }
193
193
  }
@@ -205,7 +205,7 @@ Create `.cursor/mcp_settings.json` or `.vscode/mcp_settings.json`:
205
205
  "args": ["/path/to/i18n-agent.js"],
206
206
  "env": {
207
207
  "MCP_SERVER_URL": "https://mcp.i18nagent.ai",
208
- "API_KEY": "your-api-key-here"
208
+ "I18N_AGENT_API_KEY": "your-api-key-here"
209
209
  }
210
210
  }
211
211
  }
@@ -297,7 +297,7 @@ This usually happens with Node Version Managers (nvm, fnm, n). The installer now
297
297
  "command": "/Users/YOUR_USERNAME/.claude/run-mcp.sh",
298
298
  "env": {
299
299
  "MCP_SERVER_URL": "https://mcp.i18nagent.ai",
300
- "API_KEY": "your-api-key"
300
+ "I18N_AGENT_API_KEY": "your-api-key"
301
301
  }
302
302
  }
303
303
  }
@@ -310,8 +310,8 @@ This usually happens with Node Version Managers (nvm, fnm, n). The installer now
310
310
 
311
311
  **API Key not found:**
312
312
  ```bash
313
- echo $API_KEY # Should show your key
314
- export API_KEY=your-key-here
313
+ echo $I18N_AGENT_API_KEY # Should show your key
314
+ export I18N_AGENT_API_KEY=your-key-here
315
315
  ```
316
316
 
317
317
  **Connection errors:**
package/i18n-agent.js CHANGED
@@ -37,11 +37,11 @@ const server = new Server(
37
37
  if (!process.env.MCP_SERVER_URL) {
38
38
  throw new Error('MCP_SERVER_URL environment variable is required');
39
39
  }
40
- if (!process.env.API_KEY) {
41
- throw new Error('API_KEY environment variable is required');
40
+ if (!process.env.I18N_AGENT_API_KEY) {
41
+ throw new Error('I18N_AGENT_API_KEY environment variable is required');
42
42
  }
43
43
  const MCP_SERVER_URL = process.env.MCP_SERVER_URL;
44
- const API_KEY = process.env.API_KEY;
44
+ const I18N_AGENT_API_KEY = process.env.I18N_AGENT_API_KEY;
45
45
 
46
46
  // Heavy load detection - matches error message from service-mcp error-message-sanitizer
47
47
  // Exact message: 'Our system is under heavy load, please resume your job later.'
@@ -609,7 +609,7 @@ async function handleTranslateText(args) {
609
609
  params: {
610
610
  name: 'translate_text',
611
611
  arguments: {
612
- apiKey: API_KEY,
612
+ apiKey: I18N_AGENT_API_KEY,
613
613
  texts: texts,
614
614
  targetLanguages: targetLanguages,
615
615
  sourceLanguage: sourceLanguage && sourceLanguage !== 'auto' ? sourceLanguage : undefined,
@@ -952,7 +952,7 @@ async function handleTranslateFile(args) {
952
952
 
953
953
  // Build arguments object, filtering out undefined values (they get stripped by JSON.stringify)
954
954
  const requestArgs = {
955
- apiKey: API_KEY,
955
+ apiKey: I18N_AGENT_API_KEY,
956
956
  filePath,
957
957
  fileContent: content,
958
958
  fileType,
@@ -1261,7 +1261,7 @@ async function handleAnalyzeContent(args) {
1261
1261
  params: {
1262
1262
  name: 'analyze_content',
1263
1263
  arguments: {
1264
- apiKey: API_KEY,
1264
+ apiKey: I18N_AGENT_API_KEY,
1265
1265
  content,
1266
1266
  fileType,
1267
1267
  sourceLanguage,
@@ -1312,7 +1312,7 @@ async function handleAnalyzeContent(args) {
1312
1312
 
1313
1313
  async function handleGetCredits(args) {
1314
1314
  const { apiKey } = args;
1315
- const creditsApiKey = apiKey || API_KEY;
1315
+ const creditsApiKey = apiKey || I18N_AGENT_API_KEY;
1316
1316
 
1317
1317
  // Use MCP JSON-RPC protocol for get_credits
1318
1318
  const mcpRequest = {
@@ -1900,7 +1900,7 @@ async function handleDownloadTranslations(args) {
1900
1900
  params: {
1901
1901
  name: 'download_translations',
1902
1902
  arguments: {
1903
- apiKey: API_KEY,
1903
+ apiKey: I18N_AGENT_API_KEY,
1904
1904
  jobId
1905
1905
  }
1906
1906
  }
@@ -2151,7 +2151,7 @@ async function handleSingleFileUpload(args) {
2151
2151
  formData,
2152
2152
  {
2153
2153
  headers: {
2154
- 'Authorization': `Bearer ${API_KEY}`,
2154
+ 'Authorization': `Bearer ${I18N_AGENT_API_KEY}`,
2155
2155
  ...formData.getHeaders()
2156
2156
  },
2157
2157
  timeout: 60000
@@ -2264,7 +2264,7 @@ async function handleParallelDocumentUpload(args) {
2264
2264
  formData,
2265
2265
  {
2266
2266
  headers: {
2267
- 'Authorization': `Bearer ${API_KEY}`,
2267
+ 'Authorization': `Bearer ${I18N_AGENT_API_KEY}`,
2268
2268
  ...formData.getHeaders()
2269
2269
  },
2270
2270
  timeout: 120000
@@ -2326,7 +2326,7 @@ async function handleListUploadedTranslations(args) {
2326
2326
  `${MCP_SERVER_URL}/namespaces/${namespace}/translations/files?${params.toString()}`,
2327
2327
  {
2328
2328
  headers: {
2329
- 'Authorization': `Bearer ${API_KEY}`
2329
+ 'Authorization': `Bearer ${I18N_AGENT_API_KEY}`
2330
2330
  },
2331
2331
  timeout: 30000
2332
2332
  }
@@ -2385,7 +2385,7 @@ async function main() {
2385
2385
  await server.connect(transport);
2386
2386
  console.error('i18n-agent MCP server running...');
2387
2387
  console.error('MCP_SERVER_URL:', MCP_SERVER_URL);
2388
- console.error('API_KEY:', API_KEY);
2388
+ console.error('I18N_AGENT_API_KEY:', I18N_AGENT_API_KEY);
2389
2389
  }
2390
2390
 
2391
2391
  main().catch((error) => {
package/install.js CHANGED
@@ -175,7 +175,7 @@ function checkExistingApiKey(configPath) {
175
175
  try {
176
176
  const content = fs.readFileSync(configPath, 'utf8');
177
177
  const config = JSON.parse(content);
178
- const apiKey = config.mcpServers?.["i18n-agent"]?.env?.API_KEY;
178
+ const apiKey = config.mcpServers?.["i18n-agent"]?.env?.I18N_AGENT_API_KEY;
179
179
  return apiKey && apiKey.trim() !== '';
180
180
  } catch (error) {
181
181
  return false;
@@ -191,7 +191,7 @@ function extractApiKeyFromConfig(configPath) {
191
191
  try {
192
192
  const content = fs.readFileSync(configPath, 'utf8');
193
193
  const config = JSON.parse(content);
194
- const apiKey = config.mcpServers?.["i18n-agent"]?.env?.API_KEY;
194
+ const apiKey = config.mcpServers?.["i18n-agent"]?.env?.I18N_AGENT_API_KEY;
195
195
  return (apiKey && apiKey.trim() !== '') ? apiKey.trim() : '';
196
196
  } catch (error) {
197
197
  return '';
@@ -292,7 +292,7 @@ function createMCPConfig() {
292
292
  cwd: packageDir,
293
293
  env: {
294
294
  MCP_SERVER_URL: "https://mcp.i18nagent.ai",
295
- API_KEY: ""
295
+ I18N_AGENT_API_KEY: ""
296
296
  },
297
297
  disabled: false
298
298
  }
@@ -365,9 +365,9 @@ function installViaCodexCLI(existingApiKey = '') {
365
365
  ];
366
366
 
367
367
  if (existingApiKey) {
368
- envArgs.push('--env', `API_KEY=${existingApiKey}`);
368
+ envArgs.push('--env', `I18N_AGENT_API_KEY=${existingApiKey}`);
369
369
  } else {
370
- envArgs.push('--env', 'API_KEY=');
370
+ envArgs.push('--env', 'I18N_AGENT_API_KEY=');
371
371
  }
372
372
 
373
373
  // Build the full command
@@ -413,8 +413,8 @@ function isClaudeCodeMCPRegistered(serverName) {
413
413
  function getClaudeCodeExistingApiKey(serverName) {
414
414
  try {
415
415
  const output = execSync(`claude mcp get ${serverName}`, { stdio: 'pipe', encoding: 'utf8' });
416
- // Parse output like: API_KEY=i18n_xxx
417
- const match = output.match(/API_KEY=([^\s,\n]+)/);
416
+ // Parse output like: I18N_AGENT_API_KEY=i18n_xxx
417
+ const match = output.match(/I18N_AGENT_API_KEY=([^\s,\n]+)/);
418
418
  if (match && match[1] && match[1] !== '') {
419
419
  return match[1];
420
420
  }
@@ -428,11 +428,11 @@ function getClaudeCodeExistingApiKey(serverName) {
428
428
  function getCodexExistingApiKey(serverName) {
429
429
  try {
430
430
  const output = execSync(`codex mcp list`, { stdio: 'pipe', encoding: 'utf8' });
431
- // Parse output - Codex shows: API_KEY=i18n_xxx, MCP_SERVER_URL=...
431
+ // Parse output - Codex shows: I18N_AGENT_API_KEY=i18n_xxx, MCP_SERVER_URL=...
432
432
  const lines = output.split('\n');
433
433
  for (const line of lines) {
434
434
  if (line.includes(serverName)) {
435
- const match = line.match(/API_KEY=([^\s,]+)/);
435
+ const match = line.match(/I18N_AGENT_API_KEY=([^\s,]+)/);
436
436
  if (match && match[1] && match[1] !== '') {
437
437
  return match[1];
438
438
  }
@@ -477,9 +477,9 @@ function installViaClaudeCodeCLI(existingApiKey = '', scope = 'user') {
477
477
  ];
478
478
 
479
479
  if (existingApiKey) {
480
- envArgs.push('-e', `API_KEY=${existingApiKey}`);
480
+ envArgs.push('-e', `I18N_AGENT_API_KEY=${existingApiKey}`);
481
481
  } else {
482
- envArgs.push('-e', 'API_KEY=');
482
+ envArgs.push('-e', 'I18N_AGENT_API_KEY=');
483
483
  }
484
484
 
485
485
  // Build the full command
@@ -542,8 +542,8 @@ function updateClaudeConfig(configPath, ideKey = 'claude', sharedApiKey = '') {
542
542
  config = JSON.parse(content);
543
543
 
544
544
  // Preserve existing API key if present
545
- if (config.mcpServers?.["i18n-agent"]?.env?.API_KEY) {
546
- existingApiKey = config.mcpServers["i18n-agent"].env.API_KEY;
545
+ if (config.mcpServers?.["i18n-agent"]?.env?.I18N_AGENT_API_KEY) {
546
+ existingApiKey = config.mcpServers["i18n-agent"].env.I18N_AGENT_API_KEY;
547
547
  hasApiKey = !!existingApiKey;
548
548
  console.log(' šŸ”‘ Preserving existing API key');
549
549
  }
@@ -577,7 +577,7 @@ function updateClaudeConfig(configPath, ideKey = 'claude', sharedApiKey = '') {
577
577
  args: [mcpClientPath],
578
578
  env: {
579
579
  MCP_SERVER_URL: "https://mcp.i18nagent.ai",
580
- API_KEY: existingApiKey || ""
580
+ I18N_AGENT_API_KEY: existingApiKey || ""
581
581
  },
582
582
  disabled: false
583
583
  };
@@ -586,7 +586,7 @@ function updateClaudeConfig(configPath, ideKey = 'claude', sharedApiKey = '') {
586
586
  const baseConfig = createMCPConfig();
587
587
  config.mcpServers["i18n-agent"] = baseConfig.mcpServers["i18n-agent"];
588
588
  if (existingApiKey) {
589
- config.mcpServers["i18n-agent"].env.API_KEY = existingApiKey;
589
+ config.mcpServers["i18n-agent"].env.I18N_AGENT_API_KEY = existingApiKey;
590
590
  }
591
591
  }
592
592
  } else {
@@ -600,7 +600,7 @@ function updateClaudeConfig(configPath, ideKey = 'claude', sharedApiKey = '') {
600
600
  command: wrapperPath,
601
601
  env: {
602
602
  MCP_SERVER_URL: "https://mcp.i18nagent.ai",
603
- API_KEY: existingApiKey || ""
603
+ I18N_AGENT_API_KEY: existingApiKey || ""
604
604
  },
605
605
  disabled: false
606
606
  };
@@ -608,7 +608,7 @@ function updateClaudeConfig(configPath, ideKey = 'claude', sharedApiKey = '') {
608
608
  const baseConfig = createMCPConfig();
609
609
  config.mcpServers["i18n-agent"] = baseConfig.mcpServers["i18n-agent"];
610
610
  if (existingApiKey) {
611
- config.mcpServers["i18n-agent"].env.API_KEY = existingApiKey;
611
+ config.mcpServers["i18n-agent"].env.I18N_AGENT_API_KEY = existingApiKey;
612
612
  }
613
613
  }
614
614
  }
@@ -631,8 +631,8 @@ function updateGenericMCPConfig(configPath, sharedApiKey = '') {
631
631
  config = JSON.parse(existing);
632
632
 
633
633
  // Preserve existing API key if present
634
- if (config.mcpServers?.["i18n-agent"]?.env?.API_KEY) {
635
- existingApiKey = config.mcpServers["i18n-agent"].env.API_KEY;
634
+ if (config.mcpServers?.["i18n-agent"]?.env?.I18N_AGENT_API_KEY) {
635
+ existingApiKey = config.mcpServers["i18n-agent"].env.I18N_AGENT_API_KEY;
636
636
  hasApiKey = !!existingApiKey;
637
637
  console.log(' šŸ”‘ Preserving existing API key');
638
638
  }
@@ -664,7 +664,7 @@ function updateGenericMCPConfig(configPath, sharedApiKey = '') {
664
664
  cwd: packageDir,
665
665
  env: {
666
666
  MCP_SERVER_URL: "https://mcp.i18nagent.ai",
667
- API_KEY: existingApiKey || ""
667
+ I18N_AGENT_API_KEY: existingApiKey || ""
668
668
  },
669
669
  disabled: false
670
670
  };
@@ -672,7 +672,7 @@ function updateGenericMCPConfig(configPath, sharedApiKey = '') {
672
672
  const baseConfig = createMCPConfig();
673
673
  config.mcpServers["i18n-agent"] = baseConfig.mcpServers["i18n-agent"];
674
674
  if (existingApiKey) {
675
- config.mcpServers["i18n-agent"].env.API_KEY = existingApiKey;
675
+ config.mcpServers["i18n-agent"].env.I18N_AGENT_API_KEY = existingApiKey;
676
676
  }
677
677
  }
678
678
 
@@ -702,7 +702,7 @@ Supported IDEs:
702
702
  Manual setup:
703
703
  1. Create the configuration file for your IDE
704
704
  2. Add the i18n-agent MCP server configuration
705
- 3. Set your API_KEY environment variable
705
+ 3. Set your I18N_AGENT_API_KEY environment variable
706
706
 
707
707
  For manual setup instructions, visit: https://docs.i18nagent.ai/setup
708
708
  `);
@@ -796,7 +796,7 @@ For manual setup instructions, visit: https://docs.i18nagent.ai/setup
796
796
  try {
797
797
  const content = fs.readFileSync(ide.configPath, 'utf8');
798
798
  const config = JSON.parse(content);
799
- existingApiKey = config.mcpServers?.["i18n-agent"]?.env?.API_KEY || '';
799
+ existingApiKey = config.mcpServers?.["i18n-agent"]?.env?.I18N_AGENT_API_KEY || '';
800
800
  } catch {
801
801
  // Ignore parse errors
802
802
  }
@@ -835,7 +835,7 @@ For manual setup instructions, visit: https://docs.i18nagent.ai/setup
835
835
  try {
836
836
  const content = fs.readFileSync(ide.configPath, 'utf8');
837
837
  const config = JSON.parse(content);
838
- existingApiKey = config.mcpServers?.["i18n-agent"]?.env?.API_KEY || '';
838
+ existingApiKey = config.mcpServers?.["i18n-agent"]?.env?.I18N_AGENT_API_KEY || '';
839
839
  } catch {
840
840
  // Ignore parse errors
841
841
  }
@@ -928,7 +928,7 @@ Step 2: Add API key to your IDE`);
928
928
  console.log(`
929
929
  For Claude Code CLI (recommended):
930
930
  claude mcp remove --scope user i18n-agent
931
- claude mcp add --transport stdio --scope user i18n-agent -e MCP_SERVER_URL=https://mcp.i18nagent.ai -e API_KEY=your_key_here -- node ~/.claude/mcp-servers/i18n-agent/i18n-agent.js
931
+ claude mcp add --transport stdio --scope user i18n-agent -e MCP_SERVER_URL=https://mcp.i18nagent.ai -e I18N_AGENT_API_KEY=your_key_here -- node ~/.claude/mcp-servers/i18n-agent/i18n-agent.js
932
932
  `);
933
933
  }
934
934
 
@@ -936,25 +936,25 @@ Step 2: Add API key to your IDE`);
936
936
  console.log(`
937
937
  For Codex CLI (recommended):
938
938
  codex mcp remove i18n-agent
939
- codex mcp add --env MCP_SERVER_URL=https://mcp.i18nagent.ai --env API_KEY=your_key_here i18n-agent node ~/.claude/mcp-servers/i18n-agent/i18n-agent.js
939
+ codex mcp add --env MCP_SERVER_URL=https://mcp.i18nagent.ai --env I18N_AGENT_API_KEY=your_key_here i18n-agent node ~/.claude/mcp-servers/i18n-agent/i18n-agent.js
940
940
  `);
941
941
  }
942
942
 
943
943
  console.log(` For config file method:
944
- Open the config file and edit the "API_KEY" field:
944
+ Open the config file and edit the "I18N_AGENT_API_KEY" field:
945
945
 
946
946
  "mcpServers": {
947
947
  "i18n-agent": {
948
948
  "command": "...",
949
949
  "env": {
950
950
  "MCP_SERVER_URL": "https://mcp.i18nagent.ai",
951
- "API_KEY": "" ← Paste your API key here (between the quotes)
951
+ "I18N_AGENT_API_KEY": "" ← Paste your API key here (between the quotes)
952
952
  }
953
953
  }
954
954
  }
955
955
 
956
956
  Example with actual key:
957
- "API_KEY": "i18n_1234567890abcdef"
957
+ "I18N_AGENT_API_KEY": "i18n_1234567890abcdef"
958
958
 
959
959
  Step 3: Restart your IDE
960
960
  Close and reopen your IDE to load the new configuration
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "@i18n-agent/mcp-client",
3
- "version": "1.15.3",
3
+ "version": "1.15.5",
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": "i18n-agent.js",
6
- "bin": {
7
- "i18n-agent": "install.js",
8
- "i18n-agent-server": "i18n-agent.js"
9
- },
6
+ "bin": "i18n-agent.js",
10
7
  "type": "module",
8
+ "scripts": {
9
+ "test": "node test.js",
10
+ "postinstall": "echo '\nšŸŒ i18n-agent MCP Client installed successfully!'"
11
+ },
11
12
  "repository": {
12
13
  "type": "git",
13
14
  "url": "git+https://github.com/i18n-agent/mcp-client.git"
@@ -48,9 +49,5 @@
48
49
  ],
49
50
  "publishConfig": {
50
51
  "access": "public"
51
- },
52
- "scripts": {
53
- "test": "node test.js",
54
- "postinstall": "echo '\nšŸŒ i18n-agent MCP Client installed successfully!'"
55
52
  }
56
- }
53
+ }