mylxsw/crypto-mcp
If you are the rightful owner of crypto-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The Crypto MCP Server is a FastMCP-based implementation designed to provide cryptocurrency market data from CoinMarketCap, enabling AI assistants to interact with cryptocurrency information through the MCP protocol.
Crypto MCP Server
A FastMCP-based MCP (Model Context Protocol) server implementation for retrieving cryptocurrency market data from CoinMarketCap, allowing AI assistants to interact with cryptocurrency information through the MCP protocol.
Features
- 📈 Cryptocurrency Listings - Get latest cryptocurrency listings with market data
- 💰 Cryptocurrency Quotes - Get latest quotes for specific cryptocurrencies
- 🗺️ Cryptocurrency Map - Get mapping of all cryptocurrencies to CoinMarketCap IDs
- ℹ️ Cryptocurrency Info - Get metadata for cryptocurrencies
- 🌐 Global Metrics - Get latest global cryptocurrency market metrics
- 🏦 Exchange Listings - Get list of all exchanges with market data
- 🔐 Authentication - Optional static token verification support
- 🐳 Docker Support - Docker and Docker Compose configurations provided
Environment Variables
Before starting the service, you need to set the following environment variables:
Required Environment Variables
| Variable Name | Description | Example |
|---|---|---|
COINMARKET_API_KEY | CoinMarketCap API key | your-api-key-here |
Optional Environment Variables
| Variable Name | Description | Default | Example |
|---|---|---|---|
CRYPTO_MCP_AUTH_TOKEN | MCP server authentication token | None | abcdefghijklmnopqrstuvwxyz |
Quick Start
Local Development
-
Clone the repository
git clone <repository-url> cd crpyto-mcp -
Install dependencies
uv sync -
Set environment variables
export COINMARKET_API_KEY="your-coinmarketcap-api-key" # Optional: Set authentication token export CRYPTO_MCP_AUTH_TOKEN="your-auth-token" -
Start the service
uv run main.py
The service will start at http://localhost:8000 with the MCP endpoint at http://localhost:8000/mcp.
Using Docker
-
Using Docker Compose (Recommended)
# Set environment variables export COINMARKET_API_KEY="your-coinmarketcap-api-key" # Start the service docker-compose up -d -
Using Docker directly
docker build -t crpyto-mcp . docker run -p 8000:8000 \ -e COINMARKET_API_KEY="your-coinmarketcap-api-key" \ crpyto-mcp
Connection
- Protocol: HTTP
- Endpoint:
http://localhost:8000/mcp - Port: 8000
Available Tools
Tools
get_cryptocurrency_listings
Get latest cryptocurrency listings with market data
- Parameters:
start(string, optional): Offset (starting with 1), defaults to "1"limit(string, optional): Number of results (default: 100, max: 5000), defaults to "100"sort(string, optional): What to sort by (e.g., 'market_cap', 'volume_24h')sort_dir(string, optional): Direction: 'asc' or 'desc'cryptocurrency_type(string, optional): Filter by type (e.g., 'coins', 'tokens')convert(string, optional): Currency to convert prices to (e.g., 'USD', 'EUR'), defaults to "USD"
get_cryptocurrency_quotes
Get latest quotes for specific cryptocurrencies
- Parameters:
symbol(string, optional): Comma-separated list of symbols (e.g., 'BTC,ETH')slug(string, optional): Comma-separated list of slugs (e.g., 'bitcoin,ethereum')id(string, optional): Comma-separated list of CoinMarketCap IDsconvert(string, optional): Currency to convert prices to (e.g., 'USD', 'EUR'), defaults to "USD"
get_cryptocurrency_map
Get mapping of all cryptocurrencies to CoinMarketCap IDs
- Parameters:
listing_status(string, optional): Filter by status (e.g., 'active', 'inactive'), defaults to "active"start(string, optional): Offset (starting with 1), defaults to "1"limit(string, optional): Number of results (default: 100, max: 5000), defaults to "100"symbol(string, optional): Filter by symbol(s) (comma-separated)
get_cryptocurrency_info
Get metadata for cryptocurrencies
- Parameters:
symbol(string, optional): Comma-separated list of symbols (e.g., 'BTC,ETH')slug(string, optional): Comma-separated list of slugs (e.g., 'bitcoin,ethereum')id(string, optional): Comma-separated list of CoinMarketCap IDs
get_global_metrics
Get latest global cryptocurrency market metrics
- Parameters:
convert(string, optional): Currency to convert prices to (e.g., 'USD', 'EUR'), defaults to "USD"
get_exchange_listings
Get list of all exchanges with market data
- Parameters:
start(string, optional): Offset (starting with 1), defaults to "1"limit(string, optional): Number of results (default: 100, max: 5000), defaults to "100"sort(string, optional): What to sort by (e.g., 'volume_24h')sort_dir(string, optional): Direction: 'asc' or 'desc'market_type(string, optional): Filter by market type (e.g., 'spot', 'derivatives')convert(string, optional): Currency to convert prices to (e.g., 'USD', 'EUR'), defaults to "USD"
Development
Project Structure
crpyto-mcp/
├── main.py # Main service file
├── pyproject.toml # Project configuration
├── Dockerfile # Docker configuration
├── docker-compose.yaml # Docker Compose configuration
└── README.md # Project documentation
Dependencies
- Python >= 3.13
- fastmcp >= 2.12.2
- requests >= 2.32.5
Development Environment Setup
- Ensure uv is installed
- Clone the repository and install dependencies:
uv sync - Set environment variables and run:
uv run main.py
License
This project is licensed under the MIT License. See the LICENSE file for details.
Contributing
Issues and Pull Requests are welcome!