Logo di i18n MCP 服务器

i18n MCP 服务器

Community
dalisys

MCP server for managing i18n translation files. This server enables LLMs to intelligently manage translations, analyze code for hardcoded strings, and maintain consistency across multiple language files with real-time file watching and advanced search capabilities.

Pubblicato dadalisys
Repositoryi18n-mcp
LinguaTypeScript
Fork
2
Stelle
12
Strumenti disponibili
0
Tipo di trasportostdio
Categorie
Link
  • Collega gli strumenti ai flussi di lavoro IA

    i18n MCP 服务器 mette a disposizione funzionalità MCP utilizzabili da client e agenti IA compatibili.

  • Strumenti disponibili: 0

    Esplora le azioni richiamabili qui sotto, con nomi e descrizioni se il server li fornisce.

  • Configurazione pronta da copiare

    Usa gli esempi di installazione per configurare questo server nel tuo client MCP preferito.

  • Indicatori di interesse della comunità open source

    Stelle: 12; fork: 2 (repository collegato).

i18n MCP Server

A MCP server for managing internationalization (i18n) translation files. This server enables LLMs to intelligently manage translations, analyze code for hardcoded strings, and maintain consistency across multiple language files with real-time file watching and advanced search capabilities.

Available Tools

The server provides a comprehensive suite of tools for managing translations, categorized by function.

Translation Search & Exploration

  • search_translation: Search for translations by content or key patterns. Supports bulk search and advanced filtering.
  • get_translation_suggestions: Get autocomplete suggestions for translation keys.
  • get_translation_context: Get hierarchical context for a specific translation key.
  • explore_translation_structure: Explore the hierarchical structure of translation files to understand key organization.

Translation Management

  • add_translations: Add new translations with key generation and conflict handling.
  • add_contextual_translation: Add a translation with a context-aware key.
  • update_translation: Update existing translations or perform batch updates.
  • delete_translation: Safely delete single or multiple translation keys with dependency checking.

Codebase Analysis

  • analyze_codebase: Analyze the codebase for hardcoded strings.
  • search_missing_translations: Find translation keys that are used in the code but not defined in translation files (and vice-versa).
  • extract_to_translation: Extract a hardcoded string from a file and replace it with a translation key.
  • cleanup_unused_translations: Remove unused translation keys that are not referenced in the codebase.

File & Structure Management

  • validate_structure: Validate that all translation files have a consistent structure with the base language.
  • check_translation_integrity: Check for integrity issues like missing or extra keys and type mismatches across all files.
  • reorganize_translation_files: Reorganize and format translation files to match the base language structure, with options for sorting and backups.

Utilities

  • generate_types: Generate TypeScript types for all translation keys.
  • get_stats: Get server and translation index statistics.

Quick Start

Use via npx (no clone needed):

bash
npx -y i18n-mcp --dir ./locales --project-root /path/to/your/project

Clone and build the project:

bash
git clone https://github.com/dalisys/i18n-mcp.git
cd i18n-mcp
npm install
npm run build

Configuration

Configure for Claude Desktop

Add to your Claude Desktop configuration:

Basic Configuration

json
{
  "mcpServers": {
    "i18n": {
      "command": "npx", // or "C:\\path\\to\\nvm\\node.exe" or mac "/Users/userName/.volta/bin/npx"
      "args": ["-y", "i18n-mcp", "--dir", "/User/project/locales", "--project-root", "/User/project"]
    }
  }
}

windows

json
{
  "mcpServers": {
    "i18n": {
      "command": "npx",
      "args": [
        "-y",
        "i18n-mcp",
        "--dir",
        "D:\\path\\to_your_project\\locales",
        "--project-root",
        "D:\\path\\to_your_project"
      ]
    }
  }
}

Advanced Configuration

json
{
  "mcpServers": {
    "i18n": {
      "command": "npx",
      "args": [
        "-y",
        "i18n-mcp",
        "--dir", "./locales",
        "--base-language", "en",
        "--src-dir", "./src",
        "--project-root", "/path/to/your/project",
        "--exclude", "node_modules,dist",
        "--generate-types", "./src/types/i18n.ts",
        "--frameworks", "react,vue",
        "--key-style", "nested",
        "--debug"
      ]
    }
  }
}

Using Environment Variables

json
{
  "mcpServers": {
    "i18n": {
      "command": "npx",
      "args": ["-y", "i18n-mcp"],
      "env": {
        "I18N_MCP_DIR": "./locales",
        "I18N_MCP_BASE_LANGUAGE": "en",
        "I18N_MCP_SRC_DIR": "./src",
        "I18N_MCP_PROJECT_ROOT": "/path/to/your/project",
        "I18N_MCP_DEBUG": "true",
        "I18N_MCP_AUTO_SYNC": "true",
        "I18N_MCP_FRAMEWORKS": "react,vue"
      }
    }
  }
}

