Skip to main content
Glama
jjsteffen23

CME Prediction Markets MCP Server

by jjsteffen23
README.md
# 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

1. Clone the repository
2. Copy `.env.example` to `.env` and configure
3. Install dependencies:

```bash
poetry install
```

4. Initialize database:

```bash
poetry run python scripts/init_db.py
```

5. Run the server:

```bash
poetry run uvicorn src.main:app --reload
```

### Docker Deployment

```bash
docker-compose up -d
```

## MCP Tools

### query_trading_data

Query historical trading data for contracts.

```json
{
  "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.

```json
{
  "claim_text": "Bitcoin reached 95 cents on December 15"
}
```

### get_contract_info

Get detailed contract information.

```json
{
  "contract_symbol": "BTC_95000_YES"
}
```


## Testing

```bash
poetry run pytest
```

## License

MIT

Maintenance

ActivityInactive
ResponsivenessNo issues