home / mcp / coingecko server

CoinGecko Server

Provides CoinGecko Pro API access via MCP for price history, OHLC data, and coin lookups.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "crazyrabbitltc-mcp-coingecko-server": {
      "command": "node",
      "args": [
        "/path/to/coingecko-server/build/index.js"
      ],
      "env": {
        "COINGECKO_API_KEY": "your-api-key-here"
      }
    }
  }
}

This MCP server lets you interact with the CoinGecko Pro API through Model Context Protocol function calls. It exposes handy tools to list coins, look up IDs, fetch historical data, retrieve OHLC data, and refresh a local cache, enabling you to build conversational assistants or automation that relies on real-time crypto data.

How to use

You can use this MCP server with any MCP-enabled client to access CoinGecko data. You have two primary connection options: a remote HTTP MCP endpoint or a local stdio-based server you run on your machine. The available tools let you list coins, resolve CoinGecko IDs, fetch historical data and OHLC candlesticks, and refresh the local coin cache. Use the HTTP endpoint when you want a hosted, shared server; use the local stdio setup when you want to run the server directly in your environment.

How to install

Prerequisites: you need Node.js and npm installed on your system.

Install the CoinGecko MCP server package.

npm install coingecko-server

Create a configuration file in your project root to run the server locally. You can expose a local stdio server that runs via node and points to the built index file. For example, the runtime configuration might look like this.

{
  "mcpServers": {
    "coingecko": {
      "command": "node",
      "args": ["/path/to/coingecko-server/build/index.js"],
      "env": {
        "COINGECKO_API_KEY": "your-api-key-here"
      }
    }
  }
}

Additional setup and notes

Set up the API key by placing it in a .env file at your project root or by providing it through your environment when starting the server. The example environment snippet uses COINGECKO_API_KEY.

Configuration snippets

{
  "mcpServers": {
    "coingecko": {
      "type": "http",
      "name": "coingecko_http",
      "url": "https://docs.coingecko.com/reference/mcp-server",
      "args": []
    }
  }
}
```
```json
{
  "mcpServers": {
    "coingecko": {
      "command": "node",
      "args": ["/path/to/coingecko-server/build/index.js"],
      "env": {
        "COINGECKO_API_KEY": "your-api-key-here"
      }
    }
  }
}

Available tools

get-coins

Fetch a paginated list of supported coins with basic metadata.

find-coin-ids

Lookup CoinGecko IDs by coin name or symbol.

get-historical-data

Retrieve historical price, market cap, and total volume data for a coin.

get-ohlc-data

Retrieve Open/High/Low/Close candlestick data for a coin.

refresh-cache

Refresh the local coin list cache to reflect the latest coins.