ANHA in Codex

Codex reads its MCP servers from a TOML config file. Add ANHA once, sign in from the terminal, and every session after that can resolve handles.

TerminalYour @handleNode.js 20+Codex CLIAbout 10 minutes

01

Install

  1. Add the server

    The CLI writes the config for you. This registers ANHA as a stdio server that npx fetches on first run.

    Terminal
    codex mcp add anha -- npx -y anha-mcp
  2. Or write the config by hand

    Codex keeps MCP servers in ~/.codex/config.toml. Create the file if it is not there, and add this table.

    Project-scoped config goes in .codex/config.toml instead, for trusted projects.

    ~/.codex/config.toml
    [mcp_servers.anha]
    command = "npx"
    args = ["-y", "anha-mcp"]

    The table is mcp_servers, with an underscore — not mcpServers. Codex silently ignores the camelCase spelling, which looks exactly like the server failing to start.

  3. Sign in

    This opens your browser once. Approve the handle you registered; the token is then cached on this machine.

    Terminal
    npx -y anha-mcp login
02

Test

List the configured servers

Codex reports every MCP server it has loaded, and whether it started.

Terminal
codex mcp list

You should see

NAME    TRANSPORT    STATUS
anha    stdio        running

Then ask for something real

A passing check only proves the connection works. This proves the model can actually reach the tools.

Use ANHA to resolve @nike.ai and tell me what it can do.

03

Troubleshoot

  • codex mcp list does not show anha

    Cause — The config uses mcpServers instead of mcp_servers, or it was written to a project path Codex does not trust.

    Fix — Check the spelling of the table name, and prefer ~/.codex/config.toml over a project-local file while you are getting it working.

  • No ANHA tools appear at all

    Cause — The config file was edited while the app was running, so it is still holding the old server list.

    Fix — Quit the app completely and start it again. Opening a new tab or window is not enough.

  • The tools are listed, but every call answers that you are not signed in

    Cause — The browser approval was closed before it finished, or you approved with an email address that owns no handle.

    Fix — Run npx -y anha-mcp login again and sign in with the same email you registered the handle under. If you have no handle yet, register one first — the approval screen has nothing to offer otherwise.

  • npx: command not found, or the package will not install

    Cause — Node.js is missing or older than v20, so npx is unavailable or refuses anha-mcp.

    Fix — Run node --version. Below v20, install the LTS build from nodejs.org and open a new terminal so the new PATH takes effect.

  • An order or payment just hangs

    Cause — This is not a fault. The merchant requires phone approval, so the call returns a pending status with a request id.

    Fix — Approve it on your phone. A human decision can take minutes, and the caller polls until it lands.

Still stuck?

Every guide shares the same sign-in and the same tools, so a fix on another platform often applies here too.

All twelve guides