@i18n-agent/mcp-client 1.8.0 โ 1.8.1
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 +9 -6
- package/install.js +83 -18
- package/mcp-client.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -76,12 +76,15 @@ Analyze "Hello world! This is a test." for translation to Spanish
|
|
|
76
76
|
|
|
77
77
|
## ๐ Supported AI IDEs
|
|
78
78
|
|
|
79
|
-
| IDE | Status |
|
|
80
|
-
|
|
81
|
-
| **Claude Desktop** | โ
Auto-configured | `~/Library/Application Support/Claude/
|
|
82
|
-
| **
|
|
83
|
-
| **
|
|
84
|
-
| **
|
|
79
|
+
| IDE | Status | macOS | Windows | Linux |
|
|
80
|
+
|-----|--------|-------|---------|-------|
|
|
81
|
+
| **Claude Desktop** | โ
Auto-configured | `~/Library/Application Support/Claude/` | `%APPDATA%\Claude\` | `~/.config/Claude/` |
|
|
82
|
+
| **Claude Code CLI** | โ
Auto-configured | `~/.claude.json` | `~/.claude.json` | `~/.claude.json` |
|
|
83
|
+
| **Cursor** | โ
Auto-configured | `~/.cursor/mcp_settings.json` | `~/.cursor/mcp_settings.json` | `~/.cursor/mcp_settings.json` |
|
|
84
|
+
| **VS Code** | โ
Auto-configured | `~/.vscode/mcp_settings.json` | `~/.vscode/mcp_settings.json` | `~/.vscode/mcp_settings.json` |
|
|
85
|
+
| **Codex (OpenAI)** | โ
Auto-configured | `~/.codex/mcp_settings.json` | `~/.codex/mcp_settings.json` | `~/.codex/mcp_settings.json` |
|
|
86
|
+
|
|
87
|
+
**Note:** The installer automatically detects your platform and uses the correct config paths.
|
|
85
88
|
|
|
86
89
|
## ๐ Language Support (48 Languages)
|
|
87
90
|
- **bg**: Bulgarian
|
package/install.js
CHANGED
|
@@ -12,12 +12,42 @@ import { fileURLToPath } from 'url';
|
|
|
12
12
|
|
|
13
13
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
14
14
|
|
|
15
|
+
// Helper to get platform-specific paths
|
|
16
|
+
function getClaudeDesktopPath() {
|
|
17
|
+
const platform = process.platform;
|
|
18
|
+
if (platform === 'darwin') {
|
|
19
|
+
// macOS
|
|
20
|
+
return {
|
|
21
|
+
configPath: path.join(os.homedir(), 'Library/Application Support/Claude/claude_desktop_config.json'),
|
|
22
|
+
displayPath: '~/Library/Application Support/Claude/claude_desktop_config.json'
|
|
23
|
+
};
|
|
24
|
+
} else if (platform === 'win32') {
|
|
25
|
+
// Windows
|
|
26
|
+
return {
|
|
27
|
+
configPath: path.join(os.homedir(), 'AppData/Roaming/Claude/claude_desktop_config.json'),
|
|
28
|
+
displayPath: '%APPDATA%\\Claude\\claude_desktop_config.json'
|
|
29
|
+
};
|
|
30
|
+
} else {
|
|
31
|
+
// Linux
|
|
32
|
+
return {
|
|
33
|
+
configPath: path.join(os.homedir(), '.config/Claude/claude_desktop_config.json'),
|
|
34
|
+
displayPath: '~/.config/Claude/claude_desktop_config.json'
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
15
39
|
// Supported IDE configurations
|
|
40
|
+
const claudePaths = getClaudeDesktopPath();
|
|
16
41
|
const IDE_CONFIGS = {
|
|
17
42
|
claude: {
|
|
18
43
|
name: 'Claude Desktop',
|
|
19
|
-
configPath:
|
|
20
|
-
displayPath:
|
|
44
|
+
configPath: claudePaths.configPath,
|
|
45
|
+
displayPath: claudePaths.displayPath
|
|
46
|
+
},
|
|
47
|
+
'claude-code': {
|
|
48
|
+
name: 'Claude Code CLI',
|
|
49
|
+
configPath: path.join(os.homedir(), '.claude.json'),
|
|
50
|
+
displayPath: '~/.claude.json'
|
|
21
51
|
},
|
|
22
52
|
cursor: {
|
|
23
53
|
name: 'Cursor',
|
|
@@ -28,6 +58,11 @@ const IDE_CONFIGS = {
|
|
|
28
58
|
name: 'VS Code (with MCP extension)',
|
|
29
59
|
configPath: path.join(os.homedir(), '.vscode/mcp_settings.json'),
|
|
30
60
|
displayPath: '~/.vscode/mcp_settings.json'
|
|
61
|
+
},
|
|
62
|
+
codex: {
|
|
63
|
+
name: 'Codex (OpenAI)',
|
|
64
|
+
configPath: path.join(os.homedir(), '.codex/mcp_settings.json'),
|
|
65
|
+
displayPath: '~/.codex/mcp_settings.json'
|
|
31
66
|
}
|
|
32
67
|
};
|
|
33
68
|
|
|
@@ -42,6 +77,9 @@ Features:
|
|
|
42
77
|
๐ File translation (JSON, YAML, CSV, MD, etc.)
|
|
43
78
|
๐ฐ Credit balance checking
|
|
44
79
|
๐ 48 languages supported with regional variants
|
|
80
|
+
|
|
81
|
+
๐ IMPORTANT: Get your API key at https://app.i18nagent.ai
|
|
82
|
+
(Required for the MCP client to work)
|
|
45
83
|
`);
|
|
46
84
|
|
|
47
85
|
const getMcpClientPaths = () => {
|
|
@@ -206,8 +244,10 @@ async function main() {
|
|
|
206
244
|
|
|
207
245
|
Supported IDEs:
|
|
208
246
|
- Claude Desktop (macOS)
|
|
247
|
+
- Claude Code CLI
|
|
209
248
|
- Cursor
|
|
210
249
|
- VS Code (with MCP extension)
|
|
250
|
+
- Codex (OpenAI)
|
|
211
251
|
|
|
212
252
|
Manual setup:
|
|
213
253
|
1. Create the configuration file for your IDE
|
|
@@ -225,45 +265,70 @@ For manual setup instructions, visit: https://docs.i18nagent.ai/setup
|
|
|
225
265
|
});
|
|
226
266
|
|
|
227
267
|
console.log('\n๐ Installing for all available IDEs...\n');
|
|
228
|
-
|
|
268
|
+
|
|
229
269
|
let installCount = 0;
|
|
230
|
-
|
|
270
|
+
const installedIDEs = [];
|
|
271
|
+
|
|
231
272
|
for (const ide of availableIDEs) {
|
|
232
273
|
try {
|
|
233
274
|
console.log(`โ๏ธ Configuring ${ide.name}...`);
|
|
234
|
-
|
|
235
|
-
if (ide.key === 'claude') {
|
|
275
|
+
|
|
276
|
+
if (ide.key === 'claude' || ide.key === 'claude-code') {
|
|
236
277
|
updateClaudeConfig(ide.configPath);
|
|
237
278
|
} else {
|
|
238
279
|
updateGenericMCPConfig(ide.configPath);
|
|
239
280
|
}
|
|
240
|
-
|
|
281
|
+
|
|
241
282
|
console.log(`โ
${ide.name} configured successfully!`);
|
|
242
283
|
console.log(` Config: ${ide.displayPath}\n`);
|
|
243
284
|
installCount++;
|
|
244
|
-
|
|
285
|
+
installedIDEs.push(ide);
|
|
286
|
+
|
|
245
287
|
} catch (error) {
|
|
246
288
|
console.error(`โ Failed to configure ${ide.name}: ${error.message}\n`);
|
|
247
289
|
}
|
|
248
290
|
}
|
|
249
|
-
|
|
291
|
+
|
|
250
292
|
if (installCount > 0) {
|
|
293
|
+
// Show config file paths for ONLY installed IDEs
|
|
294
|
+
const configPaths = installedIDEs.map(ide => ` - ${ide.name}: ${ide.displayPath}`).join('\n');
|
|
295
|
+
|
|
296
|
+
// Platform-specific environment variable instructions
|
|
297
|
+
const isWindows = process.platform === 'win32';
|
|
298
|
+
const envVarInstructions = isWindows
|
|
299
|
+
? ` Windows PowerShell:
|
|
300
|
+
$env:API_KEY="your-api-key-here"
|
|
301
|
+
|
|
302
|
+
Or set permanently via System Environment Variables:
|
|
303
|
+
1. Search "Environment Variables" in Windows
|
|
304
|
+
2. Click "New" under User variables
|
|
305
|
+
3. Variable name: API_KEY
|
|
306
|
+
4. Variable value: your-api-key-here`
|
|
307
|
+
: ` macOS/Linux:
|
|
308
|
+
export API_KEY=your-api-key-here
|
|
309
|
+
|
|
310
|
+
Add to shell profile for persistence (~/.bashrc, ~/.zshrc):
|
|
311
|
+
echo 'export API_KEY=your-api-key-here' >> ~/.zshrc`;
|
|
312
|
+
|
|
251
313
|
console.log(`๐ Installation complete! Configured ${installCount} IDE(s).
|
|
252
314
|
|
|
253
|
-
๐
|
|
315
|
+
๐ NEXT STEP: Add your API key
|
|
254
316
|
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
255
|
-
You need to set your API key to use the translation service:
|
|
256
|
-
|
|
257
317
|
1. Get your API key from: https://app.i18nagent.ai
|
|
258
|
-
2. Set it as an environment variable:
|
|
259
318
|
|
|
260
|
-
|
|
319
|
+
2. Add it to your config file(s):
|
|
320
|
+
${configPaths}
|
|
321
|
+
|
|
322
|
+
Open the file and add your API key to the "env" section:
|
|
323
|
+
"env": {
|
|
324
|
+
"MCP_SERVER_URL": "https://mcp.i18nagent.ai",
|
|
325
|
+
"API_KEY": "your-api-key-here" โ Add your key here
|
|
326
|
+
}
|
|
261
327
|
|
|
262
|
-
|
|
263
|
-
|
|
328
|
+
OR set as environment variable:
|
|
329
|
+
${envVarInstructions}
|
|
264
330
|
|
|
265
|
-
|
|
266
|
-
After setting the API key, restart your AI IDE to load the new configuration.
|
|
331
|
+
3. Restart your IDE to load the configuration
|
|
267
332
|
|
|
268
333
|
๐งช Test the installation
|
|
269
334
|
Try these commands in your AI IDE:
|
package/mcp-client.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Integrates with Claude Code CLI to provide translation capabilities
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
const MCP_CLIENT_VERSION = '1.8.
|
|
8
|
+
const MCP_CLIENT_VERSION = '1.8.1';
|
|
9
9
|
|
|
10
10
|
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
11
11
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@i18n-agent/mcp-client",
|
|
3
|
-
"version": "1.8.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.8.1",
|
|
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": {
|
|
7
7
|
"i18n-agent-install": "install.js"
|