Mieza exposes its game solver as an [MCP](https://modelcontextprotocol.io) server. Any MCP-compatible client can connect over [Streamable HTTP](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#streamable-http) transport.

For background on what MCP is, see the [official MCP documentation](https://modelcontextprotocol.io/introduction).

## Setup

You need a Mieza API token. Create one at **Settings > Access Tokens** (see [API Access Tokens](/docs/api-tokens)).

Add the following to your client's MCP config:

```json
{
  "mcpServers": {
    "mieza": {
      "url": "https://mieza.ai/mcp",
      "headers": {
        "Authorization": "Bearer tt_YOUR_TOKEN_HERE"
      }
    }
  }
}
```

Where to put this file depends on your client:

- **Cursor** — `.cursor/mcp.json` in your project root. Restart Cursor after saving.
- **Claude Desktop** — `~/Library/Application Support/Claude/claude_desktop_config.json` on macOS.
- **Other clients** — any client that supports Streamable HTTP. Consult your client's docs for the config location.

## Tools

### Open (no auth required)

| Tool | Description |
|---|---|
| `solve_game` | Solve a 2-player normal-form game for Nash equilibria. Results are ephemeral. |
| `policy_catalog` | List available repeated-game policies with configuration options. |

### Authenticated

| Tool | Description |
|---|---|
| `create_game` | Create a persistent game that can accumulate play history and policies. |
| `get_game` | Fetch a saved game and its equilibria by ID. |
| `record_play` | Record what happened in a round. The server computes realized payoffs. |
| `assign_policy` | Bind a player to a repeated-game strategy (tit-for-tat, best-response, etc.). |
| `policy_next_action` | Get the policy's recommended action given the full play history. |

For parameter schemas and usage examples, see the [MCP integration page](/gto/mcp).

## Troubleshooting

**Tools don't appear** — Restart your editor after changing MCP configuration. Verify the `url` points to `https://mieza.ai/mcp`.

**Authentication errors** — Check that your token is valid and the header is `Authorization: Bearer tt_YOUR_TOKEN`.

**"Session not found"** — Your MCP session expired. Most clients re-initialize automatically; if not, restart the client.

## See also

- [MCP specification](https://modelcontextprotocol.io/specification/2025-03-26) — the protocol standard
- [MCP integration page](/gto/mcp) — examples and tool parameter reference
- [API Access Tokens](/docs/api-tokens) — creating tokens
- [Solving Your First Game](/docs/solving-your-first-game) — full tutorial
