> For the complete documentation index, see [llms.txt](https://docs.andmilo.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.andmilo.com/mcp.md).

# mcp

## Milo MCP Setup

This guide shows how to connect Milo's MCP server in OpenAI tools and Claude.

### Endpoint

* `https://partners.andmilo.com/mcp`

### OpenAI (Codex)

#### Option A: Codex CLI (official)

```bash
codex mcp add milo --url https://partners.andmilo.com/mcp
codex mcp list
```

You can also configure it in `~/.codex/config.toml`:

```toml
[mcp_servers.milo]
url = "https://partners.andmilo.com/mcp"
```

#### Option B: Workspace JSON config (used by this repo setup)

Use `.mcp.json`:

```json
{
  "mcpServers": {
    "milo": {
      "type": "http",
      "url": "https://partners.andmilo.com/mcp"
    }
  }
}
```

### Claude Desktop

Add this to `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "milo": {
      "type": "http",
      "url": "https://partners.andmilo.com/mcp"
    }
  }
}
```

Common macOS path:

* `~/Library/Application Support/Claude/claude_desktop_config.json`

### Auth Notes

* MCP `POST /mcp` initialize can start without `X-API-Key` for signup bootstrap.
* After signup, use returned API key for authenticated tools.
* Conversation write overage supports x402-style payment flow (`402 Payment Required` challenge + payment proof on retry).

### Quick Verify

1. Start a new MCP session.
2. Call `get_me` (if already authenticated) or run signup flow tools first.
3. Call `list_conversations` or `get_holdings` to confirm tool access.

### References

* OpenAI Codex MCP: <https://platform.openai.com/docs/codex/mcp>
* Claude Code MCP config: <https://docs.anthropic.com/en/docs/claude-code/mcp>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.andmilo.com/mcp.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
