MCP setup · Cursor

Localize your app from Cursor

Add Glotra to Cursor's MCP config, and the agent can create translation keys in the same edit that adds the UI. Your team reviews the translations in Glotra.

Set it up

  1. 1

    Add the server to ~/.cursor/mcp.json to use it in every project, or to .cursor/mcp.json in a repo to share it with your team:

    mcp.json
    {
      "mcpServers": {
        "glotra": {
          "url": "https://api.glotra.yaxbi.com/mcp"
        }
      }
    }

    There is no token to paste, so this file is safe to commit.

  2. 2

    Open the MCP section of Cursor Settings. Find glotra and use its connect or login action. Your browser opens.

  3. 3

    Sign in to Glotra and approve what Cursor may do. Back in Cursor, the server lists its tools. Use the agent in chat to call them.

First prompt to try

Add an empty state to the orders page. Put its heading and button
text in my Glotra project as keys under orders.empty, and use them
through the i18n helper this codebase already has. List any
translations that need review when you're done.

Cursor asks before it runs a tool unless you have turned that off, so you see each add_key call. The translations then wait under Needs review in Glotra.

Make it the default with a rule

A project rule keeps new strings going through Glotra without being asked each time. Save this as .cursor/rules/localization.mdc:

.cursor/rules/localization.mdc
---
description: Localization
alwaysApply: true
---

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

glotra shows as needing login
Cursor hasn't finished signing in, or the connection was revoked under Connected apps. Use the login action again.
The browser signs in but Cursor doesn't update
The last step hands back to Cursor through a cursor:// link. Allow your browser to open Cursor when it asks, then check the server in Cursor Settings again.
The agent writes hardcoded strings anyway
Agents choose tools from the prompt and project context. Name Glotra in the prompt, or add the rule above.
Only read tools are listed
The connection was approved without write access. Disconnect it under Connected apps in Glotra, log in again, and allow adding and editing keys.
The agent says a key already exists
add_key won't change existing text. If the placeholders match, it only adds the platform and tags. Use update_key to change the wording.