CME Prediction Markets MCP Server
Complete MCP server for verifying claims against CME prediction market data.
Features
- MCP Protocol Support: Full implementation of Model Context Protocol
- Data Infrastructure: Automated CME data ingestion with PostgreSQL/TimescaleDB
- Claim Verification: NLP-powered claim parsing and verification
- Slack Integration: Real-time claim verification via Slack bot
- Caching Layer: Redis-based caching for performance
- Async Architecture: Built on FastAPI with async/await throughout
Quick Start
Prerequisites
- Python 3.11+
- PostgreSQL 15+ (with TimescaleDB)
- Redis 7+
- Docker & Docker Compose (optional)
Installation
- Clone the repository
- Copy
.env.exampleto.envand configure - Install dependencies:
poetry install
- Initialize database:
poetry run python scripts/init_db.py
- Run the server:
poetry run uvicorn src.main:app --reload
Docker Deployment
docker-compose up -d
MCP Tools
query_trading_data
Query historical trading data for contracts.
{
"contract_symbol": "BTC_95000_YES",
"start_time": "2024-12-01T00:00:00Z",
"end_time": "2024-12-16T00:00:00Z"
}
verify_claim
Verify natural language claims against data.
{
"claim_text": "Bitcoin reached 95 cents on December 15"
}
get_contract_info
Get detailed contract information.
{
"contract_symbol": "BTC_95000_YES"
}
Testing
poetry run pytest
License
MIT