Skip to main content
Glama
yusnmt

crypto-price-mcp

by yusnmt
README.md
# crypto-price-mcp

MCP (Model Context Protocol) server that fetches cryptocurrency prices from multiple exchanges.

## Features

- Fetch real-time prices from 8 exchanges in parallel
- Compare prices across all exchanges and find the best rate
- Get 24-hour volume rankings per exchange
- List all tradable pairs on a given exchange

## Supported Exchanges

| Exchange | Region | Quote Currency |
|----------|--------|---------------|
| Binance  | Global | USDT |
| Coinbase | Global | USD  |
| Kraken   | Global | USD  |
| Bybit    | Global | USDT |
| OKX      | Global | USDT |
| Bitget   | Global | USDT |
| bitFlyer | Japan  | JPY  |
| GMO Coin | Japan  | JPY  |

## MCP Tools

### `get_price`
Fetch the current price of a cryptocurrency from one or more exchanges.

```
symbol    : Asset symbol (e.g., BTC, ETH, SOL)
exchanges : (optional) List of exchanges to query. Defaults to all.
```

### `compare_prices`
Compare prices across all exchanges and show the lowest/highest price with spread percentage.

```
symbol : Asset symbol (e.g., BTC, ETH, SOL)
```

### `get_top_ranking`
Get the top N cryptocurrencies ranked by 24-hour volume on a given exchange.

```
exchange : Exchange name
limit    : (optional) Number of results. Default: 10, max: 50
```

### `get_pairs`
List all tradable pairs available on a given exchange.

```
exchange : Exchange name
```

## Setup

Requires Python 3.12+ and [uv](https://docs.astral.sh/uv/).

```bash
git clone https://github.com/your-username/crypto-price-mcp.git
cd crypto-price-mcp
uv sync
```

## Usage

### Run the server directly

```bash
uv run python -m crypto_price_mcp.server
```

### Connect to Claude Desktop

Add the following to your Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json`):

```json
{
  "mcpServers": {
    "crypto-price-mcp": {
      "command": "/path/to/uv",
      "args": [
        "--directory",
        "/path/to/crypto-price-mcp",
        "run",
        "python",
        "-m",
        "crypto_price_mcp.server"
      ]
    }
  }
}
```

## Development

```bash
# Run tests
uv run pytest

# Lint
uv run ruff check src tests

# Type check
uv run mypy src
```

## Tech Stack

- [MCP Python SDK](https://github.com/modelcontextprotocol/python-sdk) — MCP server framework
- [httpx](https://www.python-httpx.org/) — Async HTTP client
- [uv](https://docs.astral.sh/uv/) — Package manager

TDQS

A3.8/5.0

Scored across 4 tools

Disambiguation3/5

Most tools are clearly distinct, but get_price and compare_prices overlap: both retrieve current prices, with compare_prices adding cross-exchange comparison and min/max output. The descriptions help clarify the difference, but an agent could still be uncertain which tool to use for a single-exchange price query.

Naming Consistency4/5

Tool names mostly follow a get_ prefix pattern: get_top_ranking, get_price, get_pairs. compare_prices deviates slightly but is still readable and consistent with snake_case naming. Overall the pattern is predictable.

Tool Count5/5

Four tools is well-scoped for a crypto price MCP server. Each tool covers a distinct core need: price lookup, price comparison, tradable pairs, and volume ranking, without unnecessary bloat.

Completeness4/5

The tool surface covers the primary price-checking workflow: retrieving prices, comparing prices across exchanges, discovering pairs, and checking volume rankings. Historical price data or market cap information would be nice additions, but their absence does not create a serious dead end for the stated purpose.

Maintenance

ActivityInactive
ResponsivenessNo issues