Polymarket Wallet Intelligence

io.github.aemery13由 GitHub 账号 aemery13 发布v1.0.1更新于 Oct 24, 2026

Classify Polymarket wallets as human or bot, score their trading edge, read open positions.

已验证Streamable HTTP可网页运行金融数据与分析

概览

AI 生成的概览

一个 MCP 服务器兼 REST API,可将 Polymarket 钱包判定为真人或机器人、给出交易优势评分,并读取当前持仓。

可以做什么
  • 按钱包地址或用户名评分:返回 human、bot 或 insufficient_data 分类,附置信度与原因码,以及 0–10 的优势评分
  • 读取某钱包的实时未平仓头寸,按规模排序,约每 30 秒刷新
  • 获取原始 Polymarket 排行榜,或筛选出达到最低优势分的已评分真人钱包
  • 从服务的每日快照数据中读取评分与持仓的历史序列
适用场景
适合在智能体决定跟随哪些 Polymarket 信号时使用,例如筛选跟单候选而不是直接相信排行榜,或判断某个交易者是具备真实优势的真人还是机器人。
运行要求
可使用托管远程端点,或在本地以 Python 运行 PyPI 包 polymarket-intel-mcp。API 密钥为可选项,通过环境变量 POLYMARKET_INTEL_API_KEY 或请求头 X-API-Key 提供;匿名访问可用但受免费额度限制。需要访问该服务及 Polymarket 数据的网络。
安装前请注意
可选的 API 密钥用于提高速率上限并解锁付费功能,可能产生付费使用。评分是基于行为信号与重建盈亏的启发式估计,并非投资建议,README 也说明实时数值会随时间变化。查询的钱包地址和用户名会发送到托管服务。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Polymarket Wallet Intelligence,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.aemery13%2Fpolymarket-intel/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "polymarket-wallet-intelligence": {
      "type": "http",
      "url": "https://polymarket-intel-production.up.railway.app/mcp"
    }
  }
}

README

Polymarket Wallet Intelligence

An MCP server and REST API that classifies Polymarket wallets as human or bot, scores their trading edge from 0–10, and streams their current open positions. Built for AI agents on copy-trading and signal-following stacks.

bash
# Use it from any MCP client (Claude Desktop, Cursor, etc.)pip install polymarket-intel-mcppolymarket-intel-mcp
# Or call the hosted REST API directlycurl https://polymarket-intel-production.up.railway.app/wallet/0xf1528f12e645462c344799b62b1b421a6a4c64aa

How this fits with other Polymarket MCP servers

Status

Latest: v1.2 (May 2026) — classifier improved to distinguish active human grinders from HFT bots. See release notes and v1.3 backlog issue for what's next.

A daily snapshot job runs at 08:00 UTC and re-scores the top 50 leaderboard wallets, building a historical dataset of classification stability over time.

There are several MCP servers covering Polymarket, each at a different layer:

ServerWhat it doesWhen to use it
polymarket-intel (this)Wallet intelligence — classify human vs bot, score trading edge, read open positionsDeciding whose signals to follow
graph-polymarket-mcpMarket data via The Graph subgraphs (20 tools, 8 subgraphs)Reading raw on-chain market data
whitmorelabs/polymarket-mcpSlippage, liquidity, arbitrage, price feedsPricing your own trades
joinQuantish/polymarketSelf-hosted trading agentRunning an autonomous bot

These complement each other. A copy-trading agent would use polymarket-intel to filter wallets worth following, then graph-polymarket-mcp to read the markets those wallets are betting on, then whitmorelabs/polymarket-mcp to size its own entries.

What it answers

  • "Is this trader a human or a bot?" — score_polymarket_wallet(wallet_address) → returns classification ∈ {human, bot, insufficient_data} plus a confidence score and reason codes.
  • "Do they actually have an edge?" — edge_score from 0–10, gated on net realised PnL so distributed-but-losing wallets don't get false positives.
  • "What are they betting on right now?" — get_open_positions(wallet_address) returns live positions sorted by size, refreshed every 30s.
  • "How has their edge changed over time?" — /wallet/{address}/history returns the score time series from the daily snapshots.

Why this exists

The Polymarket leaderboard is misleading. It includes unrealised PnL marked-to-current-price, so the names at the top are dominated by bots running structural arb plus a few wallets sitting on huge open positions that may never resolve in their favour. Agents that copy-trade naively from the leaderboard get burned.

This service runs every leaderboard wallet through behavioural fingerprinting (focus ratio, holding period, timing regularity, category concentration) plus PnL reconstruction from raw activity, and only surfaces traders that look like genuine humans with a real edge.

The dataset grows more valuable over time — every day the snapshot job runs, historical signals accumulate. Wallets that have been consistently above edge 7 for 90 days are a stronger signal than any single point-in-time score.

Distributed as both a REST API and an MCP server

