@better-i18n/mcp 0.15.5 → 0.15.6
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
|
@@ -15,7 +15,7 @@ MCP (Model Context Protocol) server for [Better i18n](https://better-i18n.com).
|
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
17
|
# With npx (no install needed)
|
|
18
|
-
npx @better-i18n/mcp
|
|
18
|
+
npx -y @better-i18n/mcp@latest
|
|
19
19
|
|
|
20
20
|
# Or install globally
|
|
21
21
|
npm install -g @better-i18n/mcp
|
|
@@ -43,7 +43,9 @@ export const i18n = createI18n({
|
|
|
43
43
|
|
|
44
44
|
The AI assistant will read this file to get the `project` value and include it in all tool calls.
|
|
45
45
|
|
|
46
|
-
### 3. Configure
|
|
46
|
+
### 3. Configure Your AI Client
|
|
47
|
+
|
|
48
|
+
#### Cursor
|
|
47
49
|
|
|
48
50
|
Add to `~/.cursor/mcp.json`:
|
|
49
51
|
|
|
@@ -52,7 +54,43 @@ Add to `~/.cursor/mcp.json`:
|
|
|
52
54
|
"mcpServers": {
|
|
53
55
|
"better-i18n": {
|
|
54
56
|
"command": "npx",
|
|
55
|
-
"args": ["@better-i18n/mcp"],
|
|
57
|
+
"args": ["-y", "@better-i18n/mcp@latest"],
|
|
58
|
+
"env": {
|
|
59
|
+
"BETTER_I18N_API_KEY": "your-api-key-here"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
#### Claude Desktop
|
|
67
|
+
|
|
68
|
+
Add to `claude_desktop_config.json`:
|
|
69
|
+
|
|
70
|
+
```json
|
|
71
|
+
{
|
|
72
|
+
"mcpServers": {
|
|
73
|
+
"better-i18n": {
|
|
74
|
+
"command": "npx",
|
|
75
|
+
"args": ["-y", "@better-i18n/mcp@latest"],
|
|
76
|
+
"env": {
|
|
77
|
+
"BETTER_I18N_API_KEY": "your-api-key-here"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
#### Claude Code
|
|
85
|
+
|
|
86
|
+
Add to `.claude/settings.json` or `~/.claude/settings.json`:
|
|
87
|
+
|
|
88
|
+
```json
|
|
89
|
+
{
|
|
90
|
+
"mcpServers": {
|
|
91
|
+
"better-i18n": {
|
|
92
|
+
"command": "npx",
|
|
93
|
+
"args": ["-y", "@better-i18n/mcp@latest"],
|
|
56
94
|
"env": {
|
|
57
95
|
"BETTER_I18N_API_KEY": "your-api-key-here"
|
|
58
96
|
}
|
|
@@ -7,9 +7,15 @@
|
|
|
7
7
|
* USE THIS when you need actual translation text (to translate, review, or update).
|
|
8
8
|
* Use listKeys instead for browsing/exploring keys — it's faster and uses fewer tokens.
|
|
9
9
|
*
|
|
10
|
-
* SEARCH
|
|
11
|
-
* - search
|
|
12
|
-
*
|
|
10
|
+
* SEARCH BEHAVIOR:
|
|
11
|
+
* - search WITHOUT languages: searches key names, source text, AND all translation texts across every language.
|
|
12
|
+
* Use this when you don't know which language the text is in (e.g., user mentions text they saw on screen).
|
|
13
|
+
* - search WITH languages: searches key names, source text (if source language included), AND translations
|
|
14
|
+
* only in the specified languages. Faster and more targeted.
|
|
15
|
+
* - Without search: returns all keys (filtered by other params).
|
|
16
|
+
*
|
|
17
|
+
* FILTER PARAMETERS:
|
|
18
|
+
* - languages: Languages to search in AND return translations for
|
|
13
19
|
* - status: Filter by translation status ("missing", "draft", "published", "all")
|
|
14
20
|
* - namespaces: Filter by namespace(s)
|
|
15
21
|
* - keys: Fetch specific keys by exact name
|
|
@@ -21,9 +27,10 @@
|
|
|
21
27
|
* - hasMore: true when total > limit — use narrower filters to get specific keys
|
|
22
28
|
*
|
|
23
29
|
* EXAMPLES:
|
|
30
|
+
* - Find text in ANY language: { project: "org/project", search: "Mehmet" }
|
|
24
31
|
* - Find "login" in source: { project: "org/project", search: "login" }
|
|
25
32
|
* - Multi-term search: { project: "org/project", search: ["login", "signup", "forgot_password"] }
|
|
26
|
-
* - Find "Giriş" in Turkish: { project: "org/project", search: "Giriş", languages: ["tr"] }
|
|
33
|
+
* - Find "Giriş" in Turkish (faster): { project: "org/project", search: "Giriş", languages: ["tr"] }
|
|
27
34
|
* - Get all Turkish translations: { project: "org/project", languages: ["tr"] }
|
|
28
35
|
* - Get missing Turkish: { project: "org/project", languages: ["tr"], status: "missing" }
|
|
29
36
|
* - Get specific keys: { project: "org/project", keys: ["auth.login.title", "auth.login.button"] }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getTranslations.d.ts","sourceRoot":"","sources":["../../src/tools/getTranslations.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"getTranslations.d.ts","sourceRoot":"","sources":["../../src/tools/getTranslations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AASH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAW9C,eAAO,MAAM,eAAe,EAAE,IAmG7B,CAAC"}
|
|
@@ -7,9 +7,15 @@
|
|
|
7
7
|
* USE THIS when you need actual translation text (to translate, review, or update).
|
|
8
8
|
* Use listKeys instead for browsing/exploring keys — it's faster and uses fewer tokens.
|
|
9
9
|
*
|
|
10
|
-
* SEARCH
|
|
11
|
-
* - search
|
|
12
|
-
*
|
|
10
|
+
* SEARCH BEHAVIOR:
|
|
11
|
+
* - search WITHOUT languages: searches key names, source text, AND all translation texts across every language.
|
|
12
|
+
* Use this when you don't know which language the text is in (e.g., user mentions text they saw on screen).
|
|
13
|
+
* - search WITH languages: searches key names, source text (if source language included), AND translations
|
|
14
|
+
* only in the specified languages. Faster and more targeted.
|
|
15
|
+
* - Without search: returns all keys (filtered by other params).
|
|
16
|
+
*
|
|
17
|
+
* FILTER PARAMETERS:
|
|
18
|
+
* - languages: Languages to search in AND return translations for
|
|
13
19
|
* - status: Filter by translation status ("missing", "draft", "published", "all")
|
|
14
20
|
* - namespaces: Filter by namespace(s)
|
|
15
21
|
* - keys: Fetch specific keys by exact name
|
|
@@ -21,9 +27,10 @@
|
|
|
21
27
|
* - hasMore: true when total > limit — use narrower filters to get specific keys
|
|
22
28
|
*
|
|
23
29
|
* EXAMPLES:
|
|
30
|
+
* - Find text in ANY language: { project: "org/project", search: "Mehmet" }
|
|
24
31
|
* - Find "login" in source: { project: "org/project", search: "login" }
|
|
25
32
|
* - Multi-term search: { project: "org/project", search: ["login", "signup", "forgot_password"] }
|
|
26
|
-
* - Find "Giriş" in Turkish: { project: "org/project", search: "Giriş", languages: ["tr"] }
|
|
33
|
+
* - Find "Giriş" in Turkish (faster): { project: "org/project", search: "Giriş", languages: ["tr"] }
|
|
27
34
|
* - Get all Turkish translations: { project: "org/project", languages: ["tr"] }
|
|
28
35
|
* - Get missing Turkish: { project: "org/project", languages: ["tr"], status: "missing" }
|
|
29
36
|
* - Get specific keys: { project: "org/project", keys: ["auth.login.title", "auth.login.button"] }
|
|
@@ -50,8 +57,13 @@ IMPORTANT: status filter REQUIRES languages parameter.
|
|
|
50
57
|
{ status: "missing" } alone returns ALL keys (filter silently ignored).
|
|
51
58
|
Always pair: { languages: ["hr"], status: "missing" }
|
|
52
59
|
|
|
53
|
-
SEARCH
|
|
54
|
-
- search
|
|
60
|
+
SEARCH BEHAVIOR:
|
|
61
|
+
- search WITHOUT languages: searches key names, source text, AND all translations across every language.
|
|
62
|
+
Use this when you don't know which language the text is in.
|
|
63
|
+
- search WITH languages: searches only in specified languages (faster, more targeted).
|
|
64
|
+
Use this when you know the language of the text you're looking for.
|
|
65
|
+
|
|
66
|
+
FILTER PARAMETERS:
|
|
55
67
|
- languages: Languages to search in AND return translations for
|
|
56
68
|
- status: Filter by translation status ("missing", "draft", "published", "all")
|
|
57
69
|
- namespaces: Filter by namespace(s)
|
|
@@ -64,9 +76,10 @@ RESPONSE METADATA:
|
|
|
64
76
|
- hasMore: true when total > limit — narrow your filters to get specific results
|
|
65
77
|
|
|
66
78
|
EXAMPLES:
|
|
79
|
+
- Find text in ANY language: { search: "Mehmet" }
|
|
67
80
|
- Find "login" in source: { search: "login" }
|
|
68
81
|
- Multi-term search: { search: ["login", "signup", "forgot_password"] }
|
|
69
|
-
- Find "Giriş" in Turkish: { search: "Giriş", languages: ["tr"] }
|
|
82
|
+
- Find "Giriş" in Turkish (faster): { search: "Giriş", languages: ["tr"] }
|
|
70
83
|
- Get all Turkish translations: { languages: ["tr"] }
|
|
71
84
|
- Get missing Turkish translations: { languages: ["tr"], status: "missing" }
|
|
72
85
|
- Get specific keys: { keys: ["auth.login.title", "auth.login.button"] }
|
|
@@ -78,7 +91,7 @@ Response includes namespaceDetails: a map of namespace metadata (name, keyCount,
|
|
|
78
91
|
...projectInputProperty,
|
|
79
92
|
search: {
|
|
80
93
|
type: "string",
|
|
81
|
-
description: "Text to search for
|
|
94
|
+
description: "Text to search for (case-insensitive). Single string or array of strings for multi-term OR search. Searches key names + source text always. Without languages: also searches ALL translation texts across every language. With languages: searches only in those languages (faster).",
|
|
82
95
|
},
|
|
83
96
|
languages: {
|
|
84
97
|
type: "array",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getTranslations.js","sourceRoot":"","sources":["../../src/tools/getTranslations.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"getTranslations.js","sourceRoot":"","sources":["../../src/tools/getTranslations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,WAAW,EACX,oBAAoB,EACpB,aAAa,EACb,OAAO,GACR,MAAM,iBAAiB,CAAC;AAGzB,MAAM,WAAW,GAAG,aAAa,CAAC,MAAM,CAAC;IACvC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,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OAAO;oBACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBACzB,WAAW,EAAE,mCAAmC;iBACjD;gBACD,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,WAAW,EAAE,KAAK,CAAC;oBAC9C,WAAW,EACT,8HAA8H;iBACjI;gBACD,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,iKAAiK;iBACpK;aACF;YACD,QAAQ,EAAE,CAAC,SAAS,CAAC;SACtB;KACF;IAED,OAAO,EAAE,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE,CACxB,WAAW,CACT,IAAI,EACJ,WAAW,EACX,KAAK,EAAE,KAAK,EAAE,EAAE,WAAW,EAAE,WAAW,EAAE,EAAE,EAAE;QAC5C,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,kBAAkB,CAAC,KAAK,CAAC;YACvD,OAAO,EAAE,WAAW;YACpB,WAAW;YACX,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,SAAS,EAAE,KAAK,CAAC,SAAS;YAC1B,UAAU,EAAE,KAAK,CAAC,UAAU;YAC5B,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,KAAK,EAAE,KAAK,CAAC,KAAK;SACnB,CAAC,CAAC;QACH,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC;IACzB,CAAC,CACF;CACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@better-i18n/mcp",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.6",
|
|
4
4
|
"description": "MCP server for Better i18n translation management - AI-powered translation workflow for Cursor, Claude, and other AI assistants",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -50,12 +50,12 @@
|
|
|
50
50
|
"prepublishOnly": "npm run clean && npm run build && chmod +x ./dist/index.js ./dist/http.js"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@better-i18n/mcp-types": "0.0.0",
|
|
54
53
|
"@modelcontextprotocol/sdk": "^1.25.3",
|
|
55
54
|
"@trpc/client": "^11.0.0",
|
|
56
55
|
"zod": "^3.25.1"
|
|
57
56
|
},
|
|
58
57
|
"devDependencies": {
|
|
58
|
+
"@better-i18n/mcp-types": "0.0.0",
|
|
59
59
|
"@types/node": "^20.0.0",
|
|
60
60
|
"typescript": "~5.9.2"
|
|
61
61
|
},
|