---
title: Introduction
description: Use the CoinAPI Market Data API through a hosted MCP server with live metadata, quotes, trades, order books, OHLCV, exchange rates, and metrics tools.
order: 10
---

import { Card, Cards } from 'fumadocs-ui/components/card'

# Market Data API MCP

The **CoinAPI Market Data API** is available through a hosted [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server.
It exposes the API as self-describing tools that MCP-aware clients can inspect and call directly.

## Why use MCP?

MCP puts JSON-Schema tool definitions in front of the underlying API so agent runtimes can:

- discover available operations automatically
- validate arguments before sending requests
- reuse your normal `X-CoinAPI-Key` authentication
- work with one hosted endpoint instead of a custom adapter

## Server endpoint

```text
https://mcp.md.coinapi.io/mcp
```

Use your regular CoinAPI API key in the `X-CoinAPI-Key` header.

> Only the `/mcp` endpoint is supported for this service.

## What is available through MCP?

The Market Data MCP server currently exposes **53 tools** across these areas:

| Area | What you can do |
|------|------------------|
| Metadata | Discover assets, exchanges, symbols, chains, mappings, and icon catalogs. |
| Exchange rates | Get spot conversion rates, one-to-many rates, historical rate series, and supported periods. |
| Quotes and trades | Fetch current quotes, recent quote updates, latest trades, and historical executions. |
| Order books | Access L2 snapshots, aggregated depth, recent book history, and L3 order-book views where supported. |
| OHLCV | Retrieve candle history, latest bars, exchange-wide bars, and valid period definitions. |
| Options | Inspect current options chains by exchange. |
| Metrics | Query both classic metrics and V2 external metrics for assets, exchanges, symbols, and chains. |

## Typical workflows

### Market discovery

1. Call `assets_list` or `exchanges_list`.
2. Narrow down with `symbols_list` or `symbols_get_by_exchange`.
3. Use `symbols_get_mapping` when you need exchange-native symbol IDs.

### Realtime market monitoring

1. Start from a known `symbol_id` such as `BITSTAMP_SPOT_BTC_USD`.
2. Call `quotes_get_current_by_symbol` for the live bid/ask snapshot.
3. Call `trades_get_latest_by_symbol` for recent executions.
4. Call `orderbooks_get_current` or `orderbooks_get_depth` for liquidity.

### Historical analysis

1. Call `ohlcv_list_periods` or `exchangerate_list_periods`.
2. Use `ohlcv_get_history`, `quotes_get_history`, `trades_get_history`, or `exchangerate_get_history`.
3. Add metrics history tools when you need derived time series.

## Live-tested notes

- `assets_list` returns rich asset metadata including activity windows, volume, icon IDs, and chain addresses.
- `symbols_list` can be filtered by exchange, asset, or symbol fragments to quickly locate valid `symbol_id` values.
- `quotes_get_current_by_symbol` returns bid/ask plus nested `last_trade` data in one call.
- `ohlcv_get_history` returns candles in ascending time order.
- `trades_get_latest_by_symbol` returns the newest executions in descending order.
- `exchangerate_get_rate` is also available here, so agents can combine symbol-level and asset-level pricing from one MCP server.

## Start here

<Cards>
  <Card
    title="Getting Started"
    href="/products/market-data-api/docs/mcp/getting-started"
    description="Configure an MCP client, authenticate requests, and run your first live Market Data queries."
  />
  <Card
    title="Metadata Tools"
    href="/products/market-data-api/docs/mcp/tool-reference-metadata"
    description="Reference for assets, exchanges, symbols, chains, mappings, and icon-related MCP tools."
  />
  <Card
    title="Market Data Tools"
    href="/products/market-data-api/docs/mcp/tool-reference-market-data"
    description="Reference for exchange rates, quotes, trades, order books, OHLCV, and options tools."
  />
  <Card
    title="Metrics Tools"
    href="/products/market-data-api/docs/mcp/tool-reference-metrics"
    description="Reference for classic metrics and V2 metrics across assets, exchanges, symbols, and chains."
  />
</Cards>
