Getting Started
Connect your MCP client to the CoinAPI Market Data MCP server and run your first metadata, quote, trade, and OHLCV queries.
Getting Started with Market Data MCP
This guide shows how to connect an MCP client to the hosted CoinAPI Market Data MCP server and verify the connection with live requests.
Endpoint and authentication
- MCP endpoint:
https://mcp.md.coinapi.io/mcp - Header:
X-CoinAPI-Key: YOUR_API_KEY - Transport: HTTP streaming MCP
- Supported path: only
/mcp
Cursor example
Add the Market Data server to your MCP client configuration:
{
"mcpServers": {
"CoinAPI-Market-Data": {
"url": "https://mcp.md.coinapi.io/mcp",
"headers": {
"X-CoinAPI-Key": "YOUR_API_KEY_HERE"
}
}
}
}Replace YOUR_API_KEY_HERE with your actual API key and restart the client if required.
Or sign in with OAuth
The API key setup above keeps working. As an alternative, MCP clients that support OAuth, such as Claude Code, Cursor, VS Code, ChatGPT connectors and claude.ai connectors, can connect without an API key. Add the server URL with no key header:
{
"mcpServers": {
"CoinAPI-Market-Data": {
"url": "https://mcp.md.coinapi.io/mcp"
}
}
}The client opens the APIBricks sign-in page in your browser. Sign in, then choose the organization, the product (or all products), a name for the key and when it expires. Approving creates a JWT API key in that organization, and the client receives an access token for it. The key is listed on the API keys page of the customer portal; deleting it disconnects the client.
Access tokens are valid for 1 hour and the client refreshes them on its own. See OAuth access token for how the token works with the REST and WebSocket APIs.
First requests to try
1. Confirm asset identifiers
Call assets_list with:
{
"filter_asset_id": "BTC;USD;ETH"
}Example response excerpt:
[
{
"asset_id": "USD",
"name": "US Dollar",
"type_is_crypto": 0
},
{
"asset_id": "BTC",
"name": "Bitcoin",
"type_is_crypto": 1,
"price_usd": 67898.8476082248
},
{
"asset_id": "ETH",
"name": "Ethereum",
"type_is_crypto": 1,
"price_usd": 2065.31984899449
}
]2. Discover a valid trading symbol
Call symbols_list with:
{
"filter_exchange_id": "BITSTAMP",
"filter_asset_id": "BTC"
}Example response excerpt:
[
{
"symbol_id": "BITSTAMP_SPOT_BTC_USD",
"exchange_id": "BITSTAMP",
"symbol_type": "SPOT",
"asset_id_base": "BTC",
"asset_id_quote": "USD",
"price": 67880.5
},
{
"symbol_id": "BITSTAMP_SPOT_BTC_EUR",
"exchange_id": "BITSTAMP",
"symbol_type": "SPOT",
"asset_id_base": "BTC",
"asset_id_quote": "EUR",
"price": 58732
}
]3. Fetch a current quote snapshot
Call quotes_get_current_by_symbol with:
{
"symbol_id": "BITSTAMP_SPOT_BTC_USD"
}Example response:
{
"symbol_id": "BITSTAMP_SPOT_BTC_USD",
"time_exchange": "2026-04-07T14:08:02.248Z",
"ask_price": 67895,
"ask_size": 0.55619746,
"bid_price": 67894,
"bid_size": 0.03517375,
"last_trade": {
"price": 67881,
"size": 0.00316877,
"taker_side": "BUY"
}
}4. Fetch recent candles
Call ohlcv_get_history with:
{
"symbol_id": "BITSTAMP_SPOT_BTC_USD",
"period_id": "1HRS",
"time_start": "2026-04-07T00:00:00Z",
"limit": 3
}Example response excerpt:
[
{
"time_period_start": "2026-04-07T00:00:00Z",
"price_open": 68856.5,
"price_high": 69403.5,
"price_low": 67026.5,
"price_close": 68771,
"volume_traded": 31.86559015,
"trades_count": 835
}
]5. Fetch recent trades
Call trades_get_latest_by_symbol with:
{
"symbol_id": "BITSTAMP_SPOT_BTC_USD",
"limit": 2
}Example response excerpt:
[
{
"symbol_id": "BITSTAMP_SPOT_BTC_USD",
"price": 67881,
"size": 0.00316877,
"taker_side": "BUY"
}
]6. Fetch an asset-level exchange rate
Call exchangerate_get_rate with:
{
"asset_id_base": "BTC",
"asset_id_quote": "USD"
}Example response:
{
"time": "2026-04-07T14:08:02",
"asset_id_base": "BTC",
"asset_id_quote": "USD",
"rate": 67892.8660433744
}Recommended workflows
Realtime symbol workflow
- Call
symbols_listorsymbols_get_by_exchange. - Choose a
symbol_id. - Use
quotes_get_current_by_symbol,trades_get_latest_by_symbol, andorderbooks_get_currenttogether.
Historical analytics workflow
- Call
ohlcv_list_periods. - Request candles with
ohlcv_get_history. - Add
quotes_get_historyortrades_get_historywhen you need event-level detail.
Metadata-first workflow
- Validate inputs with
assets_list,exchanges_list, orchains_list. - Resolve exact symbols through
symbols_list. - Cache metadata locally because it changes much less often than market data.
Troubleshooting
No tools appear in the client
- Verify the endpoint is exactly
https://mcp.md.coinapi.io/mcp. - Confirm the request includes the
X-CoinAPI-Keyheader. - Restart the MCP client after editing its configuration.
A symbol-based request fails
- Use
symbols_listto confirm the exactsymbol_id. - Prefer uppercase IDs such as
BITSTAMP_SPOT_BTC_USD. - Narrow by exchange first if many similar symbols exist.
Responses are too large
- Use filters such as
filter_asset_id,filter_exchange_id, orfilter_symbol_id. - Set
limitorlimit_levelswhere available. - Cache metadata and icon payloads client-side.