Skip to Content
We are live but in Staging 🎉
MCP serverConnect Kimi Code

Connect Kimi Code

Who this is for: anyone running Kimi Code, Moonshot’s terminal agent, on their own machine.

Short answer: use the local server, not the remote connector. Install the dodil CLI and it registers itself with Kimi Code for you.

The dodil CLI is the MCP server, and its installer wires it into Kimi Code automatically.

curl -fsSL https://cli.dodil.io | bash

Then log in once:

dodil auth login

That’s it. Start a new Kimi Code session and the Dodil tools are there. (See what the installer does — MCP registration is one of its steps, and you can skip it with DODIL_SKIP_MCP_SETUP=1.)

Register it by hand

If you skipped the automatic step, or you’re wiring up a second machine, add this to ~/.kimi-code/mcp.json (create the file if it doesn’t exist):

{ "mcpServers": { "dodil": { "command": "dodil", "args": ["mcp"] } } }

dodil mcp speaks stdio — the agent starts the server as a child process on your machine and talks to it directly. Nothing is exposed on a network port.

You can also manage servers interactively with /mcp-config inside Kimi Code, or add it for one project only via .kimi-code/mcp.json in that project’s root.

Check it

In Kimi Code:

/mcp

You should see dodil listed as connected, with tools named mcp__dodil__*. Then just ask: “list my Dodil buckets”.

Servers are registered when a session starts. If you edited mcp.json while Kimi Code was open, start a new session to pick the server up.

Why local is better here

  • It already has your session. Auth is inherited from dodil auth login — no browser dance, no per-connection OAuth registration.
  • It runs on your machine, next to the code you’re working on, so it can act on local paths and local context.
  • No client registration churn. Nothing is created on Dodil’s login service each time you connect.
  • Code mode is available. dodil mcp --enable-exec adds a single dodil_exec tool that runs a Bash script with dodil on PATH, letting the agent chain a dozen Dodil calls in one step instead of one tool call at a time. The remote server refuses this by design — see Local server.

If you really want the remote server

It works — for example on a machine where you’d rather not install the CLI. Add the remote endpoint to ~/.kimi-code/mcp.json:

{ "mcpServers": { "dodil": { "url": "https://mcp.dodil.io/mcp" } } }

Then, in a new Kimi Code session, complete the browser login:

/mcp-config login dodil

Kimi Code opens your browser to log in at id.dodil.io and catches the result on a loopback callback (a temporary listener on your own computer — the RFC 8252 pattern for desktop apps). Dodil’s identity service trusts those addresses, so the login completes normally.

Trade-offs versus local: you get no dodil_exec code mode, a smaller tool set (local-only tools such as auth_* and *_config_* are hidden remotely), and you’ll re-authenticate through the browser when the token expires.

Don’t configure both transports under the same name. Pick one per server name — e.g. dodil for local, dodil-remote for the remote one.

Troubleshooting

SymptomWhat to do
/mcp doesn’t list dodilConfirm the CLI is installed (dodil --help) and on your PATH, check ~/.kimi-code/mcp.json is valid JSON, then start a new Kimi Code session.
Tools report you’re not logged inRun dodil auth login in your terminal, then dodil auth status to confirm. The agent cannot complete the browser login for you.
dodil: command not found from the agent~/.local/bin isn’t on the PATH the agent inherits — see Install.
Remote server shows only an authenticate toolOAuth hasn’t completed yet — run /mcp-config login dodil and finish the browser login.
Remote tools return empty listsPass your organisation explicitly, e.g. org-name: "<your-org>". The remote server doesn’t yet infer a default org from your login; the local server does.
Remote connector loops on loginYour browser must be able to reach id.dodil.io, and the loopback listener must not be blocked by a local firewall.

Full list → Troubleshooting.