Skip to main content

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.

Availability on September 24, 2026

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.

FamilyStackSource of truthAgent toolsStatus
Code-firstDart and Flutter with context.tr()The tr() calls in your codeextract, push_preview, push, applyCLI 0.12.0
File-firstXcode String Catalogs (.xcstrings)The catalog filesync_preview, syncCLI 0.13.0
File-firstWeb apps with one JSON file per locale: Transloco, ngx-translate, i18nextThe base-language filesync_preview, syncCLI 0.13.0
Pull-onlyFlutter ARB (Mode A), and any app that reads flat or nested JSON, iOS .strings, Android strings.xml or gettext .po filesThe easyi18n projectpullCLI 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​

LayerForPage
MCP server, easyi18n mcpAny MCP client. Tools with typed results, the setup and translate prompts, and approval linksMCP server, Connect your AI
AGENTS.md block written by initAgents that read AGENTS.md and run shell commands, with or without MCPAGENTS.md
CLI with --jsonScripts, CI, and agents that call the CLI directlyCLI 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
  1. The preview (push_preview or sync_preview) is free. It reports how many strings need translation and the estimated credits.
  2. authorize asks the easyi18n server for an operation with a credit maximum and returns an approval_url. The agent shows it to you.
  3. You open the link, check the scope and the maximum, and approve.
  4. push or sync registers the strings and queues the translation. The server never charges more than the approved maximum.
  5. fill_status polls until the translation is complete.
  6. Publishing asks for a second approval, then pull writes 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 willScope
Read status, pull and run doctorread
Preview and translatetranslate
Publish and roll backpublish
Add languageswrite

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.