CoinMarketCap API for MCP tools and AI agents
On this page
The CoinMarketCap API returns cryptocurrency prices, volumes, and market capitalisation as JSON over HTTP. Every request needs an API key. Developers call it from code. AI agents reach the same data through MCP tools that wrap those HTTP calls.
What the CoinMarketCap API returns
The CoinMarketCap API returns cryptocurrency market data as JSON over HTTP. Its endpoints cover ranked listings, quotes for named assets, and asset metadata. The official reference sits at coinmarketcap.com/api.
Most developers start with the latest listings endpoint. It returns assets in rank order with price, volume, and market capitalisation fields. Quote endpoints return similar fields for specific symbols or IDs. Read the reference before you parse, because field names and nesting differ between endpoints.
Responses wrap the payload in a status object. That object reports errors and can report credit usage. Check it first, then read the data field. A parser that skips this step fails quietly when a call hits a limit.
Authenticating and calling it from code
Every request carries your API key in a request header. The key identifies your plan, so it also sets your quota. Keep the key out of source files, prompts, and logs. Load it from an environment variable at process start.
A minimal client sends a GET request, attaches the header, and parses the JSON body. The client follows four steps on each run:
- Load the key from an environment variable at process start.
- Send a GET request with the key in the header.
- Read the status object, then read the data field.
- Cache results for the length of your refresh interval.
Convert numeric strings to decimals before any arithmetic. Floating-point totals drift, and a small drift can change a threshold check.
Using MCP tools instead of raw HTTP
An MCP client discovers tools at runtime and calls them with JSON arguments. A tool wraps one HTTP call and publishes a name, a description, and an input schema. The model reads the schema and fills in the arguments. When a gateway runs the call, the model never sees the API key.
APIbase is an MCP gateway with a large and growing catalog of tools across many categories. Search the catalog for a CoinMarketCap tool. If the catalog lists one, the agent calls it through the same gateway connection it uses for other tools. If the catalog does not list one, write a small tool that makes the HTTP call yourself.
Choose a gateway tool when one agent session needs several data sources. Choose a direct call when one script runs on a fixed schedule and needs full control over retries.
Pricing, plans, and quotas
APIbase tool pricing ranges from 0 to 29.99 per call. Each tool page shows its own price, so compare before you wire up an agent loop.
CoinMarketCap sets its own plan limits and fees, and those change over time. We did not verify public per-call pricing for this guide. Check the plan page at coinmarketcap.com/api before you estimate a budget.
Quotas apply to the upstream key. An agent that loops on a failing call can exhaust the quota within a single run. Cap the loop count and log each call with its timestamp.
Caveats before you build
Market data moves often, so a cached value can go stale within minutes. Set a clear expiry on every cache entry. Show the timestamp in any output a user reads.
- Name the data source in every answer the agent gives.
- Handle HTTP 429 responses with backoff, not with immediate retries.
- Treat missing fields as normal, since not every asset carries every field.
Errors and rate limits in an agent loop
An agent retries on its own when a tool returns an error. Without a limit, it retries without end. Set a maximum retry count in the tool wrapper. Return a clear error object to the model so it can stop.
Rate limits differ by plan. The status object can report remaining credits on each response. Read that value on every call, store it, and pause the loop before it reaches zero.
Live pricing — developer
Data source: live tool catalog snapshot, fetched 2026-11-24.
Chart data as a table
| Tool | Price per call | Cache-hit price |
|---|---|---|
| Usage Time Series | $0.0 | $0.0 |
| Per-Tool Usage Breakdown | $0.0 | $0.0 |
| Usage Summary | $0.0 | $0.0 |
| Discover Tools | $0.0 | $0.0 |
| Batch Tool Calls | $0.0 | $0.0 |
| Tool Quality Metrics | $0.0 | $0.0 |
| Tool Quality Rankings | $0.0 | $0.0 |
| List Programming Languages | $0.001 | $0.0001 |
| Check CVE ID Reservation Status | $0.001 | $0.0001 |
| Security Advisories (deps.dev) | $0.001 | $0.0001 |
| Dependency Tree (deps.dev) | $0.001 | $0.0001 |
| Package Info (deps.dev) | $0.001 | $0.0001 |
| Tool | Provider | Price/call | Cache-hit |
|---|---|---|---|
| Usage Time Series | account | $0 | $0 |
| Per-Tool Usage Breakdown | account | $0 | $0 |
| Usage Summary | account | $0 | $0 |
| Discover Tools | apibase | $0 | $0 |
| Batch Tool Calls | platform | $0 | $0 |
| Tool Quality Metrics | platform | $0 | $0 |
| Tool Quality Rankings | platform | $0 | $0 |
| List Programming Languages | judge0 | $0.001 | $0.0001 |
| Check CVE ID Reservation Status | cve-mitre | $0.001 | $0.0001 |
| Security Advisories (deps.dev) | depsdev | $0.001 | $0.0001 |
| Dependency Tree (deps.dev) | depsdev | $0.001 | $0.0001 |
| Package Info (deps.dev) | depsdev | $0.001 | $0.0001 |
Connect via MCP
Data source: gateway design, no measured values.
$ curl -X POST https://apibase.pro/api/v1/tools/account.timeseries/call \
-H "Content-Type: application/json" -d '{"params": {}}'FAQ
Does the CoinMarketCap API need an API key?
Yes. Each request carries the key in a header, and the key identifies the plan that sets the quota. Store it in an environment variable and keep it out of prompts and logs.
Can an AI agent call the CoinMarketCap API?
Yes. An agent can call an MCP tool that wraps the HTTP request, or it can run a direct request in code that you write. The MCP route keeps the key on the server side.
Is there a free CoinMarketCap API plan?
Plan details live on the reference page at https://coinmarketcap.com/api/. We did not verify plan limits for this guide. Check that page before you build.
How much does a call through APIbase cost?
Tool pricing ranges from 0 to 29.99 per call. Each tool page lists its exact price.
Recommended next step
- STEP 1/2 Connect your MCP client
- STEP 2/2 Browse the full catalog
Related guides
- codex mcp add forge-mcp --url https //forgegui.net/mcp
- coingecko api
- effective context engineering for ai agents
- mcp stands for
Written with AI assistance from APIbase's published documentation and public data; checked automatically against them. Corrections: https://apibase.pro/
Published: 2026-11-24Source: live apibase.pro catalog snapshot