abiesaga90/coingecko-mcp-server
If you are the rightful owner of coingecko-mcp-server 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 CoinGecko MCP Server allows users to access real-time cryptocurrency data and analytics through a Model Context Protocol, compatible with AI clients like Claude Desktop.
š¦ CoinGecko MCP Server Setup
A comprehensive setup guide for running the CoinGecko MCP (Model Context Protocol) Server locally with Claude Desktop or any MCP-compatible AI client.
š Features
With the CoinGecko MCP Server, you can ask AI assistants to:
- š Get real-time crypto prices for 15,000+ cryptocurrencies
- š Market data & analytics including trading volumes, market caps
- š„ Trending coins & categories based on CoinGecko search data
- šļø DeFi protocols and yield farming opportunities
- šŖ Historical price data and OHLC charts
- š On-chain DEX data from GeckoTerminal (200+ networks)
- š Token metadata including contracts, security info, descriptions
- šÆ Portfolio analysis and performance tracking
š Quick Start
1. Prerequisites
- Node.js 18+ (we'll install via nvm)
- CoinGecko API Key (Get Demo Key - 10,000 requests/month free)
- Claude Desktop or any MCP-compatible client
2. Setup Environment
# Install nvm (Node Version Manager)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
# Reload your shell or run:
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
# Install Node.js LTS
nvm install --lts
nvm use --lts
3. Configure MCP Server
For Claude Desktop:
-
Copy the template:
cp claude_desktop_config.template.json claude_desktop_config.json
-
Add your API key: Edit
claude_desktop_config.json
and replaceYOUR_COINGECKO_API_KEY_HERE
with your actual API key. -
Install to Claude Desktop:
# macOS mkdir -p ~/Library/Application\ Support/Claude cp claude_desktop_config.json ~/Library/Application\ Support/Claude/claude_desktop_config.json # Windows mkdir -p $APPDATA/Claude cp claude_desktop_config.json $APPDATA/Claude/claude_desktop_config.json
-
Restart Claude Desktop
4. Test Installation
# Test the MCP server
COINGECKO_DEMO_API_KEY="your_api_key_here" COINGECKO_ENVIRONMENT="demo" npx -y @coingecko/coingecko-mcp --list
š” Example Queries
Once configured, ask Claude:
Basic Queries
- "What is the current price of Bitcoin?"
- "Show me the top 10 cryptocurrencies by market cap"
- "What are the trending coins today?"
Advanced Analysis
- "Compare the performance of Ethereum, Solana, and Cardano over the last 30 days"
- "Show me the top DeFi tokens and their 24h volume"
- "What are the best performing categories in crypto this week?"
Data-Driven Insights
- "Create a risk-return analysis of the top 15 DeFi tokens"
- "Show me the correlation between Bitcoin dominance and altcoin performance"
- "Analyze the liquidity trends in DEX protocols"
š Visualization Examples
The repository includes Python scripts for creating sophisticated crypto visualizations:
- DeFi Sector Analysis (
defi_analysis.py
) - 6-panel dashboard with performance metrics - Crypto Visualizer (
crypto_visualizer.py
) - Interactive charts using Plotly - Market Health Scoring - Custom algorithms for sector analysis
Running Visualizations
# Install Python dependencies
pip install matplotlib plotly pandas seaborn
# Run DeFi sector analysis
python3 defi_analysis.py
# Run crypto visualizer demo
python3 crypto_visualizer.py
š§ Configuration Files
File | Purpose |
---|---|
claude_desktop_config.template.json | Claude Desktop MCP configuration template |
mcp_config.template.json | General MCP client configuration template |
setup_environment.sh | Automated environment setup script |
test_coingecko_mcp.sh | MCP server testing script |
š API Limitations
Demo API (Free)
- ā 10,000 requests/month
- ā ~30 requests/minute
- ā Basic endpoints (prices, markets, trending)
- ā DEX data (GeckoTerminal integration)
- ā No premium endpoints (advanced analytics)
Pro API (Paid)
- ā Higher rate limits (plan-dependent)
- ā Premium endpoints (OHLC, supply charts)
- ā Enterprise features (webhooks, bulk data)
šÆ Optimized Prompting
To maximize your API quota:
High-Efficiency Queries (1-2 API calls)
"Get the current global crypto market overview with Bitcoin dominance"
"Show top 50 cryptocurrencies with biggest gains/losses today"
"List all DeFi categories with their total market caps"
Multi-Asset Analysis (3-5 API calls)
"Compare Bitcoin, Ethereum, BNB, Solana, and Cardano across all metrics"
"Analyze the top 10 DEX tokens with volume and liquidity data"
"Show trending vs top market cap coins side by side"
š ļø Development
Project Structure
coingecko-mcp/
āāā README.md # This file
āāā .gitignore # Git ignore rules
āāā claude_desktop_config.template.json # Claude Desktop config template
āāā mcp_config.template.json # General MCP config template
āāā setup_environment.sh # Environment setup script
āāā test_coingecko_mcp.sh # Testing script
āāā crypto_visualizer.py # Visualization toolkit
āāā defi_analysis.py # DeFi sector analysis
āāā examples/ # Usage examples
Contributing
- Fork the repository
- Create a feature branch
- Add your improvements
- Test with your API key
- Submit a pull request
š Security
- ā ļø Never commit your API keys to version control
- ā Use the template files and add your keys locally
- ā
Add
*_config.json
to.gitignore
(already included) - ā Keep your Demo API key private and rotate regularly
š Resources
- CoinGecko API Documentation
- Model Context Protocol (MCP) Spec
- Claude Desktop Download
- CoinGecko MCP Server Package
š Troubleshooting
Common Issues
"MCP server not loading"
# Check Node.js installation
node --version && npm --version
# Verify nvm is loaded
export NVM_DIR="$HOME/.nvm" && [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
"API key invalid"
# Test your API key
curl "https://api.coingecko.com/api/v3/ping?x_cg_demo_api_key=YOUR_KEY_HERE"
"Rate limit exceeded"
- Check your monthly quota in the CoinGecko Dashboard
- Use more efficient prompts (see Optimized Prompting section)
š License
MIT License - see file for details.
Made with ā¤ļø for the crypto community
Star ā this repo if it helped you build better crypto AI tools!