SurfaceUse caseSetup
MCP serverAgent that needs tool-style accesspip install polymarket-intel-mcp
REST APICustom HTTP integration, dashboardscurl https://polymarket-intel-production.up.railway.app/...
Hosted MCPAgent on any MCP-compatible clientAdd https://polymarket-intel-production.up.railway.app/mcp to client config

Architecture

┌──────────────────────────────────────────────┐│  core/                                       ││    client.py    — Polymarket data API client ││    signals.py   — pure signal calculators    ││    scorer.py    — classifier + edge score    ││    models.py    — Pydantic response schemas  │├──────────────────────────────────────────────┤│  db/                                         ││    schema.sql   — Postgres tables + indexes  ││    repository.py — Repository protocol +     ││                    InMemoryRepository        ││    supabase_repo.py — Supabase impl          ││    converters.py — ScoreResult ↔ records     │├──────────────────────────────────────────────┤│  api/main.py    — FastAPI HTTP server        ││  mcp_server/    — MCP server (stdio)         ││  scripts/                                    ││    analyze_wallet.py — CLI                   ││    snapshot_job.py   — daily cron entry      ││  tests/                                      │└──────────────────────────────────────────────┘

Core has no idea persistence exists. The API and snapshot job depend on the Repository protocol — Supabase in production, in-memory in tests and when env vars are unset. This is what makes the suite run without a database and what lets you swap Supabase for Neon, RDS, or anything else later by adding one file.

Quickstart

bash
git clone <repo> && cd polymarket-intelpython -m venv .venv && source .venv/bin/activatepip install -r requirements-dev.txtpytest                             # 19 tests, all green

CLI

bash
python scripts/analyze_wallet.py phonesculptorpython scripts/analyze_wallet.py 0xf1528f12e645462c344799b62b1b421a6a4c64aa --json

REST API

bash
uvicorn api.main:app --reload --port 8000open http://localhost:8000/docs

The API is split into a slow tier (cached aggressively, cheap, ideal for one-off discovery) and a fast tier (short cache, ideal for live copy-trading agents). The split exists because the underlying data has different freshness needs — a wallet's classification doesn't change minute-to-minute, but their open positions do.

TierMethodPathTTLNotes
slowGET/wallet/{address}1hScore blob — classification, edge_score, signals. No positions. Persisted to history (debounced).
fastGET/wallet/{address}/positions30sOpen positions only. No DB write per call.
—GET/wallet/{address}/historyDBScore time series
—GET/wallet/{address}/positions/historyDBPosition changes over time
—GET/wallet/by-username/{username}1hConvenience lookup
—GET/leaderboard?limit=5030mRaw Polymarket top traders
—GET/leaderboard/verified?min_edge=51hFiltered to scored humans
—GET/leaderboard/historical?date=…DBLeaderboard at any past date
—GET/snapshots/latestDBWhen did the cron last run?

Why 30s on positions and not faster? Polygon block time is ~2s and Polymarket's activity index lags a few seconds. Polling below 10s gets you no fresher data, just rate-limit errors. 30s is the sweet spot for cost/freshness/upstream-friendliness.

Why debounced DB writes? A trading agent may hit /wallet/{address} thousands of times an hour. Writing a row per call would bloat history with near-duplicate snapshots. The score endpoint persists at most once per wallet per hour. The daily snapshot job guarantees coverage of the top 50 regardless of API traffic.

MCP server (Claude Desktop, Cursor, Continue)

bash
python mcp_server/server.py

Then drop mcp_server/claude_desktop_config.example.json into your Claude Desktop config and edit the absolute path.

The server exposes four tools:

  • score_polymarket_wallet(wallet_address) — full score
  • score_polymarket_user(username) — lookup by display name
  • get_polymarket_leaderboard(limit) — raw leaderboard
  • get_open_positions(wallet_address) — fast snapshot of live bets

Scoring methodology

Bot triggers (any one fires → bot)

SignalThresholdSource
Focus ratio> 12Hubble Research, validated empirically
Median hold time< 60sHFT / MEV pattern
Timing CV< 0.3 (n≥100)Scheduled trading

Soft signals stack: crypto-market-maker pattern, > 200 trades/day, etc.

Edge score (0–10) for humans

Hard gate: net realised PnL ≤ 0  →  capped at 2.0Hard gate: < 10 winning markets  →  capped at 3.0
35%  PnL magnitude (log-scaled)25%  win rate (capped at 70%)15%  PnL distribution (penalises top-1 concentration)15%  sample size (winning markets, capped at 50)10%  win/loss ratio (capped at 3x)

Net PnL is the hard gate so wallets like neutralwave23 — many distributed tiny wins masking $375k of losses — are correctly flagged as poor.

PnL reconstruction

money_in   = sum(BUY usdcSize per conditionId)money_out  = sum(SELL usdcSize) + sum(REDEEM usdcSize)pnl        = money_out - money_in
status:  REDEEM exists                                    → won  SELL exists, no REDEEM                           → exited  no SELL, no REDEEM, last trade > 7 days old      → lost  no SELL, no REDEEM, last trade within 7 days     → open