Configure for IDE

Add the following to your IDE (vscode, cursor):

Node.js Installation

json
{

      "i18n": {
        "command": "npx",
        "args": ["-y", "i18n-mcp", "--dir", "/User/project/locales", "--project-root", "/User/project"]
      }

}

Configure for Zed

Add to your Zed settings.json:

json
"context_servers": {
  "i18n": {
    "command": "npx",
    "args": ["-y", "i18n-mcp", "--dir", "./locales", "--project-root", "/path/to/your/project"]
  }
}

Configuration Options

Command Line Arguments

ArgumentTypeDefaultDescription
--dir -dstring./localesTranslation files directory
--base-language -bstringenBase language for structure template
--src-dirstring-Source code directory for analysis
--project-rootstring-Project root directory for resolving relative paths
--excludestring-Exclude patterns (comma-separated)
--auto-syncbooleanfalseAuto-sync changes back to files
--generate-typesstring-Generate TypeScript types file path
--frameworksstring-Framework analysis (react,vue,svelte,angular)
--key-stylestringnestedKey naming style (nested, flat, camelCase, kebab-case)
--debugbooleanfalseEnable debug logging

Environment Variables

VariableDescription
I18N_MCP_DIRTranslation files directory
I18N_MCP_BASE_LANGUAGEBase language for structure template
I18N_MCP_SRC_DIRSource code directory for analysis
I18N_MCP_PROJECT_ROOTProject root directory for resolving relative paths
I18N_MCP_AUTO_SYNCAuto-sync mode (true/false)
I18N_MCP_FRAMEWORKSSupported frameworks (comma-separated)
I18N_MCP_DEBUGEnable debug mode (true/false)

Path Resolution

The i18n MCP server handles both relative and absolute paths intelligently:

How Path Resolution Works

  1. Absolute paths (e.g., /Users/user/project/src) → Used as-is
  2. Relative paths (e.g., app, ./src, components) → Resolved relative to --project-root
  3. No path specified → Uses configured --src-dir as default

Examples

With configuration:

bash
--project-root /Users/user/project
--src-dir /Users/user/project/src
Input srcDirResolved PathDescription
"app"/Users/user/project/appRelative to project root
"./src"/Users/user/project/srcRelative to project root
"components"/Users/user/project/componentsRelative to project root
"/absolute/path"/absolute/pathAbsolute path used as-is
undefined/Users/user/project/srcUses configured --src-dir

Error Handling

The server provides detailed error messages when paths cannot be resolved:

json
{
  "error": "Source directory resolution failed",
  "details": "Directory not found: /Users/user/project/nonexistent",
  "providedPath": "nonexistent",
  "resolvedPath": "/Users/user/project/nonexistent",
  "pathDescription": "relative to project root (nonexistent → /Users/user/project/nonexistent)",
  "suggestion": "Check that the path exists and is accessible"
}

Development Workflow Examples

  1. Find missing translations: "What translations are missing in Spanish?"
  2. Extract hardcoded strings: "Find all hardcoded strings in my React components"
  3. Add contextual translation: "Add a translation for 'Save' in the user profile context"
  4. Validate consistency: "Check if all language files have the same structure"
  5. Generate types: "Generate TypeScript types for my translation keys"

Testing

Run the test suite:

bash
npm test

Build

bash
npm run build

Installazione

TypingMind
Prerequisiti:

Node.js 18+

{
  "mcpServers": {
    "dalisys-i18n-mcp": {
      "command": "",
      "args": []
    }
  }
}

Usa i18n MCP 服务器 MCP con più modelli AI

TypingMind collega gli strumenti MCP a livello di area di lavoro: una volta connesso i18n MCP 服务器, puoi usarlo con diversi modelli IA in TypingMind, senza configurarlo separatamente per ogni modello. Questa integrazione MCP viene eseguita localmente sul tuo dispositivo tramite il connettore MCP di TypingMind.

Guida alla configurazione del connettore locale

Usa questo metodo quando il server MCP deve accedere a file locali, app o risorse private sul tuo computer.

1

Apri le impostazioni MCP

In TypingMind, vai su Impostazioni, Impostazioni avanzate, poi su Model Context Protocol e scegli Configura connettore.

  1. Apri TypingMind nel tuo browser.
  2. Fai clic sull'icona Impostazioni.
  3. Vai a Impostazioni avanzate.
  4. Apri la sezione Model Context Protocol.
  5. Fai clic su Configura connettore e scegli Questo dispositivo.
