Get the FREE Ultimate OpenClaw Setup Guide →

mcp-coingecko

An Anthropic MCP server (with OpenAI Function calling compatibility) for the Coingecko Pro API

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio crazyrabbitltc-mcp-coingecko-server node /path/to/coingecko-server/build/index.js \
  --env COINGECKO_API_KEY="your-api-key-here"

How to use

This MCP server exposes a CoinGecko-integrated set of tools that allow you to fetch cryptocurrency data through a standardized MCP interface. It provides capabilities to list supported coins, look up CoinGecko IDs by name or symbol, retrieve historical price data, obtain OHLC candlestick data, and refresh the local coin cache. You can integrate these tools into your automation or chat workflows via MCP, or call them directly from OpenAI Function Calling workflows using the provided function definitions.

Key tools available:

  • get-coins: Retrieve a paginated list of supported cryptocurrencies.
  • find-coin-ids: Resolve CoinGecko IDs from coin names or symbols.
  • get-historical-data: Fetch historical price, market cap, and volume data for a coin over a specified time range.
  • get-ohlc-data: Obtain OHLC candlestick data for a coin over a specified interval.
  • refresh-cache: Refresh the local coin list cache to ensure up-to-date mappings.

Usage typically starts by provisioning the MCP server via your environment (node-based server in this repo) and configuring your client (Claude Desktop or OpenAI Function Calling) to call the available functions. With Claude Desktop, you can reference the server as a local MCP endpoint and supply the necessary API key via environment variables. With OpenAI Function Calling, you load the function definitions from the CoinGecko service and invoke them from your prompts or code, then handle the returned arguments to execute the corresponding data fetch on the server.

How to install

Prerequisites:

  • Node.js (recommended latest LTS)
  • npm or yarn
  • Access to CoinGecko Pro API and an API key (if required by the server variant)

Install steps:

  1. Install the MCP server package (as a general Node.js server, per this repository):

    • npm install coingecko-server
    • or if you have a local clone, run npm install in the project root
  2. Set up environment variables:

    • Create a .env file in your project root and add: COINGECKO_API_KEY=your_api_key_here
  3. Build or run the server:

    • If there is a build step, run the project-specific build command (e.g., npm run build) and then start the server with Node: node /path/to/coingecko-server/build/index.js
    • Alternatively, if you are using a Docker-based or other package setup, follow those instructions as provided by your deployment method.
  4. Verify the server is reachable locally (e.g., by checking logs or a health endpoint) and that the MCP function definitions are exposed for OpenAI or Claude Desktop integration.

Additional notes

Tips and common considerations:

  • Ensure COINGECKO_API_KEY is kept secure and not committed to source control.
  • If you switch to the official CoinGecko MCP server, update the mcp_config accordingly and test function calls.
  • When using Claude Desktop, ensure the path to the built server (index.js) is correct for your environment and that environment variables are provided in the Claude config.
  • The server exposes a set of functions that should be called via function definitions in your client integration; handle function_call arguments safely by parsing JSON before executing requests to CoinGecko.
  • Check rate limits of CoinGecko Pro API and implement caching where appropriate to minimize redundant requests.
  • If you encounter connection errors, verify network access from the client to the Node server and confirm that the correct port is exposed if using a networked setup.

Related MCP Servers

Sponsor this space

Reach thousands of developers