@i18n-agent/mcp-client 1.8.237 → 1.8.239

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
@@ -211,6 +211,12 @@ Create `.cursor/mcp_settings.json` or `.vscode/mcp_settings.json`:
211
211
  - **Monitoring**: Check balance before large translations
212
212
  - **Estimates**: Get word count estimates before translation
213
213
 
214
+ ### Quality Warnings
215
+ - **Source Analysis**: By default, source content is analyzed for quality issues before translation
216
+ - **Skip Warnings**: Use `skipWarnings: true` to bypass warnings in automated workflows
217
+ - **Trade-off**: Skipping warnings may reduce translation quality as potential issues aren't addressed
218
+ - **Best Practice**: Keep warnings enabled (default) for production translations
219
+
214
220
  ## 🚨 Troubleshooting
215
221
 
216
222
  ### Installation Issues
@@ -349,6 +355,7 @@ Translate text content with cultural adaptation and context awareness.
349
355
  - `namespace` (string, optional): Optional namespace identifier for backend tracking and project organization
350
356
  - `sourceLanguage` (string, optional): Source language (auto-detected if not provided)
351
357
  - `region` (string, optional): Specific region for localization
358
+ - `skipWarnings` (boolean, optional): Skip source text quality warnings (default: false). ⚠️ WARNING: May hurt translation quality by bypassing source analysis. Only use when confident about content quality or in automated workflows.
352
359
 
353
360
  ### translate_file
354
361
  Translate files while preserving structure and format.
@@ -360,6 +367,7 @@ Translate files while preserving structure and format.
360
367
  - `namespace` (string, **required**): Unique namespace identifier for backend tracking and project organization
361
368
  - `preserveKeys` (boolean): Whether to preserve object keys/structure
362
369
  - `outputFormat` (string): Output format (same, json, yaml, txt)
370
+ - `skipWarnings` (boolean, optional): Skip source text quality warnings (default: false). ⚠️ WARNING: May hurt translation quality by bypassing source analysis. Only use when confident about content quality or in automated workflows.
363
371
 
364
372
  ### analyze_content
365
373
  Analyze content for translation readiness and get improvement suggestions before translation. This helps identify potential issues and optimize content before spending credits on translation.
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.19';
8
+ const MCP_CLIENT_VERSION = '1.8.239';
9
9
 
10
10
  import { Server } from '@modelcontextprotocol/sdk/server/index.js';
11
11
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
@@ -118,6 +118,11 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
118
118
  type: 'string',
119
119
  description: 'Optional namespace identifier for backend tracking and project organization (recommended for file-based workflows)',
120
120
  },
121
+ skipWarnings: {
122
+ type: 'boolean',
123
+ description: '⚠️ Skip source text quality warnings and proceed with translation (default: false). WARNING: Enabling this may hurt translation quality as it bypasses source file analysis that identifies potential issues. Only use when you are confident about your source content quality or in automated workflows where warnings would block progress.',
124
+ default: false,
125
+ },
121
126
  },
122
127
  required: ['texts', 'targetLanguages'],
123
128
  },
@@ -229,6 +234,11 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
229
234
  type: 'string',
230
235
  description: 'Unique namespace identifier for backend tracking and project organization (required for production use)',
231
236
  },
237
+ skipWarnings: {
238
+ type: 'boolean',
239
+ description: '⚠️ Skip source text quality warnings and proceed with translation (default: false). WARNING: Enabling this may hurt translation quality as it bypasses source file analysis that identifies potential issues. Only use when you are confident about your source content quality or in automated workflows where warnings would block progress.',
240
+ default: false,
241
+ },
232
242
  },
233
243
  required: ['targetLanguages', 'namespace'],
234
244
  },
@@ -445,7 +455,7 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
445
455
  });
446
456
 
447
457
  async function handleTranslateText(args) {
448
- const { texts, targetLanguages: rawTargetLanguages, sourceLanguage, targetAudience = 'general', industry = 'technology', region, context, pseudoTranslation, pseudoOptions, namespace } = args;
458
+ const { texts, targetLanguages: rawTargetLanguages, sourceLanguage, targetAudience = 'general', industry = 'technology', region, context, pseudoTranslation, pseudoOptions, namespace, skipWarnings = false } = args;
449
459
 
450
460
  if (!texts || !Array.isArray(texts) || texts.length === 0) {
451
461
  throw new Error('texts must be a non-empty array');
@@ -494,6 +504,7 @@ async function handleTranslateText(args) {
494
504
  pseudoTranslation: pseudoTranslation,
495
505
  pseudoOptions: pseudoOptions,
496
506
  namespace: namespace,
507
+ skipWarnings: skipWarnings,
497
508
  }
498
509
  }
499
510
  };
@@ -761,7 +772,8 @@ async function handleTranslateFile(args) {
761
772
  context,
762
773
  pseudoTranslation,
763
774
  pseudoOptions,
764
- namespace
775
+ namespace,
776
+ skipWarnings = false
765
777
  } = args;
766
778
 
767
779
  if (!filePath && !fileContent) {
@@ -842,6 +854,7 @@ async function handleTranslateFile(args) {
842
854
  if (context !== undefined) requestArgs.context = context;
843
855
  if (pseudoTranslation !== undefined) requestArgs.pseudoTranslation = pseudoTranslation;
844
856
  if (pseudoOptions !== undefined) requestArgs.pseudoOptions = pseudoOptions;
857
+ if (skipWarnings !== undefined) requestArgs.skipWarnings = skipWarnings;
845
858
 
846
859
  // Use MCP JSON-RPC protocol for translate_file
847
860
  const mcpRequest = {
@@ -1747,11 +1760,11 @@ async function handleDownloadTranslations(args) {
1747
1760
  // Case 1: S3 Storage - download files from presigned URLs
1748
1761
  console.error(`📥 Downloading ${Object.keys(parsedResult.downloadUrls).length} translation files from S3...`);
1749
1762
 
1750
- for (const [language, urlInfo] of Object.entries(parsedResult.downloadUrls)) {
1763
+ for (const [language, downloadUrl] of Object.entries(parsedResult.downloadUrls)) {
1751
1764
  try {
1752
1765
  console.error(`📥 Downloading ${language}...`);
1753
1766
 
1754
- const fileResponse = await axios.get(urlInfo.url, {
1767
+ const fileResponse = await axios.get(downloadUrl, {
1755
1768
  responseType: 'text',
1756
1769
  timeout: 60000, // 1 minute per file
1757
1770
  headers: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@i18n-agent/mcp-client",
3
- "version": "1.8.237",
3
+ "version": "1.8.239",
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": {