Setup
Before configuring the MCP server, make sure you have:
- Installed glotctl as a dev dependency (see Quick Start)
- Initialized the configuration with
glot init
The examples below use npm. Replace the command with the appropriate one for your package manager.
Claude Code
Option 1: Using CLI (recommended).mcp.json in your project root to share with your team:
Cursor
Add glot to your Cursor MCP configuration. Create.cursor/mcp.json in your project (or ~/.cursor/mcp.json for global access):
OpenCode
Configure glot in your project’sopencode.json file:
Other MCP-Compatible Agents
For other agents that support MCP, run the glot server with:Available Tools
The MCP server provides 9 tools. All tools require theproject_root_path parameter.
get_config
Returns the current glot configuration.
Input:
Output:
get_locales
Lists available locale files with key counts.
Input:
Output:
scan_overview
Returns statistics of all i18n issues in the project. Use this first to understand the overall state.
Input:
Output:
scan_hardcoded
Returns detailed hardcoded text issues with pagination support.
Input:
Output:
scan_primary_missing
Lists translation keys used in code but missing from the primary locale file.
Input:
Output:
scan_replica_lag
Lists keys that exist in the primary locale but are missing from other locales. Includes code usage locations to help prioritize fixes.
Input:
Output:
usages array contains up to 3 code locations where the key is used. totalUsages shows the total count (may exceed 3).
scan_untranslated
Lists translation values that are identical to the primary locale or are empty strings, which may indicate they haven’t been translated yet. Includes code usage locations.
Input:
Output:
identicalIn array lists locales where the value is identical to the primary locale. The emptyIn array lists locales where the value is an empty string. The usages array contains up to 3 code locations where the key is used.
scan_type_mismatch
Lists keys whose value type differs between the primary locale and other locales. These should be fixed first because they can cause runtime crashes.
Input:
Output:
add_translations
Adds new translation keys to one or more locale files. Supports nested keys (e.g., common.buttons.submit).
Input:
Each translation entry:
Example Input:
Recommended Workflow
The MCP server instructions guide code agents to follow this workflow:This order is important! Fixing hardcoded issues may create new primary_missing issues, and fixing those may create new replica_lag issues.
Related
Agent Skill
Install the glot-i18n skill for guided workflows
Configuration
Configure glot for your project