Localize your app from VS Code with Copilot
Add Glotra as an MCP server, and Copilot's agent mode can create translation keys while it works in your repo. Your team reviews the translations in Glotra.
Set it up
- 1
Create
.vscode/mcp.jsonin your workspace. VS Code uses aserverskey and atype, unlike the config many other clients use:.vscode/mcp.json{ "servers": { "glotra": { "type": "http", "url": "https://api.glotra.yaxbi.com/mcp" } } }To use it in every workspace, run MCP: Open User Configuration from the Command Palette and add the same entry there.
- 2
Select Start above the server entry in that file, or run MCP: List Servers. VS Code asks you to allow the sign-in, then opens your browser.
- 3
Sign in to Glotra and approve the connection. Then open Copilot Chat, switch to Agent mode, and check that the Glotra tools are ticked in the tools picker.
First prompt to try
Check whether my Glotra project already has keys for the settings page labels. Add any that are missing, wire them into the page, and tell me which translations need review.
Copilot asks you to confirm each tool call by default. Once it has added keys, open the project in Glotra and pick the Needs review filter.
Make it the default with Copilot instructions
Copilot includes .github/copilot-instructions.md in its chat requests. Add this so new strings go through Glotra without being asked each time:
## 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
- VS Code says the config is invalid
- Check that the top-level key is
servers, notmcpServers, and thattypeishttp. - The Glotra tools don't appear in Copilot Chat
- MCP tools are only offered in Agent mode. Switch modes, then open the tools picker and make sure the server is ticked. If your organization manages Copilot, an admin may need to allow MCP servers.
- The server starts but no sign-in appears
- Run MCP: List Servers, select glotra and restart it. Check the Output panel for that server if it still doesn't prompt.
- Only read tools are listed
- The connection was approved without write access. Disconnect it under Connected apps in Glotra, sign in again, and allow adding and editing keys.
- Calling the URL directly returns 401
- That is expected. The endpoint only accepts signed-in MCP clients, and the 401 is what tells a client where to sign in.