Access Kalshi prediction market data - the first CFTC-regulated exchange for trading on real-world events. Built by OpenSVM. 23 tools for events, markets, trades, forecasts, candlesticks and live data.
Demo: https://dflow.opensvm.com
This MCP server provides access to the complete Prediction Market Metadata API including:
- Event Management: Get events, search events, retrieve event metadata
- Market Data: Market information, batch queries, market lookups by mint
- Trading Data: Trade history, trades by market, pagination support
- Forecast Analytics: Forecast percentile history, time series data
- Candlestick Data: OHLC data for events and markets
- Live Data: Real-time data feeds, milestone information
- Series Information: Series templates, categories, and metadata
- Utility Functions: Outcome mint queries, filtering, and search capability
The easiest way to install this MCP server is through Smithery:
npx @smithery/cli install dflow-mcp-server --client claudeThis will automatically configure the server for use with Claude Desktop.
- Bun (recommended) or Node.js 18+
bun install# Development mode (with hot reload)
bun run dev
# Production mode
bun start
# Or directly with Bun
bun run src/index.tsThe server uses stdio transport for MCP communication, which is the standard for MCP clients.
If you installed via Smithery, the configuration is automatic. For manual setup, add this to your Claude Desktop config:
{
"mcpServers": {
"dflow-mcp": {
"command": "bun",
"args": ["run", "/path/to/dflow-mcp/src/index.ts"]
}
}
}This server is compatible with any MCP client (Cursor, Continue, etc.). Use the same configuration format as above.
get_event- Get a single event by tickerget_events- Get paginated list of all events
get_market- Get market details by tickerget_market_by_mint- Get market by mint addressget_markets- Get paginated list of marketsget_markets_batch- Get multiple markets (up to 100)
get_trades- Get trades across marketsget_trades_by_mint- Get trades for specific market
get_forecast_percentile_history- Get forecast historyget_forecast_percentile_history_by_mint- Forecast history by mintget_event_candlesticks- Event candlestick dataget_market_candlesticks- Market candlestick dataget_market_candlesticks_by_mint- Candlesticks by mint
get_live_data- Get live data for milestonesget_live_data_by_event- Live data for eventget_live_data_by_mint- Live data by mint
get_series- Get all series templatesget_series_by_ticker- Get specific series
get_outcome_mints- Get outcome mint addressesfilter_outcome_mints- Filter addresses to outcome mintsget_tags_by_categories- Get category-tag mappingget_filters_by_sports- Get sports filtering optionssearch_events- Search events by title/ticker
{
"tool": "get_event",
"arguments": {
"event_id": "US-PRESIDENT-2024",
"withNestedMarkets": true
}
}{
"tool": "get_market_by_mint",
"arguments": {
"mint_address": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM"
}
}{
"tool": "get_forecast_percentile_history",
"arguments": {
"series_ticker": "US-PRESIDENT",
"event_id": "US-PRESIDENT-2024",
"percentiles": "25,50,75",
"startTs": 1704067200,
"endTs": 1706745600,
"periodInterval": 3600
}
}{
"tool": "search_events",
"arguments": {
"q": "election",
"limit": 10,
"sort": "volume",
"order": "desc"
}
}dflow-mcp/
├── src/
│ └── index.ts # Main server implementation
├── package.json # Dependencies and scripts
├── tsconfig.json # TypeScript configuration
├── llms_dflow.json # API specification
└── README.md # This file
bun run buildbun run testThe server implements the complete REST API defined in llms_dflow.json with the following base URL:
https://prediction-markets-api.dflow.net
All tools include comprehensive parameter validation and type definitions. Error handling returns informative messages for debugging.
This server is configured for publication on Smithery, the MCP server registry.
smithery.yaml- Defines the runtime (TypeScript) and target (local)package.json- Includes module entry point and Smithery CLI scripts
- Ensure your code is pushed to a public GitHub repository
- Visit smithery.ai/new
- Connect your GitHub repository
- Smithery will automatically detect the
smithery.yamlconfiguration
Once published, users can install your server with:
npx @smithery/cli install dflow-mcp-server --client claudeMIT License - See LICENSE file for details.
OpenSVM × Kalshi × DFlow