
Coingecko Mcp Server
io.github.cyanheads由 GitHub 账号 cyanheads 发布v0.2.0更新于 Oct 24, 2026
Crypto market data via CoinGecko — prices, markets, history, trending, and deep coin metadata.
概览
CoinGecko 行情数据服务器:让助手查询加密货币价格、市值排行、历史走势、热门币种和币种详细资料。
- 可以做什么
- 把币种名称或代码解析为 CoinGecko ID,再批量查询价格与核心行情指标
- 按市值、成交量或 ID 列出排行市场,可按分类或指定币种筛选,并列出分类标识
- 获取单个币种的详细资料(简介、链接、行情、开发者活跃度、社区、情绪)以及历史价格、市值和成交量序列
- 获取 24 小时热门币种和全局市场快照(总市值、成交量、BTC/ETH 占比、活跃数量)
- 以资源形式读取币种与全局数据,并使用引导式单币种研究提示
- 适用场景
- 适合需要助手回答加密货币价格、排名、趋势或历史表现问题,或对某个币种做结构化研究时使用,无需离开对话。
- 运行要求
- 通过 npx 或 bunx 以 stdio 在本地运行(需 Bun v1.4.0+ 或 Node.js v24+),也可用 Docker 镜像;另支持 HTTP 传输。无需账号或 API 密钥;可选的 COINGECKO_API_KEY 可接入免费的 CoinGecko Demo 档位。需要访问 CoinGecko API 的网络。
安装
在 SourceWeft 中
- 打开 控制台中的 Coingecko Mcp Server,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
@cyanheads/coingecko-mcp-server
Market data for 15,000+ cryptocurrencies — prices, history, trends, and deep coin metadata via CoinGecko.
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.
Tools
Resources
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
Capability reference
coingecko_search_coins tool
- Tickers are not unique (many coins share
ETH/USDC) — returns ranked candidates withid,symbol,name, andmarketCapRankto disambiguate - Returns the top 25 matches by relevance;
enrichment.truncatedplusshown/capdisclose when the list is capped - An empty result is a normal outcome, not an error —
enrichment.noticesuggests broadening the query
coingecko_get_prices tool
- Accepts up to 500 raw IDs (trimmed, lowercased, deduplicated) and processes the first 250 unique slugs;
skippedIdslists the rest andmissinglists ids that didn't resolve, since an unknown slug returns an empty upstream response rather than an error - One row per
(id, currency)that returned a price; market cap, 24h volume, and 24h change are optional per row. Currencies with no quotes are noted inenrichment.notice lastUpdatedAtUnixSecis Unix seconds —coingecko_get_market_chart's point timestamps are milliseconds- Throws
all_missingwhen no requested id resolves,no_price_datawhen IDs resolve but no requested currency returns a numeric quote
coingecko_list_markets tool
- Sort by market cap, volume, or ID, ascending or descending, via
order; paginate withpageandper_page(default 50, max 250 rows) - Filter by
ids(same 500-raw/250-unique bounds as price batches;appliedIdsandskippedIdsshow the selection) or bycategory(acategoryIdfromcoingecko_list_categories), not both — combining them returnsconflicting_filters - Per-coin fields include price, cap, volume, 1h/24h/7d change, supply, and ATH/ATL;
enrichment.truncatedflags a full page - Throws
unknown_categorywhen CoinGecko returns HTTP 404 for a category-filtered request
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) - Prices and percentage-change windows use
vs_currency(defaults tousd); missing upstream fields are omitted rather than fabricated profile.categoriesare display names (e.g."Layer 1 (L1)"), distinct from thecategoryIdslugscoingecko_list_categoriesreturns- Throws
coin_not_foundwhen the slug isn't recognized upstream,unsupported_currencywhen the requested market currency isn't a supported one
coingecko_get_market_chart tool
recentmode takes 1–365 days ("max"aliases the 365-day window and emits a notice);rangemode takesfrom/toas Unix secondsintervalselectsauto(upstream default),daily, orhourly, subject to upstream tier/window availability- Pages with
point_offset(default 0) andpoint_limit(default 100, cap 250); per-series totals andnextPointOffsetsupport continuation, and each page refetches upstream data granularityreports the series spacing as5-minute,hourly,daily,irregular, orunknown; point timestamps are Unix milliseconds, whilecoingecko_get_prices'slastUpdatedAtUnixSecis seconds- Throws
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 available - Upstream 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 upstream- Throws
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 totals - Returns active-cryptocurrency and active-market counts, ongoing ICO count, and a Unix-second snapshot timestamp
coingecko_list_categories tool
- Optional
name_containsfilters by whitespace-separated tokens, case- and punctuation-insensitive; every token must appear in the name enrichment.totalCountreports the full category count before filtering; a filter that matches nothing returnsenrichment.notice- Returned
categoryIdvalues are whatcoingecko_list_markets'scategoryparam expects
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_coins- Throws
coin_not_foundwhen the slug isn't recognized upstream
coingecko://global resource
- Same data as
coingecko_get_global, always denominated in USD - No parameters
coingecko_coin_research prompt
- Argument:
coinrequired — a name, ticker, or CoinGecko slug - Returns 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 change - Retry/backoff for rate limits, transient upstream failures, and timeouts; honors
Retry-After, and permanent refusals fail immediately - Status-specific error reasons with recovery hints, including narrowing the range on historical-window restrictions
Agent-friendly output:
- Search-before-query enforced through descriptions — every ID-keyed tool states slugs-not-tickers and points back to
coingecko_search_coins - Partial reads — price results disclose unresolved IDs and currencies without quotes; enrichment discloses caps and applied filters
- Units made explicit — timestamp fields document seconds vs. milliseconds
- 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).
Or with npx (no Bun required):
Or with Docker:
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:
Prerequisites
- 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:
- Navigate into the directory:
- Install dependencies:
- Configure environment (optional):
Configuration
The server runs with zero configuration. The one server-specific variable is optional:
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:
-
Run checks and tests:
Docker
The 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
Development guide
See CLAUDE.md/AGENTS.md for development guidelines and architectural rules. The short version:
- Handlers throw, framework catches — no
try/catchin tool logic - Use
ctx.logfor request-scoped logging,ctx.statefor tenant-scoped storage - Register new tools and resources via the
createApp()arrays insrc/index.ts - Wrap 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:
License
Apache-2.0 — see LICENSE for details.
来源:README.md,提交 f6def41
工具
0版本历史
4- v0.2.0最新Oct 15, 2026
- v0.1.4Oct 7, 2026
- v0.1.3Sep 22, 2026
- v0.1.2Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分