Logo: i18n MCP 服务器

i18n MCP 服务器

Communautéit
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.

Editeurdalisys
Repositoryi18n-mcp
SproochTypeScript
Forks
2
Stären
12
Disponibel Tools
0
Transporttypstdio
Kategorien
Linken
  • Tools mat KI-Workflows verbannen

    i18n MCP 服务器 bitt MCP-Funktiounen un, déi vu kompatibele KI-Clienten a KI-Agente kënne benotzt ginn.

  • Disponibel Tools: 0

    Kuckt Iech déi opruffbar Aktiounen hei drënner un, mat Nimm a Beschreiwungen, wa se vum Server geliwwert ginn.

  • Konfiguratioun fir ze kopéieren

    Benotzt d'Installatiounsbeispiller, fir dëse Server an deem MCP-Client ze konfiguréieren, deen Dir am léifste benotzt.

  • Interessi vun der Communautéit um Open-Source-Projet

    Zuele vum verlinkte Repository – Stären: 12, Forks: 2.

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

Installatioun

TypingMind
Viraussetzungen:

Node.js 18+

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

i18n MCP 服务器 MCP mat verschiddene KI-Modeller benotzen

TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Soubal i18n MCP 服务器 verbonnen ass, kënnt Dir et mat verschiddene KI-Modeller an TypingMind benotzen, amplaz et fir all Modell separat anzeriichten. Dës MCP-Integratioun leeft lokal iwwer den TypingMind-MCP-Connector op Ärem Apparat.

Ariichtungsuleedung, fir de lokale Connector ze benotzen

Benotzt dës Optioun, wann den MCP-Server Zougrëff op lokal Fichieren, Appen oder privat Ressourcen op Ärem Computer brauch.

1

D'MCP-Astellungen opmaachen

Gitt an TypingMind op „Astellungen“, „Erweidert Astellungen“, dann op „Model Context Protocol“ a wielt „Connector ariichten“.

  1. Maacht TypingMind an Ärem Browser op.
  2. Klickt op d'Astellungssymbol.
  3. Gitt op „Erweidert Astellungen“.
  4. Maacht d'Sektioun „Model Context Protocol“ op.
  5. Klickt op „Connector ariichten“ a wielt „Dësen Apparat“.
Ariichtungsbildschierm vum TypingMind-MCP-Connector: D'Optioun „Dësen Apparat“ ass ausgewielt
2

De Connector-Befeel ausféieren

Wielt „Dësen Apparat“, kopéiert de Befeel aus TypingMind a féiert en am Terminal aus. Loosst de Prozess lafen, wärend Dir MCP benotzt.

  1. Kopéiert den Ariichtungsbefeel, deen TypingMind uweist.
  2. Maacht Terminal op macOS oder Windows Terminal op Windows op.
  3. Setzt de kopéierte Befeel an a féiert en aus.
  4. Bestätegt d'Installatioun vum Package, wann den Terminal Iech freet, ob Dir weiderfuere wëllt.
  5. Loosst den Terminal an de Prozess doranner lafen, wärend Dir MCP-Tools benotzt.
3

i18n MCP 服务器 als Server derbäisetzen

Wann de Connector-Status „Prett“ ass, klickt op „Serveren änneren“ a setzt d'MCP-Serverkonfiguratioun an.

  1. Waart, bis de Connector-Status „Prett“ weist.
  2. Klickt op „Serveren änneren“.
  3. Setzt d'MCP-Serverkonfiguratioun fir i18n MCP 服务器 an.
  4. Späichert d'Serverlëscht.
  5. Aktualiséiert d'Säit, wann Dir kontrolléiere wëllt, ob de Connector nach ëmmer prett ass.
MCP-Astellunge vun TypingMind mat aktivem Server an dem Knäppchen „Serveren änneren“
{
  "mcpServers": {
    "dalisys-i18n-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "i18n-mcp"
      ]
    }
  }
}
4

