Get the FREE Ultimate OpenClaw Setup Guide →

crypto_mcp_server

加密货币市场数据MCP服务器,提供实时价格、K线数据、资金费率和行业新闻查询功能。

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio ibook000-crypto_mcp_server python crypto_mcp_server.py \
  --env NEWS_API_KEY="Your NewsAPI key (optional). Required only if you want to use query_crypto_news_search."

How to use

Crypto MCP Server provides real-time price queries, historical K-line data, funding rate history, and industry news aggregation for cryptocurrency markets. The server exposes a set of modular tools registered under the MCP protocol, including query_crypto_price for single price lookups, query_batch_crypto_prices for multiple symbols, query_crypto_klines for historical candlesticks, query_funding_rate for perpetual contract funding rates, and query_crypto_news for Odaily-sourced news. Clients can connect via MCP client libraries, call these tools with appropriate parameters, and receive formatted textual results. Web UI integration via a FastAPI-based interface is also included to visualize data and manage connected MCP servers and tools. Use the provided mcp_client.py as a reference to connect, call tools, and handle responses, including error handling and batch operations.

How to install

Prerequisites:

  • Python 3.8 or higher
  • Git

Installation steps:

  1. Clone the repository: git clone https://github.com/Ibook000/crypto_mcp_server.git
  2. Navigate into the project directory: cd crypto_mcp_server
  3. Install Python dependencies (if required by your setup): pip install -r requirements.txt
  4. Run the MCP server: python crypto_mcp_server.py

Optional for News API integration:

  • Obtain a NewsAPI key from https://newsapi.org/register
  • Set the key in your environment or configuration as described below (NEWS_API_KEY).

Additional notes

Tips and common considerations:

  • If you plan to use query_crypto_news_search, ensure NEWS_API_KEY is configured (either via environment variable NEWS_API_KEY or within your mcp.json/config as described in the project docs).
  • The server is designed to be modular; to add a new data source, implement an asynchronous data fetcher and a formatter, then register it with the MCP tool decorator in crypto_mcp_server.py.
  • For production deployments, consider configuring a reverse proxy, proper logging, and cache controls to optimize response times and reliability.
  • The web UI is based on FastAPI; to access it, install dependencies from requirements.txt and run the provided web UI script (webui_fastapi.py) if included, then open the browser at http://localhost:8000.

Related MCP Servers

Sponsor this space

Reach thousands of developers