coingecko-mcp-server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@coingecko-mcp-serverWhat's the current price of Bitcoin?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Overview
Cryptocurrency market data from CoinGecko — prices, rankings, historical charts, and deep coin profiles across 15,000+ coins. Resolve a name or ticker to CoinGecko's slug-keyed ID, then chain into price lookups, ranked markets, and trend charts. Runs as a stdio process or a local Streamable HTTP server.
Tools
Tool | Description |
| Resolve a coin name or ticker symbol to a CoinGecko ID (slug). The required first step before any ID-keyed tool. |
| Current price and core market stats for one or more coins in one or more currencies. Batch up to 250 slugs; reports unresolved ids in a |
| Ranked market table — top coins by market cap, volume, or 24h change, optionally filtered to a category. |
| Deep single-coin profile — description, links, market data, developer activity, community, sentiment. |
| Historical price, market cap, and volume series. |
| Coins trending on CoinGecko in the last 24 hours, by search volume. |
| Global crypto market snapshot — total market cap and volume, BTC/ETH dominance, active counts, ongoing ICOs, 24h change. |
| Coin categories ( |
Resources
Resource | Description |
| Deep coin record by slug — same data as |
| Global crypto market snapshot — same data as |
All resource data is also reachable via tools — the resources mirror coingecko_get_coin and coingecko_get_global exactly, so tool-only clients lose nothing. Large collections (markets, categories) are not exposed as resources; use coingecko_list_markets and coingecko_list_categories instead.
Prompts
Prompt | Description |
| Guides a full single-coin research pass through the search → get_coin → get_market_chart → get_global chain. |
Related MCP server: crypto-data-mcp
Capability reference
coingecko_search_coins tool
Tickers are not unique (many coins share
ETH/USDC) — returns ranked candidates withid,symbol,name, andmarketCapRankto disambiguateReturns the top 25 matches by relevance;
enrichment.truncatedplusshown/capdisclose when the list is cappedAn empty result is a normal outcome, not an error —
enrichment.noticesuggests broadening the query
coingecko_get_prices tool
Batch up to 250 slugs across one or more currencies (
vs_currenciesdefaults to["usd"]) in a single callOne row per
(id, currency)that returned a price; market cap, 24h volume, and 24h change are optional per rowA wrong or unknown slug returns a silent empty response upstream rather than an error —
missinglists unresolved ids so a typo reads as "unresolved," not "nonexistent"Unsupported currency codes are silently dropped upstream and surfaced via
enrichment.noticelastUpdatedAtUnixSec, when present, is Unix seconds —coingecko_get_market_chart's point timestamps are millisecondsThrows
all_missingonly when no requested id resolves
coingecko_list_markets tool
Sort by market cap, volume, or 24h price change, ascending or descending, via
orderOptional
categoryfilter — pass acategoryIdfromcoingecko_list_categoriesPagination via
pageandper_page(default 50, max 250 rows);enrichment.truncateddiscloses when a page fillsPer-coin fields include price, cap, volume, 1h/24h/7d change, supply, and ATH/ATL
Throws
unknown_categorywhen a category filter returns empty — CoinGecko returns empty rather than erroring on an unrecognized slug
coingecko_get_coin tool
Six sections —
profile,market,links,developer,community,sentiment;sectionstrims the response to just what's needed (the full record is large)Market figures are denominated in
vs_currency(defaults tousd)profile.categoriesare display names (e.g."Layer 1 (L1)") — distinct from thecategoryIdslugscoingecko_list_categoriesreturnsSparse upstream fields are omitted rather than fabricated
Throws
coin_not_foundwhen the slug isn't recognized upstream
coingecko_get_market_chart tool
recentmode: last N days (or"max"); granularity auto-scales by span — ≤1 day → ~5-min, 2–90 → hourly, >90 → dailyrangemode: an explicit window viafrom/toas Unix secondsReturns timestamped point arrays for price, market cap, and volume in
vs_currency(defaults tousd)Point timestamps are Unix milliseconds —
coingecko_get_prices'slastUpdatedAtUnixSecis secondsThrows
invalid_rangeon a mode/parameter mismatch,coin_not_foundwhen the slug isn't recognized
coingecko_get_trending tool
No parameters — 24-hour trending coins by search volume, each with
marketCapRank,priceUsd,priceBtc, andpriceChangePercentage24hUsdwhen availableUpstream reports market cap and volume as pre-formatted display strings, not numbers — those fields are omitted rather than presented as numeric data
nftCountreports the trending-NFT count upstream also returns; NFT detail itself isn't surfaced
coingecko_get_global tool
No coin id needed — one call for the macro snapshot
vs_currency(defaultusd) scopes only total market cap and volume; dominance and the 24h change percentages are always USD-denominated upstreamThrows
unsupported_currencywhen the requested currency has no entry in upstream's per-currency maps —/globalhas no upstream currency validation, so an unknown code silently returns no totalsReturns active-cryptocurrency and active-market counts, ongoing ICO count, and a Unix-second snapshot timestamp
coingecko_list_categories tool
Optional
name_containsfilters the ~800-category list locally by whitespace-separated tokens — case- and punctuation-insensitive, every token must appear in the nameenrichment.totalCountreports the total category count before any local filterReturned
categoryIdvalues are whatcoingecko_list_markets'scategoryparam expectsA filter that matches nothing returns
enrichment.noticesuggesting an unfiltered browse instead
coingecko://coin/{id} resource
Same data as
coingecko_get_coin's full record, always denominated in USD{id}is a CoinGecko slug (e.g."bitcoin") — resolve tickers withcoingecko_search_coinsThrows
coin_not_foundwhen the slug isn't recognized upstream
coingecko://global resource
Same data as
coingecko_get_global, always denominated in USDNo parameters
coingecko_coin_research prompt
Argument:
coinrequired — a name, ticker, or CoinGecko slugReturns an assistant framing message plus a user message that walks the search → get_coin → get_market_chart → get_global chain
Features
Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.
CoinGecko-specific:
Type-safe client for the CoinGecko v3 REST API, with one service method per endpoint
Runs keyless on the public tier; an optional Demo API key (
x-cg-demo-api-key) raises the rate ceiling with no other config changeCalibrated retry/backoff on the rate-limited public tier — 429s, 5xx, and timeouts retry;
Retry-Afteris honoredThree distinct upstream error shapes mapped to typed reasons (404 →
coin_not_found, 429 →rate_limited, the/simple/pricesilent miss handled as amissingfield, not an error)
Agent-friendly output:
Search-before-query enforced through descriptions — every ID-keyed tool states slugs-not-tickers and points back to
coingecko_search_coinsProvenance and graceful degradation —
coingecko_get_pricesreports unresolved ids and dropped currencies instead of failing; truncation and applied filters are disclosed via enrichmentUnits made explicit — timestamp fields document seconds vs. milliseconds so callers don't misread them
Required CoinGecko attribution ships on every tool and resource output; the research prompt instructs the agent to attribute its findings the same way
Getting started
Add the following to your MCP client configuration file. No API key is required — set COINGECKO_API_KEY only to attach the higher CoinGecko Demo tier (see Configuration).
{
"mcpServers": {
"coingecko-mcp-server": {
"type": "stdio",
"command": "bunx",
"args": ["@cyanheads/coingecko-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info"
}
}
}
}Or with npx (no Bun required):
{
"mcpServers": {
"coingecko-mcp-server": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@cyanheads/coingecko-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info"
}
}
}
}Or with Docker:
{
"mcpServers": {
"coingecko-mcp-server": {
"type": "stdio",
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "MCP_TRANSPORT_TYPE=stdio",
"ghcr.io/cyanheads/coingecko-mcp-server:latest"
]
}
}
}To attach a CoinGecko Demo key, add "COINGECKO_API_KEY": "your-demo-key" to the env block (or -e COINGECKO_API_KEY=your-demo-key for Docker).
For Streamable HTTP, set the transport and start the server:
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http
# Server listens at http://localhost:3010/mcpPrerequisites
Bun v1.4.0 or higher (or Node.js v24+).
No account or API key required to run. Optionally, a free CoinGecko Demo API key for a higher rate ceiling (10k calls/month, 100 req/min) over the shared keyless public pool.
Installation
Clone the repository:
git clone https://github.com/cyanheads/coingecko-mcp-server.gitNavigate into the directory:
cd coingecko-mcp-serverInstall dependencies:
bun installConfigure environment (optional):
cp .env.example .env
# the server runs with no .env at all; edit only to set COINGECKO_API_KEYConfiguration
The server runs with zero configuration. The one server-specific variable is optional:
Variable | Description | Default |
| Optional CoinGecko Demo API key. When set, it is sent as the | — |
| Transport: |
|
| Port for the HTTP server. |
|
| HTTP endpoint path. |
|
| HTTP session mode: |
|
| Auth mode: |
|
| Log level (RFC 5424). |
|
| Directory for log files (Node.js only). |
|
| Storage backend. |
|
| Enable OpenTelemetry instrumentation (spans, metrics, completion logs). |
|
See .env.example for the full list of optional overrides.
Rate limits and freshness. The keyless public tier shares an IP-throttled pool, so bursty multi-tool workflows can hit 429s under light load; the server backs off and retries, but cannot raise the ceiling — a free Demo key does. CoinGecko data refreshes roughly every 60 seconds and is not tick-level.
Running the server
Local development
Build and run:
# One-time build bun run rebuild # Run the built server bun run start:stdio # or bun run start:httpRun checks and tests:
bun run devcheck # Lint, format, typecheck, security bun run test # Vitest test suite bun run lint:mcp # Validate MCP definitions against spec
Docker
docker build -t coingecko-mcp-server .
docker run --rm -e MCP_TRANSPORT_TYPE=http -p 3010:3010 coingecko-mcp-serverThe Dockerfile defaults to HTTP transport, stateless session mode, and logs to /var/log/coingecko-mcp-server. OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them.
Project structure
Directory | Purpose |
|
|
| Server-specific environment variable parsing and validation with Zod. |
| Tool definitions ( |
| Resource definitions ( |
| Prompt definitions ( |
| CoinGecko v3 REST API service — HTTP client, retry/error mapping, response normalization, domain types. |
| Unit and integration tests mirroring |
Development guide
See CLAUDE.md/AGENTS.md for development guidelines and architectural rules. The short version:
Handlers throw, framework catches — no
try/catchin tool logicUse
ctx.logfor request-scoped logging,ctx.statefor tenant-scoped storageRegister new tools and resources via the
createApp()arrays insrc/index.tsWrap external API calls: validate raw → normalize to domain type → return output schema; never fabricate missing fields
Contributing
Issues are welcome. Run checks and tests before submitting:
bun run devcheck
bun run testLicense
Apache-2.0 — see LICENSE for details.
This server cannot be deployed
Maintenance
Related MCP Connectors
Unlock the power of real-time cryptocurrency data with our Crypto Price Insights MCP server.
Your agent needs crypto prices it can rely on — spot, ranked market tables, history, OHLC, per-venue tickers, and what is trending right now. **What you can ask for** • "What is the price of these 20 tokens in USD and EUR right now?" • "Give me the top 100 by market cap with 24h and 7d change." • "Chart this coin's price over the last year, hourly." • "Where does this token trade, and at what spread per venue?" • "What is trending on CoinGecko today?" **How to use it** Point any MCP client at https://mcp.aisa.one/crypto-market-data/mcp and sign in with OAuth — there is no key to create or paste. 21 CoinGecko tools: simple price and token price by contract, supported currencies, coin list and detail, ranked markets, history, market charts and ranges, OHLC, per-coin tickers, categories, exchanges and their tickers, token data and charts, and trending. **It is also a door to the rest** The same login reaches 26 sources and 580+ operations. Price the token here, then ask the same agent what X is posting about it — without adding a second server. **What it costs** Finding and inspecting an operation is free. Running one is billed per call at API prices, with no seat and no monthly minimum, and every call takes max_price_usd so an agent cannot overspend by accident. **Where else it reaches** https://mcp.aisa.one/finance/mcp for equities, crypto and prediction markets in one place.
MCP server with quote and live cryptocurrency price tools, local and cloud-deployed transports.
Official CoinMarketCap MCP server: real-time crypto prices, market cap, rankings and exchange data.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceOfficial CoinGecko API MCP Server for Crypto Price & Market Data. More details: https://docs.coingecko.com/reference/mcp-server417 npm59TypeScriptApache 2.0
- AlicenseAqualityDmaintenanceFree MCP server for real-time cryptocurrency data. Get token prices, market overview, top movers, historical charts, and detailed token info directly in Claude Code, Cursor, or any MCP-compatible AI tool. Powered by CoinGecko with 70+ token mappings and built-in caching.5MIT
- AlicenseAqualityFmaintenanceAn MCP server for CoinGecko that connects any MCP-compatible client to free crypto market data, providing tools for prices, market caps, trending coins, historical data, and global stats.839 npmMIT
- AlicenseNot gradedqualityCmaintenanceA Model Context Protocol server for real-time cryptocurrency price data, market data, trending coins, historical charts, and currency conversion using the free CoinGecko API.MIT