A Model Context Protocol (MCP) server that provides Claude AI with real-time access to cryptocurrency data from the CoinMarketCap API.
This server provides the following tools to Claude:
- get-cryptocurrency-listings: Get the latest cryptocurrency market data
- get-cryptocurrency-quotes: Retrieve quotes for specific cryptocurrencies
- get-cryptocurrency-map: Fetch the mapping of cryptocurrencies to CoinMarketCap IDs
- get-cryptocurrency-info: Get detailed metadata for specific cryptocurrencies
- get-global-metrics: Access global cryptocurrency market metrics
- get-exchange-listings: Get information about cryptocurrency exchanges
-
discover-top: CMC top-N discovery narrowed via Binance 24h + OHLCV.
- Params:
topN(default 20),resultCount(default 5),interval(default1h),limit(default250),convert(defaultUSD),sort(market_cap|volume_24h|percent_change_24h, defaultmarket_cap),sort_dir(desc|asc, defaultdesc),rankMax(default50),atrPctMax(default1.0). - Ranking: prioritize stronger uptrend → lower ATR% → larger absolute 24h move.
- Output: compact summaries including
symbol,price,pct24h,vol24h,atrPct,trend,rating, and CMCrank/market_cap.
- Params:
-
discover-pick: Single-call “top N → best resultCount” with explicit strategy.
- Params: same as
discover-top, plusstrategy(strong_up_low_atrdefault, orstrong_up_high_vol). - Filters: applies
rankMaxandatrPctMaxbefore ranking. - Strategy ranking:
strong_up_low_atr: stronger uptrend → lower ATR% → higher volume → larger absolute 24h move.strong_up_high_vol: stronger uptrend → higher volume → lower ATR% → larger absolute 24h move.
- Params: same as
- A CoinMarketCap API key (get one at pro.coinmarketcap.com)
To integrate this MCP server with Claude Desktop:
-
Locate the Claude Desktop configuration file:
- On macOS:
~/Library/Application\ Support/Claude/claude_desktop_config.json
- On macOS:
-
Add the following configuration to the file:
{
"mcpServers": {
"cmc": {
"command": "npx",
"args": ["crypto-mcp"],
"env": {
"COINMARKET_API_KEY": "your-api-key-here"
}
}
}
}- Clone this repository
- Install dependencies:
# Using npm
npm install
# Using bun
bun install- Build the TypeScript code:
# Using npm
npm run build
# Using bun
bun run buildOnce configured, you can ask Claude to perform various cryptocurrency-related tasks:
- "Show me the top 10 cryptocurrencies by market cap"
- "What's the current price of Bitcoin and Ethereum?"
- "What are the global cryptocurrency market metrics today?"
- "Tell me about the Binance exchange"
-
"Discover top 20 by market cap and pick best 5 with low volatility"
- Tool:
discover-pick - Suggested params:
{"topN":"20","resultCount":"5","interval":"1h","limit":"250","sort":"market_cap","sort_dir":"desc","rankMax":"50","atrPctMax":"1.0","strategy":"strong_up_low_atr"}
- Tool:
-
"Show compact discovery of top movers"
- Tool:
discover-top - Suggested params:
{"topN":"20","resultCount":"5","interval":"1h","limit":"250","sort":"percent_change_24h","sort_dir":"desc","rankMax":"50","atrPctMax":"2.0"}
- Tool:
Average True Range (ATR) measures price volatility. It’s derived from True Range (TR), which for each candle is the maximum of:
- High − Low
- |High − Previous Close|
- |Low − Previous Close|
ATR is a smoothed (RMA) average of TR over a period (commonly 14). We use ATR% = ATR / lastClose * 100 to scale volatility relative to price. Lower ATR% often indicates steadier moves; filtering with atrPctMax helps avoid choppy assets.
This project uses TypeScript and the Model Context Protocol SDK to build a server that communicates with Claude AI.
To modify the available tools or add new endpoints, edit the src/index.ts file and rebuild the project.
Quick, auto-exiting discovery runs for testing:
# Top discovery with defaults (PowerShell on Windows)
$env:COINMARKET_API_KEY = "YOUR_KEY"; npm run discover
# Strategy picker with defaults
$env:COINMARKET_API_KEY = "YOUR_KEY"; npm run discover:pick
# Explicit thresholds
node .\examples\run-discover-pick.ts 20 5 strong_up_low_atr 1h 250 market_cap desc 50 1.0

