@i18n-agent/mcp-client 1.5.0 → 1.6.0
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/mcp-client.js +23 -7
- package/package.json +1 -1
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
|
+
const MCP_CLIENT_VERSION = '1.6.0';
|
|
9
9
|
|
|
10
10
|
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
11
11
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
@@ -47,7 +47,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
47
47
|
tools: [
|
|
48
48
|
{
|
|
49
49
|
name: 'translate_text',
|
|
50
|
-
description: 'Translate text content with cultural adaptation using AI subagents. For large requests (>100 texts or >50,000 characters), returns a jobId for async processing. Use check_translation_status to monitor progress and download results.',
|
|
50
|
+
description: 'Translate text content with cultural adaptation using AI subagents. Supports both single and multi-language translation. For large requests (>100 texts or >50,000 characters), returns a jobId for async processing. Use check_translation_status to monitor progress and download results.',
|
|
51
51
|
inputSchema: {
|
|
52
52
|
type: 'object',
|
|
53
53
|
properties: {
|
|
@@ -58,7 +58,12 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
58
58
|
},
|
|
59
59
|
targetLanguage: {
|
|
60
60
|
type: 'string',
|
|
61
|
-
description: 'Target language code (e.g., "es", "fr", "zh-CN")',
|
|
61
|
+
description: 'Target language code (e.g., "es", "fr", "zh-CN") - for single language translation',
|
|
62
|
+
},
|
|
63
|
+
targetLanguages: {
|
|
64
|
+
type: 'array',
|
|
65
|
+
items: { type: 'string' },
|
|
66
|
+
description: 'Array of target language codes (e.g., ["es", "fr", "zh-CN"]) - for multi-language translation',
|
|
62
67
|
},
|
|
63
68
|
sourceLanguage: {
|
|
64
69
|
type: 'string',
|
|
@@ -81,7 +86,10 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
81
86
|
description: 'Optional additional context or instructions for the translation (e.g., "Keep technical terms in English", "Use formal tone")',
|
|
82
87
|
},
|
|
83
88
|
},
|
|
84
|
-
|
|
89
|
+
anyOf: [
|
|
90
|
+
{ required: ['texts', 'targetLanguage'] },
|
|
91
|
+
{ required: ['texts', 'targetLanguages'] }
|
|
92
|
+
],
|
|
85
93
|
},
|
|
86
94
|
},
|
|
87
95
|
{
|
|
@@ -100,7 +108,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
100
108
|
},
|
|
101
109
|
{
|
|
102
110
|
name: 'translate_file',
|
|
103
|
-
description: 'Translate file content while preserving structure and format. Supports JSON, YAML, XML, CSV, TXT, MD, and other text files. For large files (>100KB), returns a jobId for async processing. Use check_translation_status to monitor progress and download results.',
|
|
111
|
+
description: 'Translate file content while preserving structure and format. Supports both single and multi-language translation. Supports JSON, YAML, XML, CSV, TXT, MD, and other text files. For large files (>100KB), returns a jobId for async processing. Use check_translation_status to monitor progress and download results.',
|
|
104
112
|
inputSchema: {
|
|
105
113
|
type: 'object',
|
|
106
114
|
properties: {
|
|
@@ -120,7 +128,12 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
120
128
|
},
|
|
121
129
|
targetLanguage: {
|
|
122
130
|
type: 'string',
|
|
123
|
-
description: 'Target language code or name',
|
|
131
|
+
description: 'Target language code or name - for single language translation',
|
|
132
|
+
},
|
|
133
|
+
targetLanguages: {
|
|
134
|
+
type: 'array',
|
|
135
|
+
items: { type: 'string' },
|
|
136
|
+
description: 'Array of target language codes (e.g., ["es", "fr", "zh-CN"]) - for multi-language translation',
|
|
124
137
|
},
|
|
125
138
|
targetAudience: {
|
|
126
139
|
type: 'string',
|
|
@@ -155,7 +168,10 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
155
168
|
description: 'Optional additional context or instructions for the translation (e.g., "Keep technical terms in English", "Use formal tone")',
|
|
156
169
|
},
|
|
157
170
|
},
|
|
158
|
-
|
|
171
|
+
anyOf: [
|
|
172
|
+
{ required: ['targetLanguage'] },
|
|
173
|
+
{ required: ['targetLanguages'] }
|
|
174
|
+
],
|
|
159
175
|
},
|
|
160
176
|
},
|
|
161
177
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@i18n-agent/mcp-client",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "MCP client for i18n-agent translation service with async job support and enhanced progress tracking - supports Claude, Cursor, VS Code, and other AI IDEs",
|
|
5
5
|
"main": "mcp-client.js",
|
|
6
6
|
"bin": {
|