# MCP

Connect your AI tools to your Rho business through the Model Context Protocol (MCP). Ask your agent to list accounts and balances or retrieve transactions using the permissions you grant it.

## Tools and Prompts

Use Rho MCP to list accounts and balances or retrieve transactions. Available tools use the same permissions and release stages as the [REST API](/docs/v1/versioning).

## Connect your client

## Claude Code

Use the **Claude Code** tab above for setup, then run `/mcp` in Claude Code to check the connection.

## Verify your connection

After connecting, ask your agent:

> Use Rho to list my accounts and their balances.


Your agent should return your accounts and balances. For token-based connections, enable the `accounts:read` scope.

## Authentication

- **Claude directory connections** use OAuth: connect Rho and sign in to grant access without configuring an API Access Token manually.
- **Direct connections** use an [API Access Token](/docs/v1/auth#creating-a-token) in `Authorization: Bearer <rho_api_access_token>`. Configure the token locally using the instructions for your client. Never commit it to source control.


### Setting your token

The Claude Code, Codex, Cursor, and Gemini CLI examples read your API Access Token from `RHO_API_TOKEN`. Set that environment variable for your client before opening it; the setup documentation linked in each tab covers client configuration.

### Storing your API Access Token

Keep your token out of source control and AI conversations. Use only the scopes you need - see [API Access Token best practices](/docs/v1/auth#best-practices).

### Troubleshooting

- **401 Unauthorized:** check for a missing, malformed, expired, or revoked API Access Token.
- **403 Forbidden:** check the token's resource scopes and optional IP allowlist.
- **Tools are unavailable:** enable the Rho server and its tools in your client, then restart the client.


See [Authentication](/docs/v1/auth) for token creation, expiration, scopes, and IP restrictions.

## Protocol Versions

The MCP endpoint advertises and supports protocol versions `2026-07-28`, `2025-11-25`, and `2025-06-18`. Clients can negotiate the current sessionless protocol through `server/discover`. Every non-`initialize` request must include the selected version in the `MCP-Protocol-Version` header. Versions older than `2025-06-18` and JSON-RPC batches are rejected.

The MCP endpoint is separate from the REST API routes:

| REST endpoint | MCP endpoint |
|  --- | --- |
| `/api/v1` | `/mcp/v1` |


Connect to `https://rhoapi.rho.co/mcp/v1` using Streamable HTTP. The client handles protocol negotiation and protocol headers; you do not need to add them to the configurations above.

## Sandbox

To try the MCP tools against fictional data, connect to `https://rhoapi-sandbox.rho.co/mcp/v1` instead. As with the [sandbox REST API](/docs/v1/auth), any non-empty bearer token is accepted, so you do not need an API Access Token:

```bash
claude mcp add --transport http rho-sandbox https://rhoapi-sandbox.rho.co/mcp/v1 \
  --header "Authorization: Bearer sandbox"
```

The sandbox serves one shared, fixed dataset to every caller. Write operations return a successful response but do not persist, so later reads still return the original data.