Engineering

How to Use Better i18n MCP with Coding Agents (Cursor, Claude, Windsurf, Zed

Ali Osman Delismen
Ali Osman Delismen
·3 min read
Share
How to Use Better i18n MCP with Coding Agents (Cursor, Claude, Windsurf, Zed
Table of Contents

How to Use Better i18n MCP with Coding AgentsModern coding agents like Cursor, Claude Code, Windsurf, and Codex can interact directly with external tools using the Model Context Protocol (MCP). Better i18n provides an MCP server that lets AI assistants access your translation data, check project status, and manage localization workflows.In this guide, we'll walk through how to configure the Better i18n MCP server and connect it to your coding agent.***## What is MCP?MCP (Model Context Protocol) is a standard that allows AI tools to connect to external systems using structured tools.With the Better i18n MCP server, your AI assistant can:* Check translation coverage

  • Fetch missing keys
  • Propose translations
  • Manage localization directly from your coding environment***## Step 1 — Create an API KeyFirst, generate an API key from the Better i18n dashboard.1) Sign in to https://dash.better-i18n.com
  1. Navigate to Settings → API Keys
  2. Create a new API key
  3. Copy the key for later useBlog post image## Step 2 — Configure Your ProjectThe MCP server needs to know which project it should manage.Add the project identifier to your i18n.config.ts file.```ts import { createI18n } from "@better-i18n/next";

export const i18n = createI18n({ project: "your-org/your-project", defaultLocale: "en" }); ***## Step 3 — Configure Your Coding AgentThe MCP server runs locally using `npx` and authenticates with your API key.The key is passed using an environment variable: BETTER_I18N_API_KEY=your-api-key Below are configuration examples for the most common coding agents.***## CursorAdd this configuration to: ~/.cursor/mcp.json

{
  "mcpServers": {
    "better-i18n": {
      "command": "npx",
      "args": ["@better-i18n/mcp"],
      "env": {
        "BETTER_I18N_API_KEY": "your-api-key"
      }
    }
  }
}
```*(Screenshot: Cursor MCP settings)****## Claude CodeRun the following command in your terminal:```bash
claude mcp add better-i18n -s user -e BETTER_I18N_API_KEY=your-api-key -- npx -y @better-i18n/mcp
```Claude Code will automatically manage the MCP configuration.*(Screenshot: terminal setup example)****## WindsurfAdd this to:```
~/.codeium/windsurf/mcp_config.json
``````json
{
  "mcpServers": {
    "better-i18n": {
      "command": "npx",
      "args": ["@better-i18n/mcp"],
      "env": {
        "BETTER_I18N_API_KEY": "your-api-key"
      }
    }
  }
}
```***## ZedEdit your Zed configuration file:```
~/.config/zed/settings.json
``````json
{
  "context_servers": {
    "better-i18n": {
      "command": {
        "path": "npx",
        "args": ["@better-i18n/mcp"],
        "env": {
          "BETTER_I18N_API_KEY": "your-api-key"
        }
      },
      "settings": {}
    }
  }
}
```***## Step 4 — Verify the IntegrationOnce configured, ask your AI assistant something like:```
Show me the translation status for my current project.
```If the MCP server is connected correctly, the assistant will call the Better i18n tools and return real-time project statistics.*(Screenshot: AI assistant calling getProject tool)****## Optional: Enable Content ManagementIf you use the Better i18n CMS features, you can also install the **content MCP server**.Example configuration:```json
{
  "mcpServers": {
    "better-i18n": {
      "command": "npx",
      "args": ["@better-i18n/mcp"],
      "env": {
        "BETTER_I18N_API_KEY": "your-api-key"
      }
    },
    "better-i18n-content": {
      "command": "npx",
      "args": ["@better-i18n/mcp-content"],
      "env": {
        "BETTER_I18N_API_KEY": "your-api-key"
      }
    }
  }
}
```This allows your AI assistant to manage **blog posts, changelogs, and other localized content**.***## Environment Variables| Variable               | Required | Description          |
| ---------------------- | -------- | -------------------- |
| BETTER\_I18N\_API\_KEY | Yes      | Organization API key |
| BETTER\_I18N\_API\_URL | No       | Custom API URL       |
| BETTER\_I18N\_DEBUG    | No       | Enable debug logging |***## Final ThoughtsWith MCP, coding agents can interact directly with your localization platform. Instead of manually checking translation dashboards, your AI assistant can analyze project status, suggest translations, and help maintain multilingual apps.Better i18n MCP makes localization part of your **developer workflow**, not a separate process.