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.
# Install and run with npx
npx coingecko-api-server
# Or clone and install manually
git clone https://github.com/GaplyDev01/coingecko-api-server.git
cd coingecko-api-server
npm install
npm run setup
npm start
This is the fastest way to get started:
npx coingecko-api-server
The interactive setup will:
If you prefer to set up manually:
# Clone the repository
git clone https://github.com/GaplyDev01/coingecko-api-server.git
cd coingecko-api-server
# Install dependencies
npm install
# Run the setup script
npm run setup
# Start the server
npm start
The server can be configured using environment variables in the .env
file:
Variable | Description | Default |
---|---|---|
PORT |
The port the server will listen on | 3000 |
COINGECKO_API_KEY |
Your CoinGecko Pro API key | - |
The server provides access to all essential CoinGecko API endpoints:
GET /api/ping
- Check CoinGecko API statusGET /api/simple/price
- Get price data for specified coinsids
, vs_currencies
, include_market_cap
, include_24hr_vol
, include_24hr_change
, include_last_updated_at
, precision
GET /api/simple/supported_vs_currencies
- Get list of supported vs currenciesGET /api/coins/markets
- Get market data for coinsvs_currency
, ids
, category
, order
, per_page
, page
, sparkline
, price_change_percentage
GET /api/global
- Get global cryptocurrency dataGET /api/search/trending
- Get trending coinsFull API documentation can be found in the CoinGecko API Documentation.
This is an MCP (Marketplace Component Program) server compatible with AI systems like Claude. To use this server in Claude Desktop:
http://localhost:3000
)The server implements the full MCP specification with JSON-RPC 2.0:
/rpc
- Handles all method calls from AI clients/mcp/schema
- Defines available tools and parametersFor detailed integration instructions, see MCP_INTEGRATION.md.
This server supports both the CoinGecko Pro API and the free API:
The server automatically detects if an API key is provided and uses the appropriate API. If no key is provided, it will fall back to the free API, which is ideal for development or personal use.
For more details about the Pro API setup, see USING_COINGECKO_PRO.md.
# Run in development mode with hot reload
npm run dev
The server uses direct fetch calls to the CoinGecko API, ensuring compatibility with both free and Pro versions.
This project is licensed under the MIT License - see the LICENSE file for details.