MCP setup · Claude Code

Localize your app from Claude Code

Connect Glotra once, and Claude Code can create translation keys from your terminal as it writes the feature. Your team reviews the translations in Glotra.

Set it up

  1. 1

    Add the server from your terminal:

    bash
    claude mcp add --transport http glotra https://api.glotra.yaxbi.com/mcp

    This adds it for you in the current project. To use it in every project, add --scope user. To share it with your team through a checked-in .mcp.json, add --scope project. Each person still signs in as themselves.

  2. 2

    Start Claude Code, run /mcp, choose glotra, then Authenticate. Your browser opens.

  3. 3

    Sign in to Glotra and approve the connection. Leave delete off unless you want Claude to remove keys, and limit it to one project if you like.

First prompt to try

Find the hardcoded user-facing strings in src/checkout, add them to
my Glotra project as keys, and replace them with lookups using the
i18n setup this codebase already has. Then tell me which translations
need review.

Claude writes the English, or whatever your base language is, and Glotra fills in the rest. Then open the project in Glotra and pick the Needs review filter.

Make it the default with CLAUDE.md

Claude Code reads CLAUDE.md at the start of a session. Add this so new strings go through Glotra without being asked each time:

CLAUDE.md
## Localization

User-facing text goes in Glotra, not in hardcoded strings.
- Before adding text, call search_keys and reuse a matching key.
- Add new text with add_key, in the project's base language only.
- After adding keys, tell me how many translations need review.

Troubleshooting

/mcp shows glotra as needing authentication
That is the normal state before you sign in, and after a connection is revoked. Choose Authenticate.
The sign-in page never reaches Claude Code over SSH
Sign-in returns to a localhost address on the machine running Claude Code. On a remote machine, forward that port to your browser's machine, or authenticate once on a local session.
add_key isn't available
The connection was approved without write access. Disconnect it under Connected apps in Glotra, then authenticate again and allow adding and editing keys.
add_key is refused with a permission message
Your own role is checked on every call. You need editor access to that project, and writes stop while a subscription has lapsed. Reading still works.
A language comes back as pending or failed
The key was saved, but that language has no text. Pending means machine translation doesn't cover it; failed means the translation call errored. Add it in the dashboard, or retry with update_key.

More detail is in the MCP docs.