# Connect an AI agent (MCP)

Source: https://bflops.com/docs/mcp

Give Claude Code, Cursor or any MCP client nine tools to find, start, watch and stop GPU machines.



bFLOPS runs an MCP server, so an AI agent can rent GPUs on its own within your key's limits.

## Before you start [#before-you-start]

You need an [API key](/docs/api-keys). For an agent that starts machines, give the key a **GPU daily limit**. A read-only key can only list and price.

## Add bFLOPS to your agent [#add-bflops-to-your-agent]

### Claude Code [#claude-code]

```bash title="On your computer"
claude mcp add --transport http bflops https://bflops.com/mcp --header "Authorization: Bearer bf_..."
```

Replace `bf_...` with your key.

### Cursor, Windsurf and other clients [#cursor-windsurf-and-other-clients]

Add this to the client's MCP settings file, with your key:

```json title="mcp.json"
{
  "mcpServers": {
    "bflops": {
      "url": "https://bflops.com/mcp",
      "headers": { "Authorization": "Bearer bf_..." }
    }
  }
}
```

## Try it [#try-it]

Ask your agent something like:

> Find the cheapest RTX 4090, start it with my SSH key from \~/.ssh/id_ed25519.pub for 2 hours, and tell me how to connect.

The agent lists machines, quotes one, starts it, and reads its status until it is running.

## The tools [#the-tools]

| Tool            | What it does                                                  | Needs a daily limit |
| --------------- | ------------------------------------------------------------- | ------------------- |
| `list_machines` | Machines on the list, cheapest first, with filters            | No                  |
| `quote`         | A price for one machine or cluster, held 60 seconds           | No                  |
| `start`         | Starts a quoted machine                                       | Yes                 |
| `status`        | One rental with its SSH command and cost, or all running ones | No                  |
| `stop`          | Stops a machine or cluster; billing ends at once              | Yes                 |
| `extend`        | More hours before it stops by itself, never past 7 days       | Yes                 |
| `list_clusters` | Clusters on the list                                          | No                  |
| `start_cluster` | Starts a quoted cluster, every node or none                   | Yes                 |
| `balance`       | Balance, what is free, how long it lasts, how to top up       | No                  |

`start`, `extend` and `start_cluster` take a `client_request_id`. Send the same one again after a timeout and nothing starts twice.

## Limits [#limits]

* 120 requests a minute per key. Over that, requests get `429` with a `Retry-After` header: wait that many seconds, then try again.
* The key's own ceilings: see [API keys](/docs/api-keys#the-ceilings-on-every-key).
* Tool texts and answers are in English.

## Next [#next]

[REST API](/docs/api) for the same actions from your own code.