Why activity rather than the positions endpoint: positions vanish from the API after redeem, so any naive analysis using /positions undercounts wins. Always reconstruct from /activity?type=TRADE + /activity?type=REDEEM (separate calls — comma-joined types return 400).

Persistence (Supabase)

The historical dataset is the moat. Every day the snapshot job pulls the leaderboard, scores the top N wallets, and persists three things: the score itself (wallet_scores), the wallet's open positions at that moment (open_position_snapshots), and the leaderboard as it stood (leaderboard_snapshots). After 90 days you can answer questions no one else can: "who has been consistently above edge 7 for the last quarter?", "which wallets just entered the top 50?", "show me everyone who held YES on this market three days before resolution."

Setup

bash
# 1. Create a Supabase project, get the URL and service_role keycp .env.example .env  # fill in SUPABASE_URL and SUPABASE_KEY
# 2. Apply the schema (Supabase dashboard → SQL editor → paste db/schema.sql → run)#    Or via psql:#    psql "$DATABASE_URL" -f db/schema.sql
# 3. Run the snapshot job once to verify it writes:python scripts/snapshot_job.py --top 10

If SUPABASE_URL and SUPABASE_KEY are unset, both the API and the snapshot job fall back to an in-memory repository — the suite still passes, the API still serves live scoring, but history endpoints will be empty until you wire up Supabase.

Daily snapshot job

Schedule python scripts/snapshot_job.py --top 50 daily (Railway cron, GitHub Actions, or Supabase pg_cron triggering an edge function — your call). The job is idempotent: running twice creates two snapshots, which is fine — history queries pick the closest one.

bash
python scripts/snapshot_job.py --top 50              # productionpython scripts/snapshot_job.py --top 5  --dry-run    # local testing, no writes

Each run records an audit row in snapshot_runs with start/finish times, wallets scored, and error count.

Schema overview

TablePurpose
walletsOne row per wallet ever seen
wallet_scoresAppend-only score time series
open_position_snapshotsWhat each wallet held at each tick
leaderboard_snapshotsFull leaderboard, preserved daily
snapshot_runsAudit trail for the cron job

Two views (latest_wallet_scores, latest_leaderboard) make the common "what's current" queries cheap.

Repository pattern

db/repository.py defines a Repository protocol. Two implementations:

  • InMemoryRepository — thread-safe, lossy across restarts. Used in tests and as the dev-mode fallback.
  • SupabaseRepository — production. Wraps the supabase-py client.

The API and snapshot job depend only on the protocol. To swap Supabase for Neon or self-hosted Postgres, write one new class implementing the same six method signatures.

Pricing dimensions

The endpoint split was designed so each tier maps cleanly to a billing model. Suggested ranges:

TierEndpointsSuggested priceWhy
Discovery/wallet/{address}, /leaderboard/*$0.001–$0.01 / callSlow cache, mostly DB reads
Monitoring/wallet/{address}/positions$0.01–$0.05 / callFresh data, hits Polymarket each time
Streaming (v2)SSE feed of position changes$20–$100 / month flatContinuous fetch on our side
History/wallet/{address}/history etc.$0.005 / callPure DB read, value grows over time

The streaming endpoint is the one serious copy-trading bots will actually pay for, but it requires a continuous-fetch worker on our side — leaving it for v2 once we have signal that the per-call business works.

Deploy

Railway

Push the repo, point at it. railway.toml handles the rest.

Render / Heroku-style

Procfile is in place.

Caching

api/cache.py is a thread-safe in-memory TTL cache with the same interface as a Redis client. For multi-worker production, swap the singleton for redis.Redis() in one file. TTLs:

  • wallet score: 1h
  • open positions only: 5m
  • leaderboard: 30m
  • verified leaderboard: 1h

Testing

bash
pytest -v

Synthetic fixtures in tests/fixtures.py mimic the three real wallet patterns from the research phase (phonesculptor MLB human, gabigol HFT bot, neutralwave23 tilt loser) plus a low-data newbie. Tests run against fixtures only — no live API calls — so the suite is deterministic and CI-safe.

Distribution roadmap

  1. Now — REST API on Railway, Supabase for daily snapshot persistence
  2. Next — Publish to MCP Hub, Replit Agent Market, awesome-mcp-servers
  3. Later — x402 micropayments per call (USDC), historical query endpoints (the moat: every day we run, the dataset grows)

Verified wallet examples

These are the personas the test fixtures target. Live numbers will differ as activity changes:

WalletScoreNotes
phonesculptor~9/10MLB-focused human, distributed wins, real edge
gabigolbotCrypto 5-min Up/Down arb (edge largely dead post-Feb 2026)
neutralwave23~1/10Distributed tiny wins masking large net loss

来源:README.md,提交 877cc68

工具

0
SourceWeft 尚未读取此服务器的工具。

版本历史

1
  1. v1.0.1最新Sep 16, 2026

评分

已满足适用检查项的 75%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。