# SimpleLocalize setup for AI agents

These are instructions for you, the AI coding agent, to connect the user's project to SimpleLocalize, a translation management platform. Follow the linked docs and don't guess commands, options or file formats. When something is unclear, ask the user.

There are two ways to connect, and a project can use both:

- **CLI**: syncs the translation files in the repository with SimpleLocalize (upload, download, CI). Use it when the project keeps translations in files.
- **MCP connector**: lets you manage translation keys and translations in SimpleLocalize directly, for example add keys found in the code, auto-translate them or run QA checks.

If the user didn't say which one they want, suggest the CLI for a project with translation files and offer the MCP connector afterwards.

## What only the user can do

- Create a SimpleLocalize account and a project: https://simplelocalize.io/register/
- Give you the project API key (in the SimpleLocalize project: Settings > Credentials > API Key).
- Sign in to SimpleLocalize in the browser when an MCP client asks for it.

Never ask for the user's password. Never write an API key or a personal access token to a committed file: the CLI reads the key from the `SIMPLELOCALIZE_API_KEY` environment variable.

## CLI

1. Install the CLI as described in https://simplelocalize.io/docs/cli/get-started/ (shell installer, PowerShell installer on Windows, or the `@simplelocalize/cli` npm package for Node.js projects).
2. Find the translation files in the project and the i18n library that uses them. Pick the matching file format from https://simplelocalize.io/docs/general/file-formats/ and confirm the files, format and source language with the user.
3. Ask the user for the project API key and set it as the `SIMPLELOCALIZE_API_KEY` environment variable.
4. Create `simplelocalize.yml` in the project root with `uploadFormat`, `uploadPath`, `uploadLanguageKey`, `downloadFormat` and `downloadPath`, using the `{lang}` and `{ns}` placeholders where the paths need them. Reference: https://simplelocalize.io/docs/cli/configuration/
5. Run `simplelocalize upload --dryRun` and show the user which files would be uploaded. After the user confirms, run `simplelocalize upload`, then `simplelocalize download`.
6. Ask the user if they want a GitHub Actions workflow that runs upload and download on every push: https://simplelocalize.io/docs/integrations/github-actions/

Other commands, such as `simplelocalize auto-translate`, are described in https://simplelocalize.io/docs/cli/other-commands/

## MCP connector

SimpleLocalize hosts the MCP connector, so there is nothing to install or run. The server uses the Streamable HTTP transport and OAuth sign-in.

Server URL: `https://api.simplelocalize.io/mcp`

Add it to the client you run in:

- **Claude Code**: run `claude mcp add --transport http simplelocalize https://api.simplelocalize.io/mcp`, then ask the user to type `/mcp`, choose `simplelocalize` and sign in.
- **Cursor and other clients**: add the server to the MCP configuration, for example `.cursor/mcp.json`:

  ```json
  {
    "mcpServers": {
      "simplelocalize": {
        "url": "https://api.simplelocalize.io/mcp"
      }
    }
  }
  ```

- **VS Code and GitHub Copilot**: add the server to `.vscode/mcp.json`:

  ```json
  {
    "servers": {
      "simplelocalize": {
        "type": "http",
        "url": "https://api.simplelocalize.io/mcp"
      }
    }
  }
  ```

- **Claude (web or desktop app)**: the user adds it in Settings > Connectors > Add custom connector.

On the first connection SimpleLocalize opens a sign-in page in the browser, where the user chooses which projects and tools you can use. You always work with the user's permissions in each project.

If the client can't sign in with OAuth, it can send the project API key in the `X-SimpleLocalize-Token` header instead. Read the key from an environment variable, never commit it.

To check the connection, list the user's projects with the `list_projects` tool.

Full reference: https://simplelocalize.io/docs/integrations/model-context-protocol/

## More

- Documentation: https://simplelocalize.io/docs/
- REST API: https://simplelocalize.io/docs/api/get-started/
- Questions: jakub@simplelocalize.io
