cmc-market-desk
Provides tools to query the CoinMarketCap Pro API for live cryptocurrency quotes, screener-style listings, asset profiles, global market metrics, Fear & Greed, Altcoin Season Index, and price conversion.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Market Desk
A CoinMarketCap market-data agent that puts live CMC prices, a listings screener, and market-wide context in front of an LLM.
This repo is an entry for Build with CMC: API Hackathon, Round 2, track AI Agents and Automation.
Official participant: Lawrence Macquarie. AI coding assistants helped write the code and do not need to be declared.
It is designed for a person who wants a straight answer — “what is SOL doing, and what is the tape around it?” — without opening five CMC pages. The same tools are exposed as:
An MCP server you can attach to an MCP client (Cursor, Claude Desktop, and similar).
A local demo chat UI so judges can see the tools work without any MCP setup.
Live prices come from the CoinMarketCap Pro API once CMC_API_KEY is set. Without a key, the app uses a clearly labeled fixture snapshot captured from CMC’s Keyless Public API on 29 Nov 2026. Authenticated Pro evidence and a live-Pro demo recording are in this repo; fixture artifacts are labeled separately and are not live prices.
This is not financial advice.
What’s useful
Quotes for named assets, with ticker collision handling. Asking for
BTCdoes not silently merge Bitcoin with every meme token that reused the ticker.Screener-style listings: sort by market cap, 24h change, volume, and filter by tag or ranges. 24h gainers use the listings endpoint’s own
sort=percent_change_24h, not a local re-sort of the top market-cap names. The chat preset “Show today’s top 5 gainers” addsvolume_24h_min=100000so illiquid +billions-% names don’t dominate. CMC applies that filter to the requested page, not the whole market, so the agent fetches a 200-row sorted window and returns the first 5 matches. Say “unfiltered” or call the tool without that floor to see the raw sort.Market backdrop: global market cap and volume, BTC/ETH dominance, Fear & Greed, and the Altcoin Season Index, composed into one briefing.
Asset profiles (description, links, tags) and amount conversion.
A market brief that stitches backdrop + top of the tape + optional featured quotes.
Related MCP server: CoinMarketCap MCP Server
How to run
Python 3.11+ (developed on 3.13). From this directory:
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"Demo chat (local)
# No key: starts in fixture mode. The UI banner says so.
python -m cmc_market_agent serve --host 127.0.0.1 --port 8787Open http://127.0.0.1:8787. Try “Give me a market brief with BTC and ETH” or “Show today’s top 5 gainers”. Add ?demo=1 to auto-play those prompts plus a BTC quote. Recordings: fixture-mode demo/market-desk-fixture-demo.mp4 (not live), and live Pro demo/market-desk-live-pro-demo.mp4 once a key is set.
The chat uses a built-in intent router, so the demo works without an LLM key. To have an OpenAI-compatible model choose tools, set OPENAI_API_KEY (optional OPENAI_BASE_URL, OPENAI_MODEL).
Live Pro API
Create a CoinMarketCap API account and copy the key into a local
.env(see.env.example).Export it in your shell. The app reads only
CMC_API_KEY.
set -a && source .env && set +a
python -m cmc_market_agent serveDo not put the key in the repo, in screenshots, or in chat logs.
MCP server
python -m cmc_market_agent mcpExample MCP config:
{
"mcpServers": {
"cmc-market-desk": {
"command": "python",
"args": ["-m", "cmc_market_agent", "mcp"],
"cwd": "/workspace/cmc-market-agent",
"env": { "CMC_API_KEY": "set-this-in-your-own-config-not-in-git" }
}
}
}CLI
python -m cmc_market_agent status
python -m cmc_market_agent call get_quotes --arg symbols=BTC,ETH --pretty
python -m cmc_market_agent call screen_listings --arg sort=percent_change_24h --arg limit=5 --pretty
python -m cmc_market_agent chat "What's the Fear and Greed backdrop?"Tests
pytest -qData modes
Mode | When | What happens |
|
|
|
| no key, or | Frozen snapshot in |
|
|
|
Authenticated Pro integration is the real production path. Keyless access was used during development to verify endpoint shapes and to record honest evidence. It is not a substitute for CMC_API_KEY.
CMC API endpoints used
All calls are GET against the Pro host when a key is present, or the /public-api prefix in keyless mode.
Endpoint | Used by | Why |
|
| Current quotes for named assets |
|
| Sorted, filterable market tape / screener |
|
| Description, links, tags, category |
|
| Market cap, volume, dominance |
|
| Sentiment context |
|
| Market-regime context |
|
| Amount conversion at CMC rates |
The official Python SDK (coinmarketcap-sdk) exists and was considered. This project uses a small httpx client instead so that:
the key is read only from
CMC_API_KEY(the SDK examples useCMC_PRO_API_KEY);fixture and keyless modes share one code path;
the key never appears in returned payloads or error messages.
Evidence of a real API call
Keyless calls already made (no key, real HTTP)
On 29 Nov 2026, 22:27–22:30 HKT (14:27–14:30 UTC), this project called the Keyless Public API from the build machine. Raw bodies and headers are in evidence/keyless-real-calls/. No X-CMC_PRO_API_KEY header was sent.
Successful example — GET /public-api/v3/cryptocurrency/listings/latest?limit=15&convert=USD&sort=market_cap — HTTP 200, status.error_code "0", status.timestamp 2026-11-29T14:30:13.714Z. The body lists BTC, ETH, USDT, and the rest of the top 15 as of that moment. That snapshot is the default listings fixture.
A later listings call — GET /public-api/v3/cryptocurrency/listings/latest?limit=50&sort=percent_change_24h&sort_dir=desc&convert=USD — HTTP 200 at 2026-11-29T15:06:17.884Z (23:06 HKT). That 50-row body is the fixture universe for 24h-change sorts, so fixture “top gainers” are not a re-sort of the top-15 market-cap slice. The same sort had returned HTTP 500 earlier the same evening (evidence/keyless-real-calls/gainers.json); the successful retry is gainers50.json.
Successful quotes example — GET /public-api/v3/cryptocurrency/quotes/latest?symbol=BTC,ETH&convert=USD&skip_invalid=true — HTTP 200 at 2026-11-29T14:27:27.965Z. The response contained 20 assets that share the BTC or ETH tickers, which is why the agent disambiguates by active status and cmc_rank.
Authenticated Pro API calls (redacted)
On 29 Nov 2026, 23:21 HKT (15:21 UTC), this project made authenticated Pro API calls from the build machine with X-CMC_PRO_API_KEY set from the gitignored local CMC_API_KEY. Redacted request/response files are in evidence/pro-api-placeholder/. The header value in those files is [REDACTED]; the raw key is not in the repo.
All of the following returned status.error_code 0 (or "0") and credit_count 1:
File | Request | Notes |
|
| HTTP-equivalent success at |
|
| First success at 15:21:02Z; recaptured at |
|
|
|
|
|
|
|
|
|
|
|
|
|
| Success at |
GET /v2/tools/price-conversion?amount=1&symbol=BTC&convert=USD,ETH did not succeed. The API returned HTTP 400, error_code 400, credit_count 0, message “Your plan is limited to 1 convert options.” That is a Basic-plan limit on multiple convert currencies in one request, not a missing/null id (the client already omits a null id). The same call with convert=USD or convert=ETH alone returned error_code 0. The honest 400 record is REDACTED_PRO_PRICE_CONVERSION.json (recaptured with the error message at 2026-11-29T15:25:15.311Z). The agent now retries one single-convert call per target when that specific 400 is returned; the plan was not upgraded.
The live code path is CmcClient._from_http() in src/cmc_market_agent/cmc_client.py.
What the API made possible — and where it got in the way
What it made possible
One vendor covers the questions a desk actually asks: a price, a ranked tape, and the market backdrop (dominance, Fear & Greed, Altcoin Season) without stitching several data sources.
The Keyless Public API uses the same JSON envelope as the keyed Pro API, so a fixture / keyless / Pro client can share parsers.
v3 listings filters (
sort,tag, price and market-cap ranges) are enough to build a small screener directly on the endpoint, which is whatscreen_listingsdoes.
Obstacles actually hit while building (not hypothetical)
Anonymous rate limit. After a short burst of keyless probes,
GET /v2/tools/price-conversionandGET /v3/index/cmc100-latestreturned HTTP 429,error_code1022: “You've reached the limit for anonymous access.” Fixture conversions are derived from snapshot USD prices and labeled as such.cmc100-latestis not used by the agent.Ticker reuse.
quotes/latest?symbol=BTC,ETHreturned 20 rows, including inactive and low-ranked names that reuse those tickers. The tool therefore picks a canonical asset and surfaces collisions instead of treating a symbol as unique.Mixed
quoteshapes. v3 cryptocurrency quotes/listings returnquoteas an array of{symbol, price, ...}. v1 global metrics still returnsquoteas a currency-keyed object ({"USD": {...}}). The client normalizes both.Mixed
tagsshapes.listings/latestreturned tags as strings ("layer-1").quotes/latestreturned objects ({"slug": "layer-1", "name": "...", "category": "..."}).Mixed
error_codetypes. Some endpoints return"0"(string), others0(int). Status checks comparestr(code) == "0".A listings sort call returned HTTP 500 (
INTERNAL_SERVER_ERROR) on keylesssort=percent_change_24himmediately after the 429s. A later unsliced top-15 market-cap listings call succeeded, and an even later retry ofsort=percent_change_24h&limit=50(29 Nov 2026, 23:06 HKT) returned HTTP 200. Live Pro/keyless mode now always sends the requestedsorttoGET /v3/cryptocurrency/listings/latestrather than re-ranking a short market-cap slice. Fixture mode uses the dedicated 50-rowpercent_change_24hsnapshot for 24h gainers, and documents it when a sort has no matching snapshot (it then falls back to the 15-row market-cap slice and says so). Unfiltered 24h gainers include illiquid and zero-market-cap names; passvolume_24h_minormarket_cap_minto tighten. The 50-row fixture is still a frozen snapshot of the first 50 rows, not the entire CMC universe.Official SDK env var name. SDK examples use
CMC_PRO_API_KEY. This hackathon brief requiresCMC_API_KEY, so the project implements its own client.Basic-plan convert limit. Authenticated
GET /v2/tools/price-conversion?amount=1&symbol=BTC&convert=USD,ETHreturned HTTP 400,error_code400: “Your plan is limited to 1 convert options” (credit_count0). This is not a paid-endpoint 403, and it is not a badidparameter. Single-currency converts (convert=USDorconvert=ETH) succeeded witherror_code0 and 1 credit on the same Basic plan. The client now falls back to one successful single-convert call per target when that 400 is returned. The plan was not upgraded.Listings min/max filters are page-scoped. A Pro call with
sort=percent_change_24h,limit=5, andvolume_24h_min=100000returned only one asset, because CMC applies the floor to the first 5 sorted rows, not the whole market. The screener now fetches a 200-row sorted window when a range filter is set, then keeps the requested number of matches.
Project layout
src/cmc_market_agent/ # client, tools, MCP server, demo API
web/index.html # demo chat UI (`?demo=1` auto-plays a short walkthrough)
fixtures/ # frozen keyless snapshots (labeled, not live)
evidence/ # real keyless captures + redacted Pro captures
demo/ # fixture-mode and live-Pro screen recordings of the local UI
demo-screenshots/ # screenshots labeled fixture or live Pro
scripts/capture_pro_evidence.py
submission-draft.md # DoraHacks submit-build draft only (not submitted)Later submission steps (not done in this repo)
Do these before the deadline, Thu 10 Dec 2026, 7:59am HKT (Wed 9 Dec 2026, 23:59 UTC):
Register on CoinMarketCap API and DoraHacks with the same email, and keep the key in local
CMC_API_KEYonly. (Done for the API account used in the redacted Pro captures.)Publish this repo as a public GitHub repository. (Not done; no remote has been added.)
Demo videos: fixture-mode
demo/market-desk-fixture-demo.mp4, and live Prodemo/market-desk-live-pro-demo.mp4. This project is not deployed to a paid host.Submit on DoraHacks, naming every endpoint above, attaching the redacted Pro evidence, and selecting track AI Agents and Automation. (Not submitted.)
Post on X with #BuildwithCMC and the DoraHacks project link. (Not posted.)
License
MIT. CoinMarketCap data remains subject to CoinMarketCap’s API terms.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Unofficial Market Data App MCP — wraps the Market Data App API (marketdata.app)
Official CoinMarketCap MCP server: real-time crypto prices, market cap, rankings and exchange data.
Real-time crypto market data: candles, tickers, orderbooks across 13+ exchanges via MCP.
CoinMarketCap MCP — crypto prices, market cap, rankings
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that provides access to CoinMarketCap's cryptocurrency data, enabling AI applications to retrieve cryptocurrency listings, quotes, and detailed information.37-
- AlicenseBqualityDmaintenanceProvides access to cryptocurrency market data, exchange information, and blockchain metrics through the CoinMarketCap API. Supports price quotes, historical data, trending tokens, global metrics, and DEX information across different subscription tiers.26MIT
- FlicenseCqualityDmaintenanceProvides access to CoinCap's cryptocurrency market data and technical analysis tools via MCP, supporting assets, exchanges, markets, and more.387-
- AlicenseCqualityDmaintenanceEnables access to CoinMarketCap API data, including latest cryptocurrency listings and token quotes, through natural language.2MIT