Schermata di configurazione del connettore MCP di TypingMind con l’opzione «Questo dispositivo» selezionata
2

Esegui il comando del connettore

Scegli Questo dispositivo, copia il comando da TypingMind ed eseguilo nel terminale. Lascia il processo in esecuzione mentre usi MCP.

  1. Copia il comando di configurazione mostrato da TypingMind.
  2. Apri Terminale su macOS o Windows Terminal su Windows.
  3. Incolla ed esegui il comando.
  4. Conferma l'installazione del pacchetto se il terminale ti chiede di procedere.
  5. Tieni aperta la finestra del terminale con il processo in esecuzione mentre usi gli strumenti MCP.
3

Aggiungi i18n MCP 服务器 come server

Quando lo stato del connettore è Pronto, fai clic su Modifica server e incolla la configurazione del server MCP.

  1. Attendi che lo stato del connettore sia Pronto.
  2. Fai clic su Modifica server.
  3. Incolla la configurazione del server MCP di i18n MCP 服务器.
  4. Salva l'elenco dei server.
  5. Se vuoi verificare che il connettore sia ancora pronto, aggiorna la pagina.
Impostazioni MCP di TypingMind con un server attivo e il pulsante Modifica server
{
  "mcpServers": {
    "dalisys-i18n-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "i18n-mcp"
      ]
    }
  }
}
4

Usa la connessione con diversi modelli

Salva l'elenco dei server, apri Plugin, abilita gli strumenti MCP di i18n MCP 服务器, poi seleziona un modello IA supportato in TypingMind e usa gli strumenti in chat o assegnali a un agente IA.

  1. Apri la pagina Plugin in TypingMind.
  2. Abilita gli strumenti MCP di i18n MCP 服务器.
  3. Avvia una chat e scegli il modello IA che vuoi usare.
  4. Usa gli strumenti MCP in chat o assegnali a un agente IA.
  5. Passa a un altro modello IA quando serve, senza riconnettere MCP.
Chat di TypingMind che usa gli strumenti MCP abilitati con un modello IA selezionato
Puoi usare i18n MCP 服务器 per aiutarmi con questa attività?
i18n MCP 服务器
Certo. L’ho letto.
Ecco cosa ho trovato con i18n MCP 服务器.

Domande frequenti

A cosa serve il server MCP i18n MCP 服务器?

i18n MCP 服务器 è un server MCP che consente ai client IA compatibili di accedere a strumenti e informazioni di contesto esterni. In TypingMind puoi aggiungere questo server MCP una sola volta e rendere disponibili i suoi strumenti nella tua area di lavoro IA.

Posso usare il server MCP i18n MCP 服务器 con più modelli IA in TypingMind?

Sì. TypingMind collega gli strumenti MCP a livello di area di lavoro, quindi puoi usare i18n MCP 服务器 con diversi modelli IA come Claude, ChatGPT, Gemini o altri modelli che hai configurato in TypingMind, senza dover configurare il server MCP separatamente per ogni modello.

Perché usare il connettore MCP i18n MCP 服务器 con TypingMind?

TypingMind è una delle migliori interfacce per chattare con gli LLM perché riunisce più modelli IA, prompt, plugin, agenti IA, chiavi API e strumenti MCP in un'unica area di lavoro. Collegando i18n MCP 服务器, puoi usare i suoi strumenti MCP con i tuoi modelli preferiti e mantenere organizzato il tuo flusso di lavoro in chat su TypingMind.

Come collego il server MCP i18n MCP 服务器 a TypingMind?

i18n MCP 服务器 funziona tramite il connettore MCP locale di TypingMind. È la soluzione ideale quando il server MCP deve accedere a file locali, app desktop, strumenti da riga di comando o risorse private sul tuo computer.

Quali strumenti offre il server MCP i18n MCP 服务器 in TypingMind?

i18n MCP 服务器 mette a disposizione funzionalità MCP che puoi attivare dalla pagina Plugin di TypingMind e usare in chat o assegnare agli agenti IA.

Devo condividere le mie chiavi API con TypingMind per usare il server MCP i18n MCP 服务器?

No. TypingMind privilegia il funzionamento in locale e ti permette di mantenere il controllo su fornitori di modelli, chiavi API, prompt e configurazione MCP. Se i18n MCP 服务器 richiede l'autenticazione, aggiungi le intestazioni, le impostazioni OAuth o la configurazione locale necessarie per quel server MCP quando crei la connessione.

Server MCP correlati

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