Live

· 6 min read · claude · claude code

I connected Claude Code to a database of 72M Polymarket trades with an MCP. Here's what it found.

I had the full on-chain Polymarket ledger in Postgres but answering questions meant hand-writing SQL across 72M rows. So I gave Claude Code a Postgres MCP and just asked it questions in plain English. This is the build, the exact config, and what it found about who actually makes money.

By CrowdIntel · Updated

I run CrowdIntel, an on-chain analytics platform for prediction markets. Under the hood there's a custom indexer that pulls every Polymarket contract on Polygon into a Postgres database — about 72 million trades across 1.56 million wallets. The data was all there. The problem was getting answers out of it: every question meant hand-writing SQL against a 72M-row table, remembering which columns were trustworthy, and not accidentally scanning the whole thing.

So I gave Claude Code a Postgres MCP pointed at that database, and started just... asking it questions in plain English.

Claude Code querying the Polymarket ledger through a Postgres MCP — only 1 in 5 traders is profitable
Asked Claude Code via a Postgres MCP: 4 out of 5 Polymarket traders never make money overall — only ~1 in 5 wallets is net positive.

On this page

The setup

custom indexer  →  Postgres (72M trades, 1.56M wallets)  →  Postgres MCP  →  Claude Code

The MCP is the community Postgres server wired into Claude Code's .mcp.json. The entire config is this:

{
  "mcpServers": {
    "Postgres": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-postgres",
        "postgresql://USER:PASSWORD@HOST:5432/polywhales"
      ]
    }
  }
}

Once it's connected, Claude can run read-only queries against the live ledger itself — no copy-pasting result sets, no me writing the SQL. Then I just asked.

What Claude found

I started with the obvious one, typed exactly like this:

"how many Polymarket traders actually make money?"

Claude wrote the aggregate, knew to use the pre-aggregated wallet_stats table instead of scanning 72M raw trades, handled the PnL-coalescing quirk (we store a reconciled figure and a computed fallback), and came back with the headline:

Profitable1 in 5(20.6% of 1.56M wallets)Top 0.1% captured~70%(of all profit)Biggest winner$19.4M(87% win rate)

Only ~20% — about 1 in 5 — of all 1,560,857 wallets are net positive. The other ~80% never made money overall.

Then I kept pulling the thread, one plain-English question at a time:

  • The $1,000 club is tiny. Only 37,628 wallets (2.4%) have ever cleared $1,000 in profit. By $100k, you're down to ~1,200.
  • The money is brutally concentrated. The top 0.1% of wallets captured ~70% of the roughly $965 million in total profit. The single biggest verified wallet made $19.4M at an 87% win rate; the biggest loser dropped $21.8M.
  • A lot of the winners aren't human. Classified by behavior, ~23,600 wallets are bots, and a cluster of ~3,100 "whale" wallets captured a disproportionate share of the profit between them.

Each of those was one question. Claude wrote the SQL, caught the gotchas, and returned a number I could trust — across a table most BI tools choke on. Here's the actual biggest verified winner it surfaced, live from the database:

Whale 0xc23b...24f9

view full dossier →
Trades
0
Volume
Win rate
PnL

The single biggest verified winner in the dataset — an 87% win rate across 116 resolved bets. This card is live: click through for the full dossier.

One detail worth flagging: the raw max PnL in the table reads $22M, but that row is a corrupted duplicate (a URL-encoding artifact glued onto the wallet address, with zero resolved bets). The biggest real winner is $19.4M. This is exactly the kind of gotcha Claude flagged when its raw number disagreed with the clean one — which brings me to the point.

Why this worked better than a dashboard

I've built dashboards. They answer the questions you anticipated when you built them. The MCP + Claude Code setup answers the questions you think of now — including the follow-ups ("ok, but how many of those winners are bots?") that you'd never pre-build a chart for. It's the difference between a fixed report and a conversation with your own data.

The agentic part matters: Claude didn't just translate English to SQL. It knew not to COUNT(*) a 72M-row table, picked the right pre-aggregated source, scoped the claim correctly when a raw-SQL number differed from the UI, and flagged its own assumptions. That's the part a naive text-to-SQL tool gets wrong.

How to do this yourself

If you're sitting on a database you can't get answers out of, the setup takes about five minutes:

  1. Add the Postgres MCP server. Drop the @modelcontextprotocol/server-postgres entry above into Claude Code's .mcp.json with your connection string. Use a read-only role if you can.
  2. Restart Claude Code. It picks up the new server and exposes a read-only query tool.
  3. Ask in plain English. "How many rows match X?", "what's the distribution of Y?", "find the outliers in Z." Claude writes the SQL, picks the right tables, and returns the answer — then you ask the follow-up.

It's the most useful thing I've done with Claude on this codebase.

See it / try it

All of this is live and free to use during beta (no card) on CrowdIntel:

Get the same data Claude was querying — free during beta. Start tracking insider trades →

Want this piped into your own Claude, Cursor, or Zed — or raw API access to the ledger? That's Terminal: the same read-only research tools Claude used here, plus a REST API over the full 72M-trade dataset, for funds and quant desks. It's live now, with founding pricing while it's new:

Live now · MCP + API + raw ledger

Wire the ledger into your model.

Terminal exposes the CrowdIntel MCP server + a REST API over all 72M trades — the exact tools Claude used in this post, in Claude Desktop, Cursor, or Zed. Founding pricing while it’s new.

Not ready to wire it up? Get founding updates:
● 12 read-only tools● Cancel anytime● Founding pricing

FAQ

How many Polymarket traders actually make money? About 1 in 5. Of 1,560,857 wallets, only ~20.6% (322,287) are net profitable. The other ~80% are net negative overall.

How concentrated are Polymarket profits? Extremely. The top 0.1% of all wallets captured roughly 70% of the ~$965M in total positive profit. The biggest verified winner cleared $19.4M; the biggest loser dropped $21.8M.

How many wallets have made over $1,000? Only 37,628 — about 2.4%. By $100k you're down to roughly 1,200 wallets.

How many Polymarket traders are bots? About 23,600 wallets are bots and ~3,100 are whales. A large share of the consistent winners aren't human.

How do you connect Claude Code to a Postgres database? Add the community Postgres MCP server to Claude Code's .mcp.json with your connection string, restart, and ask questions in plain English. Claude writes and runs the read-only SQL for you.

More from the blog

Live
Beta
···v0.1.0
CrowdIntel needs a newer browser

Your device is on iOS 15 or older. CrowdIntel uses features (color-mix, WebGL2, modern auth) that require iOS 16+ / Safari 16+.

iPhone 7 maxes out at iOS 15, so the site can't render here. Open CrowdIntel on a desktop browser or a newer phone.

crowdintel.xyz

◆ legacy browser fallback