i18n MCP 服务器のロゴ

i18n MCP 服务器

コミュニティ
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.

公開者dalisys
リポジトリi18n-mcp
言語TypeScript
フォーク
2
スター
12
利用可能なツール
0
通信方式stdio
カテゴリ
リンク
  • ツールをAIワークフローに接続

    i18n MCP 服务器は、対応するAIクライアントやAIエージェントから利用できるMCP機能を提供します。

  • 利用可能なツール(0個)

    呼び出し可能なアクションを以下で確認できます。サーバーから提供されている場合は、名前や説明も表示されます。

  • コピーして使える設定

    セットアップ用の設定例を使って、お好みのMCPクライアントにこのサーバーを設定できます。

  • オープンソースプロジェクトの注目度

    リンク先のリポジトリには12件のスターと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

インストール

TypingMind
前提条件:

Node.js 18+

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

i18n MCP 服务器のMCPを複数のAIモデルで活用

TypingMindはワークスペース単位でMCPツールに接続します。そのため、一度i18n MCP 服务器に接続すれば、モデルごとに個別に設定することなく、TypingMind内のさまざまなAIモデルで利用できます。 このMCPは、デバイス上のTypingMind MCPコネクタを通じてローカルで動作します。

ローカルコネクタのセットアップガイド

MCPサーバーが、お使いのコンピューター上のローカルファイル、アプリ、非公開リソースにアクセスする必要がある場合は、この方法を使います。

1

MCP設定を開く

TypingMindで「設定」→「詳細設定」→「Model Context Protocol」の順に進み、「コネクタを設定」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 設定アイコンをクリックしてください。
  3. 「詳細設定」に移動してください。
  4. 「Model Context Protocol」セクションを開いてください。
  5. 「コネクタを設定」をクリックし、「このデバイス」を選択してください。
「このデバイス」が選択されたTypingMindのMCPコネクタ設定画面
2

コネクタのコマンドを実行

「このデバイス」を選択し、TypingMindからコマンドをコピーしてターミナルで実行してください。MCPの使用中は、プロセスを実行したままにしてください。

  1. TypingMindに表示されるセットアップコマンドをコピーしてください。
  2. macOSではターミナルを、WindowsではWindows Terminalを開いてください。
  3. コマンドを貼り付けて実行してください。
  4. ターミナルで続行の確認を求められた場合は、パッケージのインストールを承認してください。
  5. MCPツールの使用中は、ターミナルウィンドウを開いたまま、プロセスの実行を継続してください。
3

i18n MCP 服务器をサーバーとして追加

コネクタのステータスが「準備完了」になったら、「サーバーを編集」をクリックし、MCPサーバーの設定を貼り付けてください。

  1. コネクタのステータスが「準備完了」になるまでお待ちください。
  2. 「サーバーを編集」をクリックしてください。
  3. i18n MCP 服务器のMCPサーバー設定を貼り付けてください。
  4. サーバー一覧を保存してください。
  5. コネクタのステータスが「準備完了」のままか確認するには、画面を更新してください。
稼働中のサーバーと「サーバーを編集」ボタンが表示されたTypingMindのMCP設定画面
{
  "mcpServers": {
    "dalisys-i18n-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "i18n-mcp"
      ]
    }
  }
}
4

複数のモデルで同じ接続を使用

サーバー一覧を保存し、「プラグイン」を開いてi18n MCP 服务器のMCPツールを有効にしてください。その後、TypingMindで対応するAIモデルを選択し、チャットでツールを使うか、AIエージェントに割り当ててください。

  1. TypingMindの「プラグイン」ページを開いてください。
  2. i18n MCP 服务器のMCPツールを有効にしてください。
  3. チャットを開始し、使用するAIモデルを選択してください。
  4. MCPツールをチャットで使うか、AIエージェントに割り当ててください。
  5. MCPに再接続することなく、必要に応じて別のAIモデルに切り替えられます。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
i18n MCP 服务器を使ってこのタスクを手伝ってもらえますか?
i18n MCP 服务器
はい、読みました。
i18n MCP 服务器で調べた結果をお伝えします。

よくある質問

i18n MCP 服务器 MCPサーバーは何に使いますか?

i18n MCP 服务器は、対応するAIクライアントを外部ツールやコンテキストに接続するためのMCPサーバーです。TypingMindでは、このMCPサーバーを一度追加するだけで、AIワークスペース内でそのツールを利用できるようになります。

TypingMindでは、複数のAIモデルでi18n MCP 服务器 MCPを利用できますか?

はい。TypingMindはワークスペース単位でMCPツールに接続するため、モデルごとにMCPサーバーを設定する必要はありません。Claude、ChatGPT、Geminiや、TypingMindで設定したその他のAIモデルでi18n MCP 服务器を利用できます。

TypingMindでi18n MCP 服务器 MCPを使うメリットは何ですか?

TypingMindは、複数のAIモデル、プロンプト、プラグイン、AIエージェント、APIキー、MCPツールを1つのワークスペースにまとめられる、LLMチャット向けのトップクラスのフロントエンドです。i18n MCP 服务器を接続すると、TypingMindでチャットのワークフローを整理しながら、お好みのモデルでそのMCPツールを利用できます。

i18n MCP 服务器 MCPをTypingMindに接続するにはどうすればよいですか?

i18n MCP 服务器はTypingMindのローカルMCPコネクタ経由で動作します。MCPサーバーがコンピューター上のローカルファイル、デスクトップアプリ、コマンドラインツール、プライベートリソースにアクセスする必要がある場合に最適です。

TypingMindでi18n MCP 服务器 MCPのどのようなツールを利用できますか?

i18n MCP 服务器はMCP機能を提供しています。TypingMindのプラグインページで有効にすると、チャットで使用したり、AIエージェントに割り当てたりできます。

i18n MCP 服务器 MCPを使うには、APIキーをTypingMindと共有する必要がありますか?

いいえ。TypingMindはローカルファーストの設計で、モデルプロバイダー、APIキー、プロンプト、MCP設定をご自身で管理できます。i18n MCP 服务器で認証が必要な場合は、接続の作成時に、そのMCPサーバーに必要なヘッダー、OAuth設定、またはローカル設定を追加してください。

関連するMCPサーバー

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