D'Verbindung mat verschiddene Modeller benotzen

Späichert d'Serverlëscht, maacht „Plugins“ op an aktivéiert d'MCP-Tools vun der Integratioun i18n MCP 服务器. Wielt dann e belibegen ënnerstëtzte KI-Modell an TypingMind a benotzt d'Tools am Chat oder weist se engem KI-Agent zou.

  1. Maacht d'Säit „Plugins“ an TypingMind op.
  2. Aktivéiert d'MCP-Tools vun der Integratioun i18n MCP 服务器.
  3. Start e Chat a wielt de KI-Modell, deen Dir benotze wëllt.
  4. Benotzt d'MCP-Tools am Chat oder weist se engem KI-Agent zou.
  5. Wiesselt bei Bedarf op en anere KI-Modell, ouni MCP nei ze verbannen.
TypingMind-Chat mat aktivéierten MCP-Tools an engem ausgewielte KI-Modell
Kënnt Dir mir mat i18n MCP 服务器 bei dëser Aufgab hëllefen?
i18n MCP 服务器
Jo. Ech hunn et gelies.
Dat hunn ech mat i18n MCP 服务器 fonnt.

Heefeg gestallte Froen

Fir wat gëtt den MCP-Server i18n MCP 服务器 benotzt?

i18n MCP 服务器 ass en MCP-Server, deen et kompatibele KI-Clienten erlaabt, op extern Tools a Kontextinformatioune zouzegräifen. An TypingMind kënnt Dir dësen MCP-Server eemol derbäisetzen a seng Tools an Ärem KI-Aarbechtsberäich zur Verfügung stellen.

Kann ech i18n MCP 服务器 MCP mat méi KI-Modeller an TypingMind benotzen?

Jo. TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Sou kënnt Dir i18n MCP 服务器 mat verschiddene KI-Modeller wéi Claude, ChatGPT, Gemini oder anere Modeller benotzen, déi Dir an TypingMind konfiguréiert hutt, ouni den MCP-Server fir all Modell separat anzeriichten.

Firwat i18n MCP 服务器 MCP mat TypingMind benotzen?

TypingMind ass eng vun de beschte Benotzeruewerfläche fir LLM-Chat, well et méi KI-Modeller, Prompts, Plugins, KI-Agenten, API-Schlësselen a MCP-Tools an engem Aarbechtsberäich zesummebréngt. Wann i18n MCP 服务器 verbonnen ass, kënnt Dir seng MCP-Tools mat Äre bevorzugte Modeller benotzen a gläichzäiteg Ären Aarbechtsoflaf beim Chatten an TypingMind organiséieren.

Wéi verbannen ech i18n MCP 服务器 MCP mat TypingMind?

i18n MCP 服务器 leeft iwwer de lokale MCP-Connector vun TypingMind. Dat eegent sech am beschten, wann den MCP-Server Zougrëff op lokal Fichieren, Desktop-Apps, Kommandozeilen-Tools oder privat Ressourcen op Ärem Computer brauch.

Wéi eng Tools stellt i18n MCP 服务器 MCP an TypingMind zur Verfügung?

i18n MCP 服务器 stellt MCP-Funktioune zur Verfügung, déi Dir op der Plugins-Säit vun TypingMind aktivéiere kënnt, fir se am Chat ze benotzen oder KI-Agente zouzeweisen.

Muss ech meng API-Schlëssele mat TypingMind deelen, fir i18n MCP 服务器 MCP ze benotzen?

Nee. TypingMind ass nom Local-first-Prinzip opgebaut a léisst Iech d'Kontroll iwwer Är Modellubidder, API-Schlësselen, Prompts a MCP-Konfiguratioun. Wann i18n MCP 服务器 eng Authentifizéierung verlaangt, setzt déi néideg Headeren, OAuth-Astellungen oder lokal Konfiguratioun fir deen MCP-Server derbäi, wann Dir d'Verbindung erstallt.

Änlech MCP-Serveren

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