@i18n-agent/mcp-client 1.8.416 → 1.8.418

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.
Files changed (2) hide show
  1. package/install.js +2 -71
  2. package/package.json +1 -1
package/install.js CHANGED
@@ -47,8 +47,8 @@ const IDE_CONFIGS = {
47
47
  },
48
48
  'claude-code': {
49
49
  name: 'Claude Code CLI',
50
- configPath: path.join(os.homedir(), '.config/claude/claude_code_config.json'),
51
- displayPath: '~/.config/claude/claude_code_config.json'
50
+ configPath: path.join(os.homedir(), '.claude.json'),
51
+ displayPath: '~/.claude.json'
52
52
  },
53
53
  cursor: {
54
54
  name: 'Cursor',
@@ -375,66 +375,6 @@ function updateGenericMCPConfig(configPath) {
375
375
 
376
376
  return { config, hasApiKey };
377
377
  }
378
-
379
- function updateClaudeJsonConfig(configPath) {
380
- let config = {};
381
- let existingApiKey = "";
382
-
383
- if (fs.existsSync(configPath)) {
384
- try {
385
- const existing = fs.readFileSync(configPath, 'utf8');
386
- config = JSON.parse(existing);
387
-
388
- // Preserve existing API key if present
389
- if (config.mcpServers?.["i18n-agent"]?.env?.API_KEY) {
390
- existingApiKey = config.mcpServers["i18n-agent"].env.API_KEY;
391
- console.log(' 🔑 Preserving existing API key from ~/.claude.json');
392
- }
393
- } catch (error) {
394
- console.warn(` ⚠️ Warning: Could not parse ~/.claude.json - it may be corrupted`);
395
- return;
396
- }
397
- }
398
-
399
- if (!config.mcpServers) {
400
- config.mcpServers = {};
401
- }
402
-
403
- const nodeEnv = detectNodeEnvironment();
404
- const { mcpClientPath } = getMcpClientPaths();
405
-
406
- // Use absolute node path for nvm, 'node' for system installations
407
- if (nodeEnv.isNvm) {
408
- config.mcpServers["i18n-agent"] = {
409
- command: nodeEnv.nodePath,
410
- args: [mcpClientPath],
411
- env: {
412
- MCP_SERVER_URL: "https://mcp.i18nagent.ai",
413
- API_KEY: existingApiKey || ""
414
- },
415
- disabled: false
416
- };
417
- } else {
418
- config.mcpServers["i18n-agent"] = {
419
- command: "node",
420
- args: [mcpClientPath],
421
- env: {
422
- MCP_SERVER_URL: "https://mcp.i18nagent.ai",
423
- API_KEY: existingApiKey || ""
424
- },
425
- disabled: false
426
- };
427
- }
428
-
429
- // Write config
430
- try {
431
- fs.writeFileSync(configPath, JSON.stringify(config, null, 2));
432
- console.log(' ✅ ~/.claude.json updated');
433
- } catch (error) {
434
- console.warn(` ⚠️ Warning: Failed to write ~/.claude.json: ${error.message}`);
435
- }
436
- }
437
-
438
378
  async function main() {
439
379
  try {
440
380
  console.log('🔍 Detecting available AI IDEs...\n');
@@ -515,15 +455,6 @@ For manual setup instructions, visit: https://docs.i18nagent.ai/setup
515
455
  let result;
516
456
  if (ide.key === 'claude' || ide.key === 'claude-code') {
517
457
  result = updateClaudeConfig(ide.configPath, ide.key);
518
-
519
- // Claude Code CLI also needs ~/.claude.json updated (source of truth)
520
- if (ide.key === 'claude-code') {
521
- const claudeJsonPath = path.join(os.homedir(), '.claude.json');
522
- if (fs.existsSync(claudeJsonPath)) {
523
- console.log(' 🔧 Updating ~/.claude.json (source of truth)...');
524
- updateClaudeJsonConfig(claudeJsonPath);
525
- }
526
- }
527
458
  } else {
528
459
  result = updateGenericMCPConfig(ide.configPath);
529
460
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@i18n-agent/mcp-client",
3
- "version": "1.8.416",
3
+ "version": "1.8.418",
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": {