Connect Claude, ChatGPT, Codex, VS Code or any MCP-compatible AI to +200 Bitcoin on-chain and market metrics via the Model Context Protocol.
The fastest way to add the BGapi MCP server — one command configures your client automatically:
npx add-mcp "https://mcp.bitcoin-data.com/add-mcp?token=YOUR_TOKEN"
npx add-mcp https://mcp.bitcoin-data.com/add-mcp
Remote MCP servers are added as a custom connector; the same connector works in claude.ai, Claude Desktop and the mobile apps:
BGeometrics · Remote MCP server URL: the URL below.https://mcp.bitcoin-data.com/mcp?token=YOUR_TOKEN
If your connector dialog shows a Request headers section, you can use the plain URL and add the header x-bgapi-token with your token instead. Keep the URL private: anyone who has it can use your token.
https://mcp.bitcoin-data.com/mcp
On Team and Enterprise plans an organization owner has to add the connector first.
Add via the CLI (recommended) or add the server to .mcp.json in your project:
claude mcp add --transport http bgapi https://mcp.bitcoin-data.com/mcp \
--header "x-bgapi-token: YOUR_TOKEN"
Add --scope user to make it available in all your projects.
// .mcp.json (project root)
{
"mcpServers": {
"bgapi": {
"type": "http",
"url": "https://mcp.bitcoin-data.com/mcp",
"headers": {
"x-bgapi-token": "${BGAPI_TOKEN}"
}
}
}
}
${BGAPI_TOKEN} is read from your environment, so the token doesn't end up in the repository.
claude mcp add --transport http bgapi https://mcp.bitcoin-data.com/mcp
Run /mcp inside Claude Code to check the bgapi server is connected.
Works for the Codex CLI and the Codex IDE extension (both read ~/.codex/config.toml):
# 1. Put your token in an environment variable (add it to your shell profile)
export BGAPI_TOKEN="YOUR_TOKEN"
# 2. Register the server; Codex sends it as "Authorization: Bearer"
codex mcp add bgapi --url https://mcp.bitcoin-data.com/mcp --bearer-token-env-var BGAPI_TOKEN
# ~/.codex/config.toml (Windows: %USERPROFILE%\.codex\config.toml)
[mcp_servers.bgapi]
url = "https://mcp.bitcoin-data.com/mcp"
http_headers = { "x-bgapi-token" = "YOUR_TOKEN" }
codex mcp add bgapi --url https://mcp.bitcoin-data.com/mcp
Run codex mcp list (or type /mcp inside Codex) to confirm the bgapi server is loaded.
ChatGPT connects to remote MCP servers through Developer mode (Plus, Pro, Business, Enterprise and Edu plans; on workspaces an admin may need to enable it):
BGeometrics · MCP Server URL: the URL below · Authentication: No authentication.https://mcp.bitcoin-data.com/mcp?token=YOUR_TOKEN
ChatGPT can't send custom headers, so the token goes in the URL. Keep it private: anyone who has it can use your token.
https://mcp.bitcoin-data.com/mcp
Add the server to .vscode/mcp.json in your workspace, or run MCP: Open User Configuration from the Command Palette to make it available in every workspace:
{
"inputs": [
{
"type": "promptString",
"id": "bgapi-token",
"description": "BGeometrics API token",
"password": true
}
],
"servers": {
"bgapi": {
"type": "http",
"url": "https://mcp.bitcoin-data.com/mcp",
"headers": {
"x-bgapi-token": "${input:bgapi-token}"
}
}
}
}
VS Code asks for your token the first time the server starts and stores it securely.
{
"servers": {
"bgapi": {
"type": "http",
"url": "https://mcp.bitcoin-data.com/mcp"
}
}
}
Click Start above the server entry, then open Copilot Chat in Agent mode and check the tools list for bgapi.
The server supports the Streamable HTTP transport. Send your token in the x-bgapi-token header (or Authorization: Bearer, or ?token= in the URL):
# Endpoint
POST https://mcp.bitcoin-data.com/mcp
# Header
x-bgapi-token: YOUR_TOKEN
# Initialize a session and call get latest
SESSION_ID=$(curl -s -i -X POST https://mcp.bitcoin-data.com/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "x-bgapi-token: YOUR_TOKEN" \
-d '{"jsonrpc":"2.0","method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}},"id":1}' \
| grep -i "mcp-session-id" | tr -d '\r' | awk '{print $2}')
echo "Session: $SESSION_ID"
curl -s -X POST https://mcp.bitcoin-data.com/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "mcp-session-id: $SESSION_ID" \
-d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"get_latest","arguments":{"metrics":["btc-price","mvrv","nupl"]}},"id":2}'
The token is read when the session is created, so it only needs to be sent with the initialize request.
Set up the MCP server with your own BGeometrics API token, so requests count against your plan. Connecting without a token still works for now, but it is temporary and will be discontinued: set up your token now and nothing will break when that happens.
YOUR_TOKEN.Treat your token like a password. When a client only takes a URL (ChatGPT, Claude connectors), the token is part of that URL: don't share it or paste it in public places. If it leaks, use Regenerate Token in your profile and update your client with the new one.
Seven tools that let AI agents discover, query, and compare any Bitcoin metric.
Browse all available metrics by category. 13 categories covering price, on-chain, mining, derivatives, and more.
Search metrics by keyword across names, descriptions, slugs, and field names.
Retrieve time-series data for any metric. Supports date ranges, pagination, and last-N queries.
Get the most recent value for up to 10 metrics at once. Perfect for quick lookups.
Compare up to 5 metrics side-by-side, aligned by date over a common range.
Instant Bitcoin market snapshot: price, market cap, MVRV, NUPL, hashrate, and technicals.
Self-subscribe for higher rate limits via Lightning Network payment.
+200 metrics organized into 13 categories:
Use list_metrics with a category to explore, or search_metrics with any keyword.
Each client above has a With token tab (shown first) and a Without token tab (temporary). Replace YOUR_TOKEN with the token from your profile.
Depending on the client, the token is sent in one of these ways; the instructions already use the right one:
x-bgapi-token: YOUR_TOKEN headerAuthorization: Bearer YOUR_TOKEN headerhttps://mcp.bitcoin-data.com/mcp?token=YOUR_TOKEN for clients that only take a URL (ChatGPT, Claude connectors)Already connected without a token? Remove the old bgapi / BGeometrics entry from your client and add it again with the With token instructions.
A wrong or expired token doesn't produce an error: the data just comes back delayed. After connecting, ask your AI assistant:
With a valid token the date is today or yesterday. If it is about 7 days old, the token is not valid:
YOUR_TOKEN with your real token, with no spaces or quotes around it.To confirm your client is actually sending the token, look at the server entry in your client's settings: it must include your token (in the URL, or in the x-bgapi-token / Authorization header). Connections without a token keep working for now, so they won't show any difference until tokenless access is discontinued.
Rate limits depend on the plan linked to your token:
| Tier | Requests / hour | Requests / day |
|---|---|---|
| Advanced | 200 | 300 |
| Premium | 500 | 1,000 |
| Premium+ | 1,000 | 2,000 |
| Business | 6,000 | 10,000 |
| Professional | Custom — contact us | |
Use the subscribe tool to upgrade your tier directly from the AI chat via Lightning Network, or see full plan details and pricing at portal.bgeometrics.com/pricing.
Once connected, ask your AI assistant questions like: