OpenAPI Hub
v1.4.0Read-only crypto data MCP: CEX/PerpDEX markets, DEX, wallets, explorers, prediction markets & RPC.
Python, TypeScript, cURL, and MCP quickstart examples for OpenAPI Hub (openapihub.dev) — a unified read-only crypto market data, blockchain explorer, JSON-RPC, and remote MCP gateway. Get a free read-only API key from @openapihubot. Always load API_HUB_KEY from your environment or secret store and pass it in the X-Hub-Key request header. Never hardcode the key in source files, URLs, prompts, logs, or committed config files.
Summary extracted from the README.
OpenAPI Hub Examples
Python, TypeScript, cURL, and MCP quickstart examples for OpenAPI Hub (openapihub.dev) — a unified read-only crypto market data, blockchain explorer, JSON-RPC, and remote MCP gateway.
Note:
openapihub.devis an independent project maintained underarbitron-adm2and is not affiliated with any third-party organization of a similar name.
Quick Links
- Docs & Explorer: https://openapihub.dev
- Agent Index: https://openapihub.dev/llms.txt
- Task Discovery (unauthenticated):
GET https://openapihub.dev/discover?q=<task> - Remote MCP Endpoint (Streamable HTTP):
https://openapihub.dev/mcp - Live Status JSON: https://openapihub.dev/status.json
- Free API Key Bot: @openapihubot
- Updates Channel: @openapihub
Authentication & Secret Handling
Get a free read-only API key from @openapihubot.
Always load API_HUB_KEY from your environment or secret store and pass it in the X-Hub-Key request header. Never hardcode the key in source files, URLs, prompts, logs, or committed config files.
export API_HUB_KEY="your-key-from-openapihubot"
Examples Included
| Path | Description |
|---|---|
examples/curl/discover_and_call.sh |
Unauthenticated /discover, /status.json, and authenticated X-Hub-Key REST + batch token lookup |
examples/python/quickstart.py |
Zero-dependency Python (stdlib urllib) discovery, schema card inspection, and authenticated route calls |
examples/typescript/quickstart.ts |
Zero-dependency TypeScript / Node.js (fetch) discovery and authenticated REST calls |
mcp/claude-code.json |
Streamable HTTP MCP config for Claude Code |
mcp/cursor.json |
Streamable HTTP MCP config for Cursor |
mcp/codex.toml |
Streamable HTTP MCP config for Codex CLI |
Running the Examples
cURL / Bash
# Unauthenticated discovery works without a key:
bash examples/curl/discover_and_call.sh "wallet portfolio"
# Authenticated REST call (requires API_HUB_KEY in env):
API_HUB_KEY="..." bash examples/curl/discover_and_call.sh "token price"
Python (3.10+, zero external dependencies)
python3 examples/python/quickstart.py --query "perpetual funding rates"
# With API_HUB_KEY exported, also runs authenticated sample calls:
API_HUB_KEY="..." python3 examples/python/quickstart.py --query "token price"
TypeScript (Node.js 22+ native TS or tsx)
node examples/typescript/quickstart.ts "prediction markets"
# With API_HUB_KEY exported, also runs authenticated sample calls:
API_HUB_KEY="..." node examples/typescript/quickstart.ts "token price"
Remote MCP Setup
Remote MCP is served over Streamable HTTP at https://openapihub.dev/mcp. Discovery methods (initialize, notifications/initialized, ping, tools/list) work without authentication; tools/call requires the X-Hub-Key header.
- Claude Code CLI:
claude mcp add --transport http openapi-hub https://openapihub.dev/mcp \ --header "X-Hub-Key: $API_HUB_KEY" - Claude Code project config: see
mcp/claude-code.json - Cursor: see
mcp/cursor.json - Codex CLI (
~/.codex/config.toml): seemcp/codex.toml
License
MIT — see LICENSE.