Help · Agent (MCP)

Set up the Mokbi MCP server.

TL;DR. Add the server to your agent, sign in once from the terminal, then ask for /mokbi:screenshots. Your agent captures your app in every language on your own machine and stages the set in your Mokbi project. You apply it in the editor with one click.

What you need

  • Node 20 or newer on the machine your agent runs on. Check with node --version.
  • An MCP-capable agent. Claude Code, Cursor, Codex and Windsurf all work; anything that speaks the Model Context Protocol does.
  • Android Studio's SDK Platform-Tools and an emulator running Android 13 or newer (API 33+). Below that, per-app language does not exist and the device would have to restart for every language. Set ANDROID_HOME if the tools are not on your PATH.
  • A Mokbi account with the project you want to fill. Staging happens into a project, so create it first if it does not exist yet.
  • iOS capture is not included yet. That needs macOS and comes separately; today the capture side is Android.

1. Check your machine

Run npx -y @mokbi/mcp doctor. It prints your Node version, where it looks for adb and the emulator, and whether you are signed in. Anything marked ✗ is what to fix first — the capture tools cannot work around a missing SDK.

2. Add the server to your agent

In Claude Code, one command is enough:

claude mcp add mokbi -- npx -y @mokbi/mcp

In Cursor, Codex, Windsurf and other hosts, add a server to your MCP configuration with command npx and arguments ["-y","@mokbi/mcp"]. Restart the host afterwards so it picks the server up.

3. Sign in once

Run npx -y @mokbi/mcp login. Your browser opens Mokbi, you approve the request, and the token comes back to 127.0.0.1 — it never travels in a URL. The approval screen names a port number; check that it matches the one the terminal printed before you approve.

No browser on that machine? Run npx -y @mokbi/mcp login --paste and create the token yourself in Mokbi → menu → Agent (MCP) → "Agent access" → "New token". You see the token once, so copy it right away.

The token is stored in ~/.mokbi/config.json with file permissions 0600. It is not your session: revoking it does not touch your account. For CI, the environment variable MOKBI_TOKEN takes precedence over the file.

4. Your first run

Ask your agent for the screenshot flow. The server ships three slash-commands, and in Claude Code they show up as exactly that:

  • /mokbi:screenshots — read the repo, propose which screens to capture, run one language for you to check, and after your approval run all the languages and stage the set.
  • /mokbi:localize — draft your store text inside each store's character limits.
  • /mokbi:check — report what is staged and what is still missing per language per store.

You can also just describe what you want; the server tells your agent how the flow is supposed to go. Let the first run cover one language. A wrong tap then costs one run instead of twenty.

5. Apply what your agent staged

Open your project in the editor. The delivery is waiting under "From your agent" — the robot button in the toolbar, the same panel as menu → Agent (MCP) → "Agent access", and the "From your agent" button in the Screenshots menu. The badge on that button counts what is waiting.

  • "Apply" places the screenshots according to the plan shown above the button: which screenshot goes into which panel, for which language. One Ctrl+Z takes the whole set back out.
  • "Apply & design" appears when your agent sent a short brief about your app. It runs the same AI Designer round as the orange button in the editor, at the same price of 2 credits, using the staged screenshots.
  • "Accept everything" shows up when store text or caption translations are staged in bulk. It applies them in one step, and one undo removes them all.
  • "Discard" removes a delivery you do not want. Your agent can always push again.

Nothing is applied automatically, and that is deliberate. The editor is the one writer of your project: an open tab saves the whole document back. If a delivery dropped straight into your design, an editor tab left open somewhere else could quietly overwrite it.

When something goes wrong

  • "adb not found". The SDK Platform-Tools are not installed or not on your PATH. Install them through Android Studio's SDK Manager, or set ANDROID_HOME to your SDK folder.
  • The emulator is 'offline' right after starting. A fresh emulator keeps booting for a while after it reports being ready. The server waits for three boot signals and retries; give it a minute before you kill the run.
  • "The language did not switch". After setting a language we read back what the device reports. If it disagrees, your app most likely does not ship that language, or the app was already running in another language. Restart the run for that language.
  • Two languages look identical. That is the check doing its job: the screens are the same, so your app is not translated for that language. Ship the language when your app is, not before.
  • The browser login does not finish. Use npx -y @mokbi/mcp login --paste and paste a token you created in the editor.
  • Nothing is waiting in the editor. Check that you have the same project open that your agent pushed to, and that the token is still valid: npx -y @mokbi/mcp doctor.
  • The run stops on a screen your app never reaches. The capture driver reports the screen it was looking at, plus an image. Hand that back to your agent and adjust the flow; the server does not test your app for you.

What the token can and cannot do

  • It stages, it does not publish. Publishing to the App Store and Google Play stays in Mokbi, on your click.
  • It cannot spend money. A design round is paid for from your own editor session when you press the button, never by the agent.
  • It is not your session. Revoke it in menu → Agent (MCP) → "Agent access" and your account is untouched. Every token shows when it was last used.
  • Your code stays with you. The capture half runs entirely on your machine; only the finished images and texts are sent to your project.

Open the editor → What the MCP server does