Predict.fun MCP
Structured access to Predict.fun prediction market data on BNB Chain — platform stats, market analysis, trader profiling, yield mechanics, and behavioral meta-tools.
Tools
- - getplatformstats — Full platform overview: volume, OI, yield, sync status
- gettopmarkets — Rank markets by volume, open interest, or trade count
- getmarketdetails — Deep dive: OI, resolution, top holders, orderbook stats
- gettraderprofile — Full P&L: trades, positions, payouts, yield rewards
- getrecentactivity — Latest trades, splits, merges, redemptions, or yield claims
- getyieldoverview — Venus Protocol deposits, redemptions, yield stats
- getwhalepositions — Largest holders with % of market OI
- getleaderboard — Top traders by volume, payouts, or trade count
- getresolvedmarkets — Recently settled markets with outcomes
- querysubgraph — Custom GraphQL against any of the three subgraphs
- findtraderpersona — Classify a trader: whale, yield farmer, arbitrageur, early mover, sniper
- scantraderpersonas — Find traders matching a behavioral archetype
- tagmarketstructure — Tag a market by resolution latency, liquidity, oracle type, tail risk
- scanmarketsby_structure — Find markets by structural filter
Requirements
- - Runtime: Node.js >= 18 (runs via
npx) - Environment variables:
-
GRAPH_API_KEY (required) — Free API key from
The Graph Studio. Used to query three Predict.fun subgraphs via The Graph Gateway. Queries are billed to your key (free tier: 100K queries/month).
Install
CODEBLOCK0
Network & Data Behavior
- - All tool calls make GraphQL requests to The Graph Gateway (
gateway.thegraph.com) using your API key. - Three subgraphs are queried: predictfun-orderbook, predictfun-positions, and predictfun-yield (subgraph IDs are built into the server).
- No local database or persistent storage is used.
- The SSE transport (
--http / --http-only) starts a local HTTP server on port 3850 (configurable via MCP_HTTP_PORT env var).
Use Cases
- - Get real-time platform stats and market rankings on Predict.fun
- Profile traders by P&L, volume, and behavioral archetypes
- Analyze market quality: liquidity depth, OI concentration, resolution speed
- Track yield mechanics via Venus Protocol integration
- Run custom GraphQL queries against orderbook, positions, and yield subgraphs
Predict.fun MCP
对BNB链上Predict.fun预测市场数据的结构化访问——平台统计、市场分析、交易者画像、收益机制及行为元工具。
工具
- - getplatformstats — 平台全景概览:交易量、未平仓合约、收益率、同步状态
- gettopmarkets — 按交易量、未平仓合约或交易次数对市场进行排名
- getmarketdetails — 深度分析:未平仓合约、结算情况、顶级持有者、订单簿统计
- gettraderprofile — 完整损益表:交易、持仓、赔付、收益奖励
- getrecentactivity — 最新交易、拆分、合并、赎回或收益领取
- getyieldoverview — Venus协议存款、赎回、收益统计
- getwhalepositions — 最大持有者及其占市场未平仓合约百分比
- getleaderboard — 按交易量、赔付或交易次数排名的顶级交易者
- getresolvedmarkets — 近期已结算市场及其结果
- querysubgraph — 针对三个子图之一的自定义GraphQL查询
- findtraderpersona — 对交易者进行分类:鲸鱼、收益农民、套利者、早期行动者、狙击手
- scantraderpersonas — 查找符合特定行为模式的交易者
- tagmarketstructure — 按结算延迟、流动性、预言机类型、尾部风险对市场打标签
- scanmarketsby_structure — 按结构筛选条件查找市场
要求
- - 运行环境: Node.js >= 18(通过npx运行)
- 环境变量:
- GRAPH
APIKEY(必需)— 来自
The Graph Studio的免费API密钥。用于通过The Graph网关查询三个Predict.fun子图。查询费用计入您的密钥(免费套餐:每月10万次查询)。
安装
bash
GRAPHAPIKEY=your-key npx predictfun-mcp
网络与数据行为
- - 所有工具调用均使用您的API密钥向The Graph网关(gateway.thegraph.com)发起GraphQL请求。
- 查询三个子图:predictfun-orderbook、predictfun-positions和predictfun-yield(子图ID已内置在服务器中)。
- 不使用本地数据库或持久化存储。
- SSE传输(--http / --http-only)在端口3850上启动本地HTTP服务器(可通过MCPHTTPPORT环境变量配置)。
使用场景
- - 获取Predict.fun的实时平台统计和市场排名
- 通过损益、交易量和行为模式对交易者进行画像
- 分析市场质量:流动性深度、未平仓合约集中度、结算速度
- 通过Venus协议集成追踪收益机制
- 对订单簿、持仓和收益子图运行自定义GraphQL查询