AI agents
An AI coding agent can set up easyi18n in your repository, translate your
strings and publish them, while you approve every spend and every publish in
the easyi18n dashboard. The agent talks to easyi18n mcp, an MCP server that
ships inside the easyi18n CLI. Any client that can launch
a stdio MCP server works: Claude Code, Codex CLI, Cursor, VS Code, Gemini CLI,
Windsurf, Zed, Claude Desktop and others.
CLI 0.12.0 is on pub.dev and as
prebuilt binaries, and its MCP server covers the Flutter workflow. The Xcode
tools (sync_preview, sync), easyi18n mcp config and the AGENTS.md
block ship in 0.13.0, which is not released yet. The npm package
@easyi18n.com/cli and the Claude Code plugin are published with 0.13.0; until
then, install the CLI with Dart or the binary installer.
Supported stacks
easyi18n splits each workflow into a core that works the same for every stack and one adapter per stack. What an agent can do depends on where your project keeps the truth about its strings.
| Family | Stack | Source of truth | Agent tools | Status |
|---|---|---|---|---|
| Code-first | Dart and Flutter with context.tr() | The tr() calls in your code | extract, push_preview, push, apply | CLI 0.12.0 |
| File-first | Xcode String Catalogs (.xcstrings) | The catalog file | sync_preview, sync | CLI 0.13.0 |
| File-first | Web apps with one JSON file per locale: Transloco, ngx-translate, i18next | The base-language file | sync_preview, sync | CLI 0.13.0 |
| Pull-only | Flutter ARB (Mode A), and any app that reads flat or nested JSON, iOS .strings, Android strings.xml or gettext .po files | The easyi18n project | pull | CLI 0.12.0 |
A pull-only project gets its strings into easyi18n through the dashboard
import, and the agent downloads published versions with pull. The agent
cannot extract strings from JavaScript, TypeScript, Android or gettext sources
yet: in a web app it moves them into the base-language file by hand, and the
other stacks need their own adapter and are on the roadmap. The setup
prompt stops on an unsupported stack instead of improvising one.
Three ways to connect an agent
| Layer | For | Page |
|---|---|---|
MCP server, easyi18n mcp | Any MCP client. Tools with typed results, the setup and translate prompts, and approval links | MCP server, Connect your AI |
AGENTS.md block written by init | Agents that read AGENTS.md and run shell commands, with or without MCP | AGENTS.md |
CLI with --json | Scripts, CI, and agents that call the CLI directly | CLI structured output |
Claude Code users can install the Claude Code plugin, which bundles the server, the key setting and two skills.
How an agent translates
Every stack runs the same loop:
preview -> authorize -> push | sync -> fill_status -> authorize -> publish -> pull
- The preview (
push_previeworsync_preview) is free. It reports how many strings need translation and the estimated credits. authorizeasks the easyi18n server for an operation with a credit maximum and returns anapproval_url. The agent shows it to you.- You open the link, check the scope and the maximum, and approve.
pushorsyncregisters the strings and queues the translation. The server never charges more than the approved maximum.fill_statuspolls until the translation is complete.- Publishing asks for a second approval, then
pullwrites the published files or catalog into your repository. In a web project it writes the other languages and leaves the base-language file as it is.
A push or sync that costs nothing needs no approval.
Approvals and the agent key
Give the agent its own key. In the dashboard, open your project's Settings → API keys → New API key, choose the scopes, and set Used by to AI agent. An agent key cannot spend credits, publish or roll back without an operation that a person approved in the dashboard. The rule is enforced by the server for the key itself, so it holds whether the key is used by an MCP client, the CLI or a direct API call.
| The agent will | Scope |
|---|---|
| Read status, pull and run doctor | read |
| Preview and translate | translate |
| Publish and roll back | publish |
| Add languages | write |
A project owner or editor can approve a translation. A publish or rollback needs the owner, or an editor with publish permission. A viewer cannot approve. A pending approval expires after 30 minutes, and an approved publish or rollback must be used within 30 minutes.
The key goes in the MCP client's configuration as EASYI18N_TOKEN. Never paste
it into a chat: the server never takes it as a tool argument, and it redacts
key-shaped values from the text it returns.