CoinGecko
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Integrations
๐ CoinGecko API Server MCP
Seamless cryptocurrency data access for AI systems and applications
Features โข Quick Start โข Installation โข Configuration โข API Reference โข MCP Integration โข Pro API โข Troubleshooting โข License
๐ Overview
The CoinGecko API Server MCP is a powerful, production-ready Node.js solution that provides seamless access to cryptocurrency market data through an elegant RESTful API and MCP (Marketplace Component Program) interface. It bridges AI systems like Claude with real-time crypto data while handling all the complexities of API rate limits, fallbacks, and error handling.
โจ Key Features
- ๐ Dual API Support: Seamlessly integrates with both CoinGecko Free and Pro APIs
- ๐ง AI Integration: Full implementation of the MCP protocol for AI assistants
- ๐ก๏ธ Intelligent Fallback: Automatically switches between APIs to prevent rate limiting
- โก Optimized Performance: Efficient request handling and response caching
- ๐ Comprehensive Data: Access to all essential cryptocurrency metrics
- ๐ Simple Interface: Intuitive RESTful endpoints and JSON-RPC methods
- ๐ฆ Robust Error Handling: Clear error messages with appropriate status codes
- ๐งฉ Easy Deployment: Minimal configuration with guided setup process
- ๐ Extensive Documentation: Clear usage instructions and examples
๐ Quick Start
๐ฆ Installation
Option 1: Using npx (Recommended)
The quickest way to get started:
This will:
- ๐ฅ Download and install the server
- ๐งฐ Run an interactive setup wizard
- ๐ Ask for your CoinGecko API key (optional)
- ๐ Start the server automatically
Option 2: Manual Installation
For more control over the installation process:
โ๏ธ Configuration
The server is configured using environment variables in the .env
file:
Variable | Description | Default |
---|---|---|
PORT | Server port | 3000 |
COINGECKO_API_KEY | CoinGecko Pro API key (optional) | - |
CACHE_DURATION | Cache duration in seconds | 60 |
LOG_LEVEL | Logging level (error, warn, info, debug) | info |
๐ API Reference
RESTful Endpoints
Basic Endpoints
GET /api/ping
- Check API server status
Price Data
GET /api/simple/price
- Get price data for specified coins- Query params:
ids
,vs_currencies
,include_market_cap
,include_24hr_vol
,include_24hr_change
,include_last_updated_at
,precision
- Query params:
Coin Data
GET /api/coins/markets
- Get market data for coins- Query params:
vs_currency
,ids
,category
,order
,per_page
,page
,sparkline
,price_change_percentage
- Query params:
Market Data
GET /api/global
- Get global cryptocurrency dataGET /api/search/trending
- Get trending coins
Examples
Get Bitcoin Price in USD:
Response:
Get Top 5 Cryptocurrencies by Market Cap:
๐ค AI Integration (MCP)
This server implements the Marketplace Component Program (MCP) protocol, enabling AI systems like Claude to access cryptocurrency data.
MCP Integration Points
- JSON-RPC Endpoint:
/rpc
- Handles method calls from AI clients - Schema Definition:
/mcp/schema
- Defines available tools and parameters
Available MCP Methods
ping
- Check API statusgetPrice
- Get price data for specified cryptocurrenciesgetSupportedVsCurrencies
- Get list of supported currenciesgetCoinMarkets
- Get market data for coinsgetGlobal
- Get global cryptocurrency datagetTrending
- Get trending coins
For detailed integration instructions, see MCP_INTEGRATION.md.
๐ Pro API Benefits
This server supports both the CoinGecko Pro API and the free API:
Feature | Free API | Pro API |
---|---|---|
Rate Limit | ~30 calls/minute | ~500 calls/minute |
API Throttling | Yes | No |
Support | Community | Priority |
Data Freshness | 10-30 minutes | 1-2 minutes |
Price | Free | Subscription |
For more details about the Pro API setup, see USING_COINGECKO_PRO.md.
๐ง Troubleshooting
Issue | Solution |
---|---|
Rate limiting errors | Consider upgrading to Pro API or adjust your request frequency |
Connection refused | Ensure the server is running on the specified port |
Authentication errors | Check your API key in the .env file |
Missing data | Verify the parameters in your request |
๐งช Development
๐ How It Works
The server acts as a middleware between your applications and the CoinGecko API:
- Request Routing: Handles incoming requests from RESTful and JSON-RPC clients
- API Selection: Chooses between Free and Pro APIs based on configuration
- Rate Limit Management: Implements intelligent request throttling
- Response Processing: Formats and returns data in a consistent structure
- Error Handling: Provides detailed error information for troubleshooting
๐ฑ Use Cases
- AI-Powered Financial Advisors: Enable AI systems to access real-time crypto data
- Investment Dashboards: Build cryptocurrency dashboards with reliable data access
- Portfolio Trackers: Create applications to monitor crypto holdings
- Market Analysis Tools: Develop tools for technical and fundamental analysis
- Trading Bots: Power automated trading systems with market data
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐ Acknowledgments
- CoinGecko for the comprehensive cryptocurrency data API
- Anthropic for Claude AI and the MCP program
- The open-source community for their invaluable contributions
Made with โค๏ธ by [Your Organization]
This server cannot be installed
A powerful and flexible Node.js Express server that provides a comprehensive interface to the CoinGecko cryptocurrency data API. This server supports both the free public API and the Pro API with automatic fallback.
- ๐ Overview
- โจ Key Features
- ๐ Quick Start
- ๐ฆ Installation
- โ๏ธ Configuration
- ๐ API Reference
- ๐ค AI Integration (MCP)
- ๐ Pro API Benefits
- ๐ง Troubleshooting
- ๐งช Development
- ๐ How It Works
- ๐ฑ Use Cases
- ๐ License
- ๐ Acknowledgments