prediction-friction-tracker
MCP server providing tools to browse prediction-market venue friction data (fees, KYC, withdrawals), fetch venue details, get natural-language venue recommendations, and learn about the paid changes feed.
README
Prediction market friction tracker
Structured KYC, fee, and withdrawal data across 12 prediction-market venues, plus a change feed for when those terms move and a natural-language "which venue is best for X" recommendation tool. Built for AI agents that need to check execution friction before routing a trade — not for humans clicking around a dashboard.
Live now: https://prediction-friction-tracker-production.up.railway.app
For agents: three ways in
- Plain HTTP —
GET /friction/venues,GET /friction/venue/{slug},GET /friction/changes?since=<ISO8601>. Full OpenAPI spec at/openapi.json, interactive docs at/docs, agent-readable summary at/llms.txt. - MCP — a streamable-HTTP MCP server mounted at
/mcp/, exposinglist_venues,get_venue,recommend_venue, andget_changes_infoas tools. Point any MCP-compatible client at the/mcp/URL directly. - x402 —
/friction/changes(the time-sensitive change feed) is gated by the x402 protocol: unpaid requests get a real402with a payment challenge; pay $0.05 USDC on Base mainnet and retry to get the data. This is live, verified end-to-end with real money, not a demo — seeapi.pyfor the CDP-facilitator wiring.
Endpoints
| Endpoint | Cost | What it returns |
|---|---|---|
GET /friction/venues |
Free | Current snapshot of every tracked venue. Optional ?confidence=verified|stale|unconfirmed filter. |
GET /friction/venue/{slug} |
Free | One venue's current fee/KYC/withdrawal/API-access data, e.g. /friction/venue/kalshi. |
GET /friction/changes?since=<ISO8601> |
$0.05 USDC (x402) | Append-only log of every detected change since a timestamp — the time-sensitive product. |
Every record carries a confidence field: verified (spot-checked or
high-confidence extraction), stale (source was unreachable, showing a
cached value), or unconfirmed (LLM extraction was ambiguous). Treat
unconfirmed as a lead to verify against the venue directly, not a fact to
trade on.
MCP tools
list_venues(confidence)— browse/filter the current snapshot.get_venue(slug)— one venue's full data.recommend_venue(query)— free-text "which venue is best for lowest fees on high-frequency trading" / "I don't want to do KYC" / "API access without a wallet" style questions, reasoned over the current dataset. Says so explicitly rather than guessing when a query depends on data this tracker doesn't have (liquidity, volume, spread, uptime).get_changes_info()— describes the paid change feed (URL, price) without reimplementing it for free.
What's here
| File | What it does |
|---|---|
schema.py |
The data model — one VenueFriction record per venue, plus the VenueRecommendation response shape |
venues.py |
The 12 tracked venues and their policy-page source URLs |
scrapers/base.py |
Fetches and cleans raw policy-page text (requests + Playwright fallback for JS-rendered pages) |
extract.py |
Sends raw page text to Claude, gets back a structured VenueFriction matching the schema |
recommend.py |
Natural-language venue recommendation — reasons over the current dataset via Claude, structured-output constrained to real venue slugs |
reference_check.py |
Cross-checks scraped fees against a third-party source (TradeBlock), flags divergences for human review |
storage.py |
SQLite: current_state table (latest snapshot) + change_log table (append-only, the paid product) |
diff.py |
Compares a fresh extraction to the stored one, writes a ChangeEvent for anything that moved |
run_pipeline.py |
Orchestrates fetch → extract → diff → store, for all 12 venues |
api.py |
FastAPI server — the HTTP endpoints above, x402 payment gating, MCP mount |
mcp_server.py |
The MCP tool definitions, mounted into api.py at /mcp/ |
test_pipeline_logic.py, test_recommend_logic.py |
Pure-logic tests, no API key needed |
Running it locally
pip install -r requirements.txt
python test_pipeline_logic.py # no API key needed, proves storage/diff logic
python test_recommend_logic.py # no API key needed, proves recommendation logic
export ANTHROPIC_API_KEY=sk-ant-...
python run_pipeline.py # real scrape -> extract -> store, all 12 venues
uvicorn api:app --reload # boots the API on localhost:8000
Then in another terminal:
curl http://localhost:8000/friction/venues
curl http://localhost:8000/friction/venue/kalshi
curl "http://localhost:8000/friction/changes?since=2020-01-01T00:00:00Z"
See CLAUDE.md for environment quirks, Claude API usage notes, and the
data-quality/confidence model in more depth.
Informational only — not financial or legal advice. Verify directly with the venue before acting on any figure returned here.
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。