Cricket MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
git clone https://github.com/mavaali/cricket-mcp.git
cd cricket-mcp
npm install
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add cricket-mcp -- node "<FULL_PATH_TO_CRICKET_MCP>/dist/index.js"

Replace <FULL_PATH_TO_CRICKET_MCP>/dist/index.js with the actual folder you prepared in step 1.

README.md

A cricket stats nerd's dream, wired directly into Claude.

cricket-mcp

A cricket stats nerd's dream, wired directly into Claude.

cricket-mcp is an MCP (Model Context Protocol) server that turns 10.9 million ball-by-ball deliveries from Cricsheet into a queryable cricket brain. Think ESPNcricinfo's Statsguru, but you just ask questions in plain English and get answers.

21,000+ matches. Every format. Every ball. All sitting in a local DuckDB database that answers in milliseconds.

What can it do?

Ask Claude things like:

  • "How does Kohli bat against Hazlewood in ODIs?"
  • "Best death bowlers in IPL by economy"
  • "Kohli's average while chasing in ODIs"
  • "Who is close to 10000 Test runs?"
  • "What would Kohli average without Hazlewood?"
  • "Does the toss matter in T20s?"
  • "IPL 2024 standings and top performers"
  • "Which bowlers have the best dot ball % at the death?"
  • "Which batters are improving this season?"
  • "Break down Rohit Sharma's record against each of England's bowlers"

Tools (25 total)

Player Stats

Tool What it does
search_players Fuzzy name search with career summary
get_player_stats Full batting or bowling stats (use perspective param) — avg, SR, 100s, 50s, HS, 4s, 6s, maidens, 5wi, best figures

Match & Team Queries

Tool What it does
search_matches Find matches with filters + pagination
get_head_to_head Team vs team W/L/D/T record
get_match_scorecard Complete batting + bowling card for any match

Records & Leaderboards

Tool What it does
get_batting_records Rank players by runs, avg, SR, 100s, 50s, 6s, 4s, HS
get_bowling_records Rank players by wickets, avg, econ, SR, 5wi

Venue & Partnerships

Tool What it does
get_venue_stats Ground stats — avg scores, bat-first win %, highest/lowest totals
get_partnerships Highest batting partnerships

Batter vs Bowler Matchups

Tool What it does
get_matchup Head-to-head stats (both names), batter vs team bowling (batter + opposition), or matchup leaderboards (one name + record_type)
get_style_matchup Batter vs bowling styles (pace/spin, left-arm/right-arm) or bowler vs batting hand

Phase & Situation Analysis

Tool What it does
get_phase_stats Batting/bowling stats by phase — powerplay (1-6), middle (7-15), death (16-20)
get_situational_stats Stats while chasing, setting, under pressure, or by batting position. Format-aware (Tests use 4th innings for chasing)
get_toss_analysis Toss impact on outcomes — bat first vs chase win %, by venue/team/format
get_discipline_stats The boring stats that win tournaments — dot ball %, wide rate, boundary %

Team & Tournament

Tool What it does
get_team_form Recent form — last N results, win streak, avg scores, run rate
get_tournament_summary Standings, top batters, top bowlers for any tournament/season

Career & Trends

Tool What it does
get_milestone_tracker Players near career milestones (10000 runs, 500 wickets, etc.)
get_emerging_players Players whose recent stats significantly outperform career baseline
get_what_if Counterfactual — recalculate career stats excluding opponents, bowlers, venues, or tournaments
get_season_stats Year-by-year career breakdown
get_player_comparison Side-by-side comparison of two players

Fielding & Dismissals

Tool What it does
get_fielding_stats Catches, stumpings, run outs per fielder
get_dismissal_analysis Breakdown of how a player gets out (or gets batters out)

Innings Analysis

Tool What it does
get_innings_progression Over-by-over scoring progression for a match innings

Every tool supports filters: format (Test/ODI/T20/IT20), gender, team, opposition, venue, city, season, tournament, and date range.

Setup

Prerequisites

  • Node.js 18+
  • Claude Desktop (or any MCP client)

Install

git clone https://github.com/mavaali/cricket-mcp.git
cd cricket-mcp
npm install

Ingest the data

This downloads all Cricsheet data (~94 MB ZIP, 21,000+ matches) and loads it into a local DuckDB database:

npm run ingest

Takes a few minutes. You'll see progress like:

Downloading from https://cricsheet.org/downloads/all_json.zip...
Download size: 93.7 MB
Extracted 21270 JSON files
Ingested 21270/21270 matches (10,895,339 deliveries)
Creating indexes...
=== Ingestion Complete ===
  Matches:    21270
  Deliveries: 10895339
  Players:    14406

Keep data up to date

Cricsheet publishes new matches daily. Instead of re-ingesting everything, pull just the recent matches:

npm run update          # l

Tools (25)

search_playersFuzzy name search with career summary
get_player_statsFull batting or bowling stats
search_matchesFind matches with filters and pagination
get_head_to_headTeam vs team W/L/D/T record
get_match_scorecardComplete batting and bowling card for any match
get_batting_recordsRank players by runs, avg, SR, 100s, 50s, 6s, 4s, HS
get_bowling_recordsRank players by wickets, avg, econ, SR, 5wi
get_venue_statsGround stats including avg scores and win percentages
get_partnershipsHighest batting partnerships
get_matchupHead-to-head stats between players or batter vs team bowling
get_style_matchupBatter vs bowling styles or bowler vs batting hand
get_phase_statsBatting/bowling stats by powerplay, middle, or death overs
get_situational_statsStats while chasing, setting, or under pressure
get_toss_analysisToss impact on outcomes by venue, team, or format
get_discipline_statsDot ball percentage, wide rate, and boundary percentage
get_team_formRecent form including last N results and run rates
get_tournament_summaryStandings and top performers for any tournament
get_milestone_trackerPlayers near career milestones
get_emerging_playersPlayers whose recent stats outperform career baseline
get_what_ifRecalculate career stats excluding specific opponents or venues
get_season_statsYear-by-year career breakdown
get_player_comparisonSide-by-side comparison of two players
get_fielding_statsCatches, stumpings, and run outs per fielder
get_dismissal_analysisBreakdown of how a player gets out or gets batters out
get_innings_progressionOver-by-over scoring progression for a match innings

Configuration

claude_desktop_config.json
{ "mcpServers": { "cricket-mcp": { "command": "node", "args": ["/path/to/cricket-mcp/index.js"] } } }

Try it

How does Virat Kohli bat against Josh Hazlewood in ODIs?
Who are the best death bowlers in the IPL by economy rate?
What is Kohli's batting average while chasing in ODIs?
Which bowlers have the best dot ball percentage at the death?
Break down Rohit Sharma's record against each of England's bowlers.

Frequently Asked Questions

What are the key features of Cricket MCP?

Query 10.9 million ball-by-ball deliveries from Cricsheet. Local DuckDB database for millisecond response times. Supports 26 specialized tools for player, match, and situational analysis. Format-aware statistics for Test, ODI, and T20 matches. Advanced filtering by venue, season, tournament, and date range.

What can I use Cricket MCP for?

Cricket journalists researching player matchups for match previews. Fantasy cricket players analyzing situational stats to optimize team selection. Sports analysts performing deep dives into historical team performance and toss impact. Fans tracking career milestones and emerging player trends in real-time.

How do I install Cricket MCP?

Install Cricket MCP by running: git clone https://github.com/mavaali/cricket-mcp.git && cd cricket-mcp && npm install

What MCP clients work with Cricket MCP?

Cricket MCP works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Cricket MCP docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare