i18n-mcp

dalisys/i18n-mcp

3.3

If you are the rightful owner of i18n-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

A MCP server for managing internationalization (i18n) translation files, enabling LLMs to intelligently manage translations and maintain consistency across multiple language files.

The i18n MCP Server is a powerful tool designed to streamline the management of internationalization (i18n) translation files. It provides a comprehensive suite of tools that allow developers to efficiently handle translations, analyze code for hardcoded strings, and ensure consistency across various language files. With real-time file watching and advanced search capabilities, the server facilitates the seamless integration of translations into projects. It supports a wide range of functionalities, including translation search, management, codebase analysis, and file structure management. The server is highly configurable, allowing users to tailor it to their specific project needs, whether they are working with React, Vue, or other frameworks. By automating many of the tedious aspects of translation management, the i18n MCP Server helps developers focus on building features rather than managing translations.

Features

  • Real-time file watching and advanced search capabilities.
  • Comprehensive suite of tools for translation management.
  • Codebase analysis for hardcoded strings and missing translations.
  • Consistent structure validation across translation files.
  • Configurable for various frameworks and project needs.

Usages

usage with claude desktop basic

{
  "mcpServers": {
    "i18n": {
        "command": "node",
        "args": ["/path/to/i18n-mcp/dist/index.js", "--dir", "/User/project/locales"]
      }
  }
}

usage with claude desktop windows

{
  "mcpServers": {
    "i18n": {
      "command": "C:\\path\\to\\node.exe", // or "C:\\path\\to\\nvm\\node.exe"
      "args": [
        "D:\\i18n-mcp\\dist\\index.js",
        "--dir",
        "D:\\path\\to_your_project\\locales"
      ]
    }
}

usage with claude desktop advanced

{
  "mcpServers": {
    "i18n": {
      "command": "node",
      "args": [
        "/path/to/i18n-mcp/dist/index.js",
        "--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"
      ]
    }
  }
}

usage with claude desktop env vars

{
  "mcpServers": {
    "i18n": {
      "command": "node",
      "args": ["/path/to/i18n-mcp/dist/index.js"],
      "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"
      }
    }
  }
}

usage with ide

{

      "i18n": {
        "command": "node",
        "args": ["/path/to/i18n-mcp/dist/index.js", "--dir", "/User/project/locales"]
      }

}

usage with zed

{
"context_servers": {
  "i18n": {
    "command": "node",
    "args": ["/path/to/i18n-mcp/dist/index.js", "--dir", "./locales"]
  }
}
}

Tools

  1. search_translation

    Search for translations by content or key patterns.

  2. get_translation_suggestions

    Get autocomplete suggestions for translation keys.

  3. analyze_codebase

    Analyze the codebase for hardcoded strings.

  4. validate_structure

    Validate that all translation files have a consistent structure with the base language.

  5. generate_types

    Generate TypeScript types for all translation keys.