← Blog

A live ODI form dashboard for the 2027 World Cup, built on cricket-mcp

Mihir Wagle 6 min read
cricketodiworld-cup-2027mcpclaudecricsheetdashboard

The question

The ICC rankings say who has been good. They don't say who is good now, against whom, or how much of a record came from beating sides that won't be in South Africa in 2027.

I wanted one page that answers that from ball-by-ball data and shows its arithmetic. I built it as a dashboard in Claude on top of cricket-mcp, the MCP server I wrote over Cricsheet's 11.7 million deliveries. Every number on the page is a query you can open, re-run and change. A frozen copy with data through 5 October 2026 is here. Below: what the page computes, how to connect the data, and how to build the live version with one prompt.

What the page computes

Fourteen teams, the likely 2027 field: hosts South Africa, Zimbabwe and Namibia, plus India, Australia, England, New Zealand, Pakistan, Sri Lanka, Afghanistan, Bangladesh, West Indies, Ireland and Scotland. Men's ODIs only.

Each team gets a form index from 0 to 100:

index = 0.5 × win% + 0.2 × win% (last 5) + 0.3 × run-rate score

Ties count half. No-results are dropped. Run-rate score is the team's average run rate z-scored against the other thirteen and rescaled so the field mean is 50. The weights are my choice. They are printed on the page and live in one editable calculation.

Two toggles change what feeds the formula:

Toggle Options Effect
Window Since the 2023 World Cup (Jan 2024 on) / Last 12 months Every query re-runs from the new start date
Opponents All / World Cup field only Win % and last-5 use only matches against the other 13 teams; under 5 such matches, no index

Under the index: a sortable table with each team's last ten results, two player charts (batting average against strike rate, bowling wickets against economy, medians drawn in), and a team picker listing one side's top run-scorers and wicket-takers.

Two gaps in the source are printed on the page. Cricsheet has no Afghanistan ODIs in this window and nine for Ireland. Both sit at the bottom because the matches are missing, not because they lost them.

Step 1: connect Cricket MCP

The dashboard runs its queries through the viewer's own connector. Your Claude account needs a connector named Cricket MCP before the page can show anything.

  1. In Claude, open Settings, then Connectors, then Add custom connector.
  2. Name it Cricket MCP. The dashboard looks the connector up by this name.
  3. Server URL: https://cricket.waglesworld.com/mcp
  4. Save. There is no sign-in; the server is read-only.
  5. Test it: ask Claude "How has New Zealand done in ODIs since 2024?" and check that the answer came from get_team_form.

To run your own, the server is open source at mavaali/cricket-mcp. docker build ingests all of Cricsheet (141 MB, 23,000 matches) and serves it over HTTP on port 3000 at /mcp. Point the connector at wherever you host the container.

The server exposes 37 tools. The dashboard uses three: get_team_form, get_batting_records and get_bowling_records.

Step 2: look at it, then build the live one

Here is a frozen copy with data through 5 October 2026. The opponents toggle, the sortable table and the player charts all work; it needs no connector. What it lacks is the live part: it won't pick up next week's matches, and it has no last-12-months window or per-team leaderboards. Those need queries, and a page that runs queries with the viewer's own connector can't be published to the open web.

For the live version, in Claude with Cricket MCP connected, start a new Dashboard artifact and paste:

Analyze recent men's ODI form for the likely 2027 World Cup field (hosts SA, ZIM, NAM plus IND, AUS, ENG, NZ, PAK, SL, AFG, BAN, WI, IRE, SCO) using the Cricket MCP connector. One live query per team with get_team_form since 2024-01-01, plus get_batting_records and get_bowling_records leaderboards. Compute a form index = 0.5 x win% + 0.2 x last-5 win% + 0.3 x run-rate z-score, visible as a calculation. Add two toggles: window (since 2024 / last 12 months) and opponents (all / World Cup field only, blank under 5 matches). Label the prediction as a hypothesis and state what would disprove it.

On first open the page asks you to allow Cricket MCP for this artifact. If you dismissed that, open the page's Permissions menu in its toolbar, allow it, and reload the page. The Refresh button re-runs the queries with the old definitions and won't pick the change up.

Eighteen queries fire on load, one per team plus four leaderboards. The skeleton bars last a few seconds.

If every card says "Failed to load":

  1. No connector named Cricket MCP on your account. Back to Step 1.
  2. The connector exists but isn't allowed for this page. Permissions menu, allow, reload.
  3. The server is down. Ask Claude a cricket question in chat. If that fails too, it's the server.

How it runs, and what it costs

The page is HTML and d3 over a small store of query definitions. Each definition is one tool call: connector, tool, arguments. When you open the page, your browser makes those calls through your connector and draws from the answers. No model is involved. A thousand readers cost me no tokens, and cost each of them nothing beyond their own connector's quota, which for read-only cricket stats is nothing.

The Sources panel lists every query. Click a number and it shows which query, which row, and how old. Open a query and you see the arguments sent and the rows returned, downloadable as CSV. The form index is a calculation whose code is printed there, with parameters named after the datasets they read. If 0.3 on run rate looks wrong to you, that is one number to change.

Editors can change a query's arguments in Sources, test it, save it or roll it back. Readers can't.

Where the index is wrong

Version one had Scotland second in the world. Nineteen of their twenty-nine wins since 2024 came in World Cup League 2 against Canada, Nepal, the UAE and Oman. The formula counted each as a win. That is what the opponents toggle is for. Set it to World Cup field only and Scotland drops out: four decided matches against the field, all against Namibia, under the five-match floor.

The toggle does not fix the underlying problem. Run rate still comes from all matches because the source reports it per team, not per match, so fast scoring against weak attacks still earns credit. Within the field, beating Zimbabwe counts the same as beating India. The real answer is an opponent-adjusted rating such as Elo. That is a separate post.

If you build it and a weight looks wrong, tell me which one.

Enjoyed this post?

Get new ones delivered straight to your inbox. No spam, ever.

Comments