# MCP server

OpenIntents is a remote [Model Context Protocol](https://modelcontextprotocol.io)
server. Any MCP client can use it: add the server, sign in once in the browser,
and your agent gets tools to create and track intents.

```text
https://api.openintents.io/mcp
```

## Add it to your client

### Claude Code

```bash
claude mcp add --transport http openintents https://api.openintents.io/mcp
```

### Claude Desktop, Cursor and other clients

Add it to the client's MCP config (for Cursor, `~/.cursor/mcp.json`):

```json
{
  "mcpServers": {
    "openintents": {
      "url": "https://api.openintents.io/mcp"
    }
  }
}
```

### Headless agents

Skip the browser sign-in by sending an [API key](/dashboard/api-keys) as a
header:

```json
{
  "mcpServers": {
    "openintents": {
      "url": "https://api.openintents.io/mcp",
      "headers": { "Authorization": "Bearer oi_live_..." }
    }
  }
}
```

## Tools

| Tool | What it does |
| --- | --- |
| `create_intent` | Start an intent. Arguments mirror [`POST /v1/intents`](/docs/api#create-an-intent). |
| `get_intent` | Fetch an intent's status and result. |
| `wait_for_intent` | Block until the intent is final or needs payment (up to 5 minutes). |
| `list_intents` | Recent intents, filterable by status. |
| `get_balance` | The agent balance and this month's spend. |
| `cancel_intent` | Cancel an intent that hasn't paid yet. |

When an intent returns `requires_payment`, the tool result includes the
`payment_url`. Agents should give it to the user rather than try to pay.

<Callout type="tip">
  Agents do best when told the budget. _"Book an Uber to SFO at 7am, max $60"_
  becomes `create_intent` with `max_amount: 6000`.
</Callout>
