exchange-data-mcp
exchange-data-mcp
読み取り専用のマーケットデータMCPサーバーで、公開エンドポイントのみを使用し、APIキーもアカウントも不要な暗号資産取引所向けです。Binance、KuCoin、Coinbaseを1つの形に正規化し、LLMコンテキスト用にシリアライズします。
エージェントクライアント向けのMCPサーバーとしても、依存関係ゼロのプレーンなPythonライブラリとしても機能します。
存在理由
市場を扱うエージェントには、オーダーブック、トレード、ローソク足が必要ですが、既存の選択肢はモデルに取引所の生のJSONを渡します。生のペイロードには、モデルが読まない不要な追加情報が含まれることがよくありますが、この選択肢にはそれがなく、さらに取引所間の情報を統一します。このパッケージは各取引所の方言を一度正規化し、その後より簡単にシリアライズします。
Related MCP server: Binance Cryptocurrency MCP
注目すべき点:
シンボル方言。KuCoinとCoinbaseのBTC-USDT、BinanceのBTCUSDTが、1つの標準形式(BASE-QUOTE)に集約されます。
タイムスタンプの単位は取引所とエンドポイントごとに異なります。Binanceはミリ秒、KuCoinの統計とオーダーブックはミリ秒、KuCoinの取引履歴はナノ秒、KuCoinとCoinbaseのローソク足は秒、CoinbaseのティッカーはISO文字列です。すべてのモデルは、エポックからのミリ秒(ms)で出力されます。
Coinbaseのローソク足の行は [time, low, high, open, close, volume] で、新しい順です。これはドキュメントに記載された列順です。KuCoinのローソク足は代わりに [time, open, close, high, low, ...] を使用します。テストによる位置マッピング、またはパーサーがローソク足を反転します。
レート制限はIPごとに設定されており、エージェントツールはバースト的に起動します。キャッシュはエンドポイントごとのTTLを保持し、同時に発生するミスを1つのリクエストにまとめる(シングルフライト)ため、同じ秒に5つのツールが同じオーダーブックを読み取っても、HTTP呼び出しは1回で済みます。失敗はキャッシュされず、リーダーが例外を発生させた呼び出し元は直後に再試行します。
スプレッド計算は、全体を通してDecimalで実行されます。
スリムなシリアライザーは、短いキーで正確な10進文字列を保持します。記録済みフィクスチャで測定した結果、24時間ティッカーは生のエンベロープの605バイトから207バイト(34%)に削減されます。すでにコンパクトなブックスナップショットではサイズはほぼ横ばいです。得られる利点は、3つの取引所で1つのスキーマになることです。
使い方
ライブラリとして(依存関係ゼロ):
from exchange_data_mcp import MarketDataService
from exchange_data_mcp.transport import urllib_fetcher
svc = MarketDataService(urllib_fetcher())
svc.ticker("kucoin", "BTC-USDT")
svc.compare("BTC-USDT") # same pair on every venue, executable spread from top of bookMCPサーバーとして:
pip install -e ".[mcp]"
python -m exchange_data_mcp.server公開されるツール: get_ticker、get_orderbook、get_recent_trades、get_candles、compare_price。
エラーは分類されています: 再試行可能(retry_afterを保持するRateLimited、ExchangeUnavailable)、入力修正(SymbolNotFound、UnsupportedRequest)、または取引所側の変更(BadResponse)。
テスト
37テスト、記録済みフィクスチャに対して完全オフラインで実行:
python3 -m unittest discover -s tests -t .ステータス
ポートフォリオ用途向けです。TTLキャッシュを備えたRESTです。同じエンジニアリングのライブ10msストリーミング側については、kucoin-fast-streamを参照してください。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to access real-time Binance cryptocurrency market data including prices, order books, candlestick charts, trading history, and 24-hour statistics through natural language queries.11Apache 2.0
- AlicenseDqualityDmaintenanceEnables AI agents to access real-time Binance cryptocurrency market data including prices, order books, candlestick charts, trading history, and 24-hour statistics through natural language queries.12Apache 2.0
- AlicenseAqualityCmaintenanceProvides live cryptocurrency market data from over 100 exchanges, enabling AI agents to fetch prices, order books, funding rates, and more for trading analysis and arbitrage opportunities.131MIT

PredMCPofficial
AlicenseNot gradedqualityBmaintenanceSafe, read-only market data for AI trading agents, offering 44 tools to query prediction markets, perpetuals, and cross-venue signals without the ability to execute trades.MIT
Related MCP Connectors
Pre-computed market data that improves agent reasoning, reduces token usage, and replaces pipelines.
52 paid x402 API endpoints for AI agents — crypto, data, DeFi, market intelligence.
Agent-native crypto market-data over MCP+REST: order flow, whales, liquidations, calibrated scores
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/nullpointer-hq/exchange-data-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server