coingecko-mcp-server

abiesaga90/coingecko-mcp-server

3.1

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.

License: MIT Node.js CoinGecko API

šŸ“‹ 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:
  1. Copy the template:

    cp claude_desktop_config.template.json claude_desktop_config.json
    
  2. Add your API key: Edit claude_desktop_config.json and replace YOUR_COINGECKO_API_KEY_HERE with your actual API key.

  3. 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
    
  4. 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

FilePurpose
claude_desktop_config.template.jsonClaude Desktop MCP configuration template
mcp_config.template.jsonGeneral MCP client configuration template
setup_environment.shAutomated environment setup script
test_coingecko_mcp.shMCP 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

  1. Fork the repository
  2. Create a feature branch
  3. Add your improvements
  4. Test with your API key
  5. 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

šŸ†˜ 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!