Docs / Agents / GitHub Copilot in VS Code
Localize an app with GitHub Copilot
Add the localize.dev MCP server to .vscode/mcp.json, so Copilot's agent mode can give hardcoded UI text keys and fill in every language's translations.
How it works
Copilot uses MCP servers in agent mode, and VS Code reads them from .vscode/mcp.json in the workspace. Commit that file and everyone who opens the repository gets the localize.dev tools.
Ask Copilot to translate new keys, add a language or check a page before review. The locale files change in your workspace like any other edit, so you review them in the same diff.
Set it up
First run npx localize-dev login in your terminal. It signs you in through the browser and saves a key, which the server reads, so the config below carries none.
- Add localize to .vscode/mcp.json in your workspace.
- Restart the agent, or reload its MCP servers, so it starts localize.
- Open your repository and ask it something like the prompt below.
{
"servers": {
"localize": {
"type": "stdio",
"command": "npx",
"args": ["-y", "localize-dev", "mcp"]
}
}
}What you get
- Where the server goes
.vscode/mcp.json- Server
localize-dev mcp, started with npx on your machine- Key
- The one
npx localize-dev loginsaved - What
init --agentadds - The
AGENTS.mdsection with the instructions. Add the server by hand, as above.
Good to know
- VS Code's file uses
servers, notmcpServers, and each server needs"type": "stdio". A snippet pasted from another client is the usual reason the server doesn't start. - MCP tools are available in agent mode, not in ask or edit mode.
npx localize-dev init --agentwrites the instructions toAGENTS.md. If your Copilot setup doesn't readAGENTS.md, copy the section into.github/copilot-instructions.md.
Try it
Ask something like this. The agent should call the translate tool.
“Translate the new keys in locales/en.json into every language.”
Keep it translated
Text the agent leaves hardcoded still gets caught: npx localize-dev check in CI fails a pull request that adds untranslated copy, and it needs no key.
npx localize-dev checkAll agents and the tool reference are on the MCP server page.