# MCP quickstart

Connect Cursor to the FineProxy MCP server, run a first read-only prompt, then enable purchases and buy proxies through a conversation.

- Canonical: https://fineproxy.org/developers/docs/mcp/quickstart/

This guide connects Cursor to your FineProxy account in about two minutes. You start with a read-only key, check that the agent sees your wallet, and then, if you want the agent to buy proxies, add purchase rights. Other clients work the same way; see [Supported clients](/developers/docs/mcp/#supported-clients).

## 1. Create a read-only API key

1. Sign in to the dashboard and open [Settings → API keys](https://fineproxy.org/account_new/settings#api-keys).
2. Create a key with read-only [scopes](/developers/docs/authentication/#scopes): `customer:read`, `wallet:read`, `services:read`, `catalog:read`, `usage:read`, `tickets:read`.
3. Copy the key. It starts with `fb_` and is shown **only once**.

A read-only key lets the agent look at everything and change nothing. That's the right way to see how your agent behaves before you trust it with money.

> **Important:** Treat the key like a password. Don't paste it into chat messages and don't commit config files that contain it.

## 2. Add the server to Cursor

### Option A: one-click install

[Add FineProxy to Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=fineproxy&config=eyJ1cmwiOiJodHRwczovL2ZpbmVwcm94eS5vcmcvYWNjb3VudF9uZXcvYXBpL3YxL21jcCIsImhlYWRlcnMiOnsiQXV0aG9yaXphdGlvbiI6IkJlYXJlciAke2VudjpGSU5FUFJPWFlfQVBJX0tFWX0ifX0=)

The link installs a server named `fineproxy` that reads the key from the `FINEPROXY_API_KEY` environment variable, exactly as in option B. Set the variable and restart Cursor as described below.

### Option B: edit `mcp.json`

Create or edit `~/.cursor/mcp.json` (all projects; `%USERPROFILE%\.cursor\mcp.json` on Windows) or `.cursor/mcp.json` in a project:

```json
{
  "mcpServers": {
    "fineproxy": {
      "url": "https://fineproxy.org/account_new/api/v1/mcp",
      "headers": {
        "Authorization": "Bearer ${env:FINEPROXY_API_KEY}"
      }
    }
  }
}
```

Then make the key visible to Cursor and restart it:

```bash
export FINEPROXY_API_KEY="fb_your_api_key"
```

> **Note:** Cursor must see the variable. Apps started from the Dock or Start menu may not read your shell profile; if the server returns `401`, start Cursor from a terminal where the variable is set. Cursor cloud agents don't read `~/.cursor/mcp.json`; configure them separately in Cursor.

Open **Settings → MCP**: `fineproxy` should be enabled and list its tools. Connection errors appear in the **Output** panel under **MCP Logs**.

## 3. Run your first prompt

In the Cursor agent chat, ask:

```text
What is my FineProxy balance?
```

The agent calls one tool, [`wallet_balance`](/developers/docs/mcp/tools/#wallet_balance), with no arguments. Cursor asks you to approve the call (unless you have allowed it). The tool returns:

```json
{
  "balance_cents": 2800,
  "currency": "USD",
  "wallet_id": "00000000-0000-0000-0000-000000000000",
  "has_wallet": true
}
```

and the agent answers something like "Your FineProxy wallet has $28.00." Amounts are integer cents: `2800` is $28.00.

Try a few more read-only prompts: "List my FineProxy services and when they expire", "Which countries can I buy datacenter proxies in?". More in [Example prompts](/developers/docs/mcp/prompts/).

## 4. Enable purchases

To let the agent buy, renew and change services, create a **second** key with the read scopes above plus:

| Scope | Allows |
| --- | --- |
| `services:write` | Change services: allowlist, credentials, auto-renewal, cancellation |
| `wallet:spend` | Pay from the wallet balance: orders, renewals, add-ons, extra IPs, paid IP refreshes |

Put the new key into `FINEPROXY_API_KEY` and restart Cursor. Keep only as much money in the wallet as you're willing to let the agent spend; see [Safety for AI agents](/developers/docs/mcp/safety/#budget-control).

## 5. Your first purchase

Ask in plain language. Include the IP address that will use the proxies: new orders require at least one allowlisted IP.

```text
Buy 100 German datacenter proxies for one month. Allow access from 203.0.113.10. Don't enable auto-renew.
```

The server tells agents to follow a fixed buying flow, so a typical session looks like this:

| Step | Tool call | What happens |
| --- | --- | --- |
| 1 | `list_countries` | Checks that `DE` has enough IPs in stock (can take about 10 seconds) |
| 2 | `quote_composite` with `segments: [{"country": "DE", "count": 100}]`, `period_months: 1` | Free, non-binding quote: `total_price_cents: 1200` |
| 3 | `wallet_balance` | Confirms the wallet covers $12.00 |
| 4 | — | The agent summarizes and asks you to confirm |
| 5 | `order_composite` | Places the order with the quoted price as a guard |
| 6 | `list_proxy_ips`, `get_proxy_credentials` | Shows your IPs, ports and login |

Before step 5 a well-behaved agent stops and asks, for example:

```text
Quote: 100 datacenter IPs in Germany, 1 month — $12.00 (1200 cents).
Your balance is $28.00. Allowlisted IP: 203.0.113.10. Auto-renew: off.
Shall I place the order?
```

After you confirm, Cursor shows the `order_composite` call for approval. Check the arguments before you approve:

```json
{
  "segments": [{ "country": "DE", "count": 100 }],
  "period_months": 1,
  "whitelist_ips": ["203.0.113.10"],
  "auto_renew": false,
  "idempotency_key": "order-de-100-2026-11-27",
  "expected_total_cents": 1200
}
```

What to watch:

- `expected_total_cents` must equal the quote. If the price changed, the server rejects the order and charges nothing.
- `idempotency_key` makes retries safe: the same key never charges twice.
- `auto_renew` defaults to `true` if the agent leaves it out. A service with auto-renew on is paid from the wallet automatically every period.
- Orders need at least 100 IPs in total. If you ask for fewer, the agent gets an error and should suggest 100.

The order result contains the new service:

```json
{
  "service_id": "00000000-0000-0000-0000-000000000000",
  "status": "active",
  "total_ip": 100,
  "total_price_cents": 1200,
  "period_months": 1,
  "balance_applied_cents": 1200,
  "amount_due_cents": 0,
  "payment_required": false
}
```

In testing, the IPs were active about two seconds later. To connect, see [Connect to datacenter proxies](/developers/docs/proxies/datacenter/).

## Test without a client

You can check your key and the server from a terminal, without any AI client.

### MCP Inspector CLI

The official [MCP Inspector](https://github.com/modelcontextprotocol/inspector) needs Node.js. List the tools:

```bash
npx -y @modelcontextprotocol/inspector --cli \
  https://fineproxy.org/account_new/api/v1/mcp \
  --transport http \
  --header "Authorization: Bearer $FINEPROXY_API_KEY" \
  --method tools/list
```

Call a read-only tool:

```bash
npx -y @modelcontextprotocol/inspector --cli \
  https://fineproxy.org/account_new/api/v1/mcp \
  --transport http \
  --header "Authorization: Bearer $FINEPROXY_API_KEY" \
  --method tools/call \
  --tool-name wallet_balance
```

### Raw JSON-RPC with curl

The server is stateless, so each call is one independent `POST`. Initialize:

```bash
curl -sS -X POST "https://fineproxy.org/account_new/api/v1/mcp" \
  -H "Authorization: Bearer $FINEPROXY_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","method":"initialize","id":1,"params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"curl","version":"1.0"}}}'
```

List the tools:

```bash
curl -sS -X POST "https://fineproxy.org/account_new/api/v1/mcp" \
  -H "Authorization: Bearer $FINEPROXY_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","method":"tools/list","id":2}'
```

Call `wallet_balance`:

```bash
curl -sS -X POST "https://fineproxy.org/account_new/api/v1/mcp" \
  -H "Authorization: Bearer $FINEPROXY_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","method":"tools/call","id":3,"params":{"name":"wallet_balance","arguments":{}}}'
```

The reply carries the data twice, as `structuredContent` and as JSON text in `content[0].text`:

```json
{
  "jsonrpc": "2.0",
  "id": 3,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\n  \"balance_cents\": 2800,\n  \"currency\": \"USD\",\n  \"wallet_id\": \"00000000-0000-0000-0000-000000000000\",\n  \"has_wallet\": true\n}"
      }
    ],
    "structuredContent": {
      "balance_cents": 2800,
      "currency": "USD",
      "wallet_id": "00000000-0000-0000-0000-000000000000",
      "has_wallet": true
    }
  }
}
```

A `401` means the key is missing or wrong. Running many of these commands back to back can return `429`; wait a few seconds between them. See [Troubleshooting](/developers/docs/mcp/troubleshooting/).

## Next steps

- [Example prompts](/developers/docs/mcp/prompts/): buying, monitoring, troubleshooting and billing.
- [Safety for AI agents](/developers/docs/mcp/safety/): what to check before giving an agent `wallet:spend`.
- [Client guides](/developers/docs/mcp/#supported-clients): Claude Code, VS Code, n8n and more.
