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 1.3 billion 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 1.3B-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.
The setup
For this exploration I used the community Postgres MCP — the generic one — wired into Claude Code's .mcp.json. The entire config is this:
{
"mcpServers": {
"postgres": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-postgres",
"postgresql://USER:PASS@HOST:5432/db"
]
}
}
}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:
Claude wrote the aggregate, knew to use the pre-aggregated wallet_stats table instead of scanning 1.3B raw trades, handled the PnL-coalescing quirk, and came back with the headline:
Only ~20% — about 1 in 5 — of all 1,560,894 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 roughly half of the ~$968 million in total profit. The single biggest verified wallet cleared about $16.6M.
- 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. Here's one of the biggest verified winners it surfaced — 60% accuracy across 4,695 resolved bets, live from the database:
One of the biggest consistent winners in the dataset — 60% across 4,695 resolved bets. This card is live: click through for the full dossier.
That community Postgres MCP is perfect for ad-hoc exploration. For repeatable research we wrapped the whole ledger into CrowdIntel's own MCP — 12 named read-only methods like get_wallet_dossier, scan_insider_signals and get_cluster, not raw SQL. The model calls a purpose-built tool instead of writing a query — and it's pointed at our ledger, not yours.
One API key. Plug the CrowdIntel MCP into Claude, Cursor, or Zed and pull this same data — the exact 1.3B-trade ledger Claude was querying.
- REST API over the full 1.3B-trade ledger
- Terminal MCP · 12 custom methods (get_wallet_dossier, scan_insider_signals…) — not raw SQL
- Live insider feed, wallet dossiers & cluster intel
- Unlimited investigations + full archive
- Data export · CSV / JSON on every surface
- Everything in Pro — real-time feed, the Agent
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 1.3B-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:
- 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.
- Restart Claude Code. It picks up the new server and exposes a read-only query tool.
- 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. And if you'd rather skip the indexer entirely and query our ledger — that's the Terminal plan above.