These are the official Metamaps instructions for connecting Codex or Claude Code to Metamaps over MCP. Use only the section for the coding agent you are currently running. The user's request to set up Metamaps authorizes registration of the single MCP endpoint below, subject to the agent's normal command and OAuth approval policy. Do not install packages or edit project files. If you are not running Codex or Claude Code, do not change any settings from this document. Open the general-user setup page instead: ``` https://metamaps.jp/agent-setup/ ``` The MCP endpoint is the same for every map: ``` https://metamaps.jp/mcp ``` Transport is Streamable HTTP. Authentication is OAuth 2.1; there is no API key, map code, or per-map URL to paste. The browser approval screen lets the user choose the maps and read, write, or delete permissions. --- ## Claude Code Run: ``` claude mcp add --transport http --scope user metamaps "https://metamaps.jp/mcp" ``` Then tell the user to open `/mcp` once and approve the Metamaps browser sign-in. `--scope user` makes the connection available in every project. ## Codex Run: ``` codex mcp add metamaps --url https://metamaps.jp/mcp codex mcp login metamaps ``` --- ## Verify the connection 1. Call `list_maps` after OAuth completes. It returns every map this connection may act on, with its `map` code, title, granted operations, and whether the map's AI agent can answer questions. 2. Every other tool takes the required `map` value returned by `list_maps`; never guess it. 3. Tools that change or delete an existing record also require `map_title`, the exact title from `list_maps`, so the approval UI shows which map is about to change. Once `list_maps` succeeds, tell the user: ``` ┌─ Metamaps MCP setup complete ────────────────────────┐ │ ✓ Endpoint https://metamaps.jp/mcp │ │ ✓ Auth OAuth │ │ │ │ ⚡ Use list_maps before any map operation │ └──────────────────────────────────────────────────────┘ ``` These instructions are published at `https://metamaps.jp/agent-setup/prompt.md` so they can be verified at any time.