# MCP server

CSPriceAPI runs a remote [Model Context Protocol](https://modelcontextprotocol.io) server, so AI assistants such as Claude, ChatGPT, Cursor and VS Code Copilot can look up live CS2 skin prices themselves instead of guessing.

CSPriceAPI is a CS2 skin price API covering 13 marketplaces, with 45,000+ items and ~5 min live snapshots.

**Server URL:** `https://api.cspriceapi.com/mcp` (Streamable HTTP)

## Without a key and with a key

| | Without a key (preview) | With an API key |
|---|---|---|
| `find_items` | ✓ (60 searches per hour) | ✓ |
| `get_prices` | One item per call, 5 lookups per day per IP, prices from a snapshot up to 6 hours old | Live prices, up to 50 items per call, every market your plan includes |
| Buy orders, float-ranged prices, history, sales | — | ✓ according to your plan |

The preview is meant for trying the server and also has a shared daily cap. For real use, add your key: plans are on the [pricing page](/pricing). A free 2-day test key can be created instantly in the #get-testkey channel on the Discord: it covers every endpoint except price history, with sales data limited to the last 24 hours.

Send the key as an `x-api-key` header or as `Authorization: Bearer YOUR_API_KEY`. Plan limits and the rate limit (10 requests/second) are the same as for the REST API.

## Tools

| Tool | What it returns | Plan |
|---|---|---|
| `find_items` | Exact `market_hash_name` values for a loose query such as "karambit doppler fn" | Preview |
| `get_prices` | Lowest listing price, listing count and an approximate USD value on every market, the cheapest market, Steam best ask/bid; Doppler names return every phase | Preview / Basic |
| `get_youpin_buy_orders` | Best YouPin buy order per item; with `detail` or a float, phase, Fade or tier filter: every order with its float range | Pro / Enterprise |
| `get_float_ranged_prices` | YouPin lowest price per float range, with phase and Fade % | Pro |
| `get_price_history` | Daily or hourly price history on one market | Enterprise |
| `get_recent_sales` | Recent CSFloat, YouPin and Skinport sales with float, pattern and stickers | Enterprise |

Prices are in each market's own currency (CNY, EUR or USD). `price_usd` is an approximate conversion at ECB rates, for comparison only.

## Setup

### Claude Code

```bash
claude mcp add --transport http cspriceapi https://api.cspriceapi.com/mcp \
  --header "x-api-key: YOUR_API_KEY"
```

Leave out `--header` to use the preview.

### Claude (claude.ai and Claude Desktop)

Settings → Connectors → **Add custom connector**, URL `https://api.cspriceapi.com/mcp`. Custom connectors cannot send a key header, so this gives the preview. To use your key in Claude Desktop, add the server to `claude_desktop_config.json` through [mcp-remote](https://www.npmjs.com/package/mcp-remote):

```json
{
  "mcpServers": {
    "cspriceapi": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://api.cspriceapi.com/mcp", "--header", "x-api-key:${CSPRICEAPI_KEY}"],
      "env": { "CSPRICEAPI_KEY": "YOUR_API_KEY" }
    }
  }
}
```

### Cursor

`~/.cursor/mcp.json` (or `.cursor/mcp.json` in a project):

```json
{
  "mcpServers": {
    "cspriceapi": {
      "url": "https://api.cspriceapi.com/mcp",
      "headers": { "x-api-key": "YOUR_API_KEY" }
    }
  }
}
```

### VS Code (GitHub Copilot)

`.vscode/mcp.json`. VS Code asks for the key once and stores it securely:

```json
{
  "inputs": [
    { "type": "promptString", "id": "cspriceapi-key", "description": "CSPriceAPI key", "password": true }
  ],
  "servers": {
    "cspriceapi": {
      "type": "http",
      "url": "https://api.cspriceapi.com/mcp",
      "headers": { "x-api-key": "${input:cspriceapi-key}" }
    }
  }
}
```

### ChatGPT

Settings → Apps & Connectors → enable developer mode → **Create**, URL `https://api.cspriceapi.com/mcp`, authentication "No authentication". This uses the preview.

## Example prompts

- "What does a Karambit Doppler Factory New cost on BUFF163 and YouPin, per phase?"
- "Which marketplace is cheapest for an AK-47 Redline Field-Tested right now?"
- "Compare the YouPin buy order with the lowest listing for the M4A1-S Printstream Minimal Wear."
- "Show the 90-day YouPin price history of the AWP Dragon Lore Factory New."

## Notes

- Answers come from the same data as the REST API: listings refresh about every 5 minutes, YouPin buy orders about every 30 minutes.
- The server is read-only; it cannot buy, sell or touch any marketplace account.
- Questions or a tool you are missing: [Discord](https://discord.gg/XT3rpfH4Tx).
