DFlow MCP Server
Provides access to Kalshi prediction market data with 23 tools for querying events, markets, trades, forecasts, candlesticks, and live data from the CFTC-regulated exchange for trading on real-world events.
README
DFlow MCP Server
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
Features
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
Installation
Method 1: Install via Smithery (Recommended)
The easiest way to install this MCP server is through Smithery:
npx @smithery/cli install dflow-mcp-server --client claude
This will automatically configure the server for use with Claude Desktop.
Method 2: Manual Installation
Prerequisites
- Bun (recommended) or Node.js 18+
Install Dependencies
bun install
Usage
Starting the Server
# Development mode (with hot reload)
bun run dev
# Production mode
bun start
# Or directly with Bun
bun run src/index.ts
The server uses stdio transport for MCP communication, which is the standard for MCP clients.
Integration with MCP Clients
Claude Desktop
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"]
}
}
}
Other MCP Clients
This server is compatible with any MCP client (Cursor, Continue, etc.). Use the same configuration format as above.
Available Tools
Event Tools
get_event- Get a single event by tickerget_events- Get paginated list of all events
Market Tools
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)
Trade Tools
get_trades- Get trades across marketsget_trades_by_mint- Get trades for specific market
Analytics Tools
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
Live Data Tools
get_live_data- Get live data for milestonesget_live_data_by_event- Live data for eventget_live_data_by_mint- Live data by mint
Series Tools
get_series- Get all series templatesget_series_by_ticker- Get specific series
Utility Tools
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
Example Tool Calls
Get a specific event
{
"tool": "get_event",
"arguments": {
"event_id": "US-PRESIDENT-2024",
"withNestedMarkets": true
}
}
Get market by mint address
{
"tool": "get_market_by_mint",
"arguments": {
"mint_address": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM"
}
}
Get forecast history
{
"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
}
}
Search events
{
"tool": "search_events",
"arguments": {
"q": "election",
"limit": 10,
"sort": "volume",
"order": "desc"
}
}
Development
Project Structure
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
Building
bun run build
Testing
bun run test
API Details
The 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.
Publishing to Smithery
This server is configured for publication on Smithery, the MCP server registry.
Configuration Files
smithery.yaml- Defines the runtime (TypeScript) and target (local)package.json- Includes module entry point and Smithery CLI scripts
To Publish
- 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 claude
License
MIT License - See LICENSE file for details.
OpenSVM × Kalshi × DFlow
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。