MCP Crypto Market Data Server
Provides real-time and historical cryptocurrency market data from major exchanges through CCXT. Supports live price lookups, historical OHLCV queries, and includes lightweight caching for improved performance.
README
MCP Crypto Market Data Server
This project is a Python-based MCP server that provides real-time and historical cryptocurrency market data. The server is built using FastAPI, and it fetches data from major exchanges through CCXT. The goal of this project was to understand how MCP servers work, how to interact with crypto APIs, and how to build a clean, modular Python backend.
*Why I Built It
The assignment required a small MCP server with features like:
endpoints to fetch data
support for real-time updates
historical queries
caching
structured code
test coverage
I kept the code simple so anyone can read it easily, while still keeping the structure clean.
*Features Implemented
Live price lookup
Historical OHLCV (1 hour candles, last 24 hours)
Lightweight caching
Error handling
Tests using pytest
Clean folder structure
**Project Structure
mcp-server/ ├─ app/ │ ├─ main.py │ ├─ services/ccxt_client.py │ ├─ cache.py │ ├─ models.py │ └─ exceptions.py ├─ tests/test_api.py ├─ requirements.txt └─ README.md
***Technologies Used
FastAPI
CCXT
Pytest
Uvicorn
Python
**Endpoints
-
Root GET / Response: { "message": "Crypto MCP Server running" }
-
Latest Price GET /price/{symbol} Example: /price/BTC
-
Historical OHLCV GET /history/{symbol} Example: /history/ETH
***How to Run
-
Install dependencies pip install -r requirements.txt
-
Start the server uvicorn app.main:app --reload
-
Test API http://127.0.0.1:8000/price/BTC http://127.0.0.1:8000/history/ETH
-
Run Tests pytest
***Assumptions
Binance is the default exchange.
Symbols assumed to trade against USDT.
Cache expiry: 10 seconds.
Historical timeframe: 1h.
***Possible Improvements
Support multiple exchanges
WebSocket streaming
Redis caching
More detailed tests
Environment variables
Conclusion
This project meets the MCP assignment requirements with clear Python code, real-time crypto data, historical queries, caching, structured layout, and test coverage.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.