> 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
