cricketstudio-mcp 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +26 -0
- package/README.md +204 -0
- package/data/snapshot/h2h.json +20820 -0
- package/data/snapshot/ipl-historical.json +249209 -0
- package/data/snapshot/matches.json +1243 -0
- package/data/snapshot/meta.json +25 -0
- package/data/snapshot/metadata.json +23 -0
- package/data/snapshot/mlc-leaderboards.json +14837 -0
- package/data/snapshot/mlc-league.json +123 -0
- package/data/snapshot/mlc-matches.json +20854 -0
- package/data/snapshot/mlc-players.json +29223 -0
- package/data/snapshot/mlc-teams.json +92 -0
- package/data/snapshot/mlc.json +4769 -0
- package/data/snapshot/players.json +18233 -0
- package/data/snapshot/season-stats.json +65130 -0
- package/data/snapshot/standings.json +152 -0
- package/data/snapshot/team-h2h.json +1139 -0
- package/data/snapshot/teams.json +62 -0
- package/data/snapshot/trends.json +1129 -0
- package/data/snapshot/venues.json +144 -0
- package/dist/index.js +1405 -0
- package/package.json +54 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Arul Anand / CricketStudio
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
The DATA bundled in data/snapshot/ is published under CC BY 4.0 — free to cite
|
|
26
|
+
with attribution to CricketStudio. See https://players.cricketstudio.ai/about.
|
package/README.md
ADDED
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
# cricketstudio-mcp
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@cricketstudio/mcp)
|
|
4
|
+
[](./LICENSE)
|
|
5
|
+
[](https://creativecommons.org/licenses/by/4.0/)
|
|
6
|
+
|
|
7
|
+
**Citation infrastructure for cricket — 29 MCP tools, zero network calls, 1,307 matches, 309,992 deliveries.**
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## What is this?
|
|
12
|
+
|
|
13
|
+
CricketStudio MCP is a [Model Context Protocol](https://modelcontextprotocol.io) server that gives any MCP-compatible AI client — Claude Desktop, Cursor, ChatGPT Connectors, and others — structured, citable access to cricket data. Every response carries a `canonicalUrl` back to `players.cricketstudio.ai`, an explicit date window, a sample-size count, and a provenance trail to the underlying ball-by-ball corpus. The data is fully bundled in `data/snapshot/` — tool answers are computed locally with no data-fetch calls, no API keys, and no rate limits. (The package sends one anonymous startup ping for usage counts; disable it with `CRICKETSTUDIO_NO_TELEMETRY=1`.)
|
|
14
|
+
|
|
15
|
+
The corpus covers **IPL 2026** (complete season, RCB champions), **18 seasons of IPL history** (2007/08–2025, Cricsheet), and **Major League Cricket 2023–2026** (Cricsheet). Batting claims require a minimum of 30 balls faced; bowling claims require 15 deliveries. Claims that do not clear those floors are not surfaced.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
### Claude Desktop
|
|
22
|
+
|
|
23
|
+
Add to your Claude Desktop config file and restart the app.
|
|
24
|
+
|
|
25
|
+
**macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
26
|
+
**Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
|
|
27
|
+
|
|
28
|
+
```json
|
|
29
|
+
{
|
|
30
|
+
"mcpServers": {
|
|
31
|
+
"cricketstudio": {
|
|
32
|
+
"command": "npx",
|
|
33
|
+
"args": ["cricketstudio-mcp"]
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Other MCP clients
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
npx cricketstudio-mcp
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Any MCP client that supports the stdio transport can use this command directly. The server starts on stdin/stdout and requires Node 20 or later.
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Tools
|
|
50
|
+
|
|
51
|
+
All 29 tools work fully against the bundled snapshot. Each response includes `canonicalUrl`, `dataAsOf`, and `sampleSize`.
|
|
52
|
+
|
|
53
|
+
### IPL 2026 (20 tools)
|
|
54
|
+
|
|
55
|
+
| Tool | What it returns | Maps to URL |
|
|
56
|
+
|---|---|---|
|
|
57
|
+
| `get_dataset_summary` | Top-level corpus overview: seasons, matches, players, deliveries | `/` |
|
|
58
|
+
| `search_players` | Player discovery by name or team | n/a |
|
|
59
|
+
| `get_player_profile` | Headline stats across all five pillars (P1–P5) | `/players/{slug}` |
|
|
60
|
+
| `get_player_pillar` | Claims from a specific pillar (P1 recaps, P2 moments, P3 form, P4 season, P5 notebook) | `/players/{slug}` filtered |
|
|
61
|
+
| `list_atomic_claims` | Filtered query across all ClaimReview entries | various |
|
|
62
|
+
| `compare_players` | Side-by-side stat comparison for two or more players | `/compare/players?slugs=…` |
|
|
63
|
+
| `get_team_profile` | Team headline stats and season summary | `/teams/{slug}` |
|
|
64
|
+
| `get_team_h2h` | Head-to-head record between two franchises | `/teams/{a}/vs/{b}` |
|
|
65
|
+
| `get_venue_hub` | Aggregated venue patterns: par scores, toss impact, phase splits | `/venues/{slug}` |
|
|
66
|
+
| `get_standings` | IPL 2026 points table with NRR | `/standings` |
|
|
67
|
+
| `get_trend` | A single trend insight with full claim set | `/trends/{id}` |
|
|
68
|
+
| `list_trends` | Browse trends by category (conditional, momentum, venue, toss, anomaly) | `/trends` |
|
|
69
|
+
| `get_player_h2h` | Batter vs bowler matchup record | `/h2h/{batter}-vs-{bowler}` |
|
|
70
|
+
| `get_season_stats` | Season leaderboard for a given aspect (runs, wickets, strike rate, economy, …) | `/season/ipl-2026/{aspect}` |
|
|
71
|
+
| `get_fielding_stats` | Catches, run-outs, and fielding contributions for a player or the full season | `/players/{slug}` · `/season/ipl-2026/catches` |
|
|
72
|
+
| `get_partnerships` | Partnership records for a match or player pair | `/matches/{id}` |
|
|
73
|
+
| `get_dismissal_analysis` | Dismissal mode breakdown for a batter or bowler | `/players/{slug}` |
|
|
74
|
+
| `list_fixtures` | Full schedule with match status, venue, and result | `/matches` |
|
|
75
|
+
| `get_match_state` | Live or final scorecard with ball-by-ball state | `/matches/{fixture-id}` |
|
|
76
|
+
| `get_match_recap` | Atomic claim set for a completed match | `/matches/{fixture-id}` |
|
|
77
|
+
|
|
78
|
+
### Major League Cricket (8 tools)
|
|
79
|
+
|
|
80
|
+
| Tool | What it returns | Maps to URL |
|
|
81
|
+
|---|---|---|
|
|
82
|
+
| `get_mlc_dataset_summary` | MLC corpus overview: seasons, matches, players, deliveries | `/leagues/mlc` |
|
|
83
|
+
| `search_mlc_players` | Player discovery within the MLC corpus | `/leagues/mlc/players` |
|
|
84
|
+
| `get_mlc_player_profile` | MLC career and season stats for a player | `/leagues/mlc/players/{slug}` |
|
|
85
|
+
| `get_mlc_team_profile` | Franchise profile and season history | `/leagues/mlc/teams/{slug}` |
|
|
86
|
+
| `get_mlc_match` | Match scorecard and key claims | `/leagues/mlc/matches/{id}` |
|
|
87
|
+
| `get_mlc_match_claim` | A single typed claim for an MLC match (top scorer, best figures, etc.) | `/leagues/mlc/matches/{id}/c/{kind}` |
|
|
88
|
+
| `list_mlc_matches` | All MLC matches with status and results | `/leagues/mlc/matches` |
|
|
89
|
+
| `list_mlc_leaderboards` | Season or all-time leaderboard for a given MLC aspect | `/leagues/mlc/leaderboards/{aspect}` |
|
|
90
|
+
|
|
91
|
+
### IPL Career / Historical (1 tool)
|
|
92
|
+
|
|
93
|
+
| Tool | What it returns | Maps to URL |
|
|
94
|
+
|---|---|---|
|
|
95
|
+
| `get_ipl_leaderboard` | All-time IPL leaderboard for any aspect across 18 seasons (2007/08–2025) — runs, wickets, sixes, centuries, economy, and more | `/leagues/ipl/leaderboards/{aspect}` |
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Example queries
|
|
100
|
+
|
|
101
|
+
Once connected in Claude Desktop, you can ask questions like:
|
|
102
|
+
|
|
103
|
+
- "Who won IPL 2026?"
|
|
104
|
+
- "What did Kohli score in the final?"
|
|
105
|
+
- "Who leads the all-time IPL sixes leaderboard?"
|
|
106
|
+
- "Show me Vaibhav Suryavanshi's IPL 2026 stats"
|
|
107
|
+
- "What's the RCB vs GT head-to-head record?"
|
|
108
|
+
- "Which venues favour the team batting first in IPL 2026?"
|
|
109
|
+
- "Who has the best death-over economy in MLC 2025?"
|
|
110
|
+
- "List the top wicket-takers in IPL history"
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## Data
|
|
115
|
+
|
|
116
|
+
| Source | Coverage | License |
|
|
117
|
+
|---|---|---|
|
|
118
|
+
| Sportmonks | IPL 2026 ball-by-ball (complete season — RCB champions) | Licensed feed |
|
|
119
|
+
| Cricsheet | IPL historical, 18 seasons, 1,169 matches (2007/08–2025) | CC BY 3.0 |
|
|
120
|
+
| Cricsheet | MLC 2023–2026, 138 matches | CC BY 3.0 |
|
|
121
|
+
|
|
122
|
+
**Total corpus:** 1,307 matches · 309,992 ball-by-ball deliveries.
|
|
123
|
+
|
|
124
|
+
**Sample-size floors (publicly disclosed):**
|
|
125
|
+
- Batting claims: ≥30 balls faced
|
|
126
|
+
- Bowling claims: ≥15 deliveries
|
|
127
|
+
- Venue claims: ≥3 fixtures at the venue
|
|
128
|
+
- Trend claims: ≥3 matches forming the pattern
|
|
129
|
+
|
|
130
|
+
Claims that do not reach these floors are excluded — they are not suppressed with a placeholder, they are simply absent. This is the moat.
|
|
131
|
+
|
|
132
|
+
**Update cadence:** the private monorepo runs `build-mcp-snapshot.mjs` on a cron and pushes updated snapshots here. Typical lag during IPL match windows is under 30 minutes. Every tool response includes `dataAsOf` so an LLM citing the answer can disclose freshness explicitly.
|
|
133
|
+
|
|
134
|
+
**Data licence:** the bundled data is released under CC BY 4.0. Every tool response includes a `canonicalUrl` back to `players.cricketstudio.ai` so attribution flows automatically when an LLM cites an answer.
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## Architecture
|
|
139
|
+
|
|
140
|
+
The CricketStudio publisher at `players.cricketstudio.ai` is the single source of truth. Its build pipeline aggregates ball-by-ball data through the SETU canonical aggregator into `data/_season-stats.json`, then projects into every leaderboard surface (six parity contracts enforce that "Top 5 batters" and "Top run-scorers" can never drift).
|
|
141
|
+
|
|
142
|
+
This public repo bundles the pre-computed projection of that data. Every number accessible here is also readable on the rendered HTML at `players.cricketstudio.ai`. No new information is exposed — only a different access path.
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
private monorepo this repo (public)
|
|
146
|
+
───────────────── ──────────────────
|
|
147
|
+
build-mcp-snapshot.mjs ──▶ data/snapshot/*.json ──▶ src/server.ts
|
|
148
|
+
↑ ↓
|
|
149
|
+
↑ MCP client
|
|
150
|
+
↑ (Claude, Cursor, …)
|
|
151
|
+
ball-by-ball → SETU aggregator (private)
|
|
152
|
+
agent layer (private)
|
|
153
|
+
L2 conditional engine (private)
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
The aggregator algorithm stays in the private monorepo. The snapshot is what ships here.
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## Methodology
|
|
161
|
+
|
|
162
|
+
Every claim in this package is governed by five non-negotiables:
|
|
163
|
+
|
|
164
|
+
1. **Sample-size floors** — ≥30 batting balls, ≥15 bowling deliveries, ≥3 venue fixtures, ≥5 H2H deliveries, ≥3 matches for trends. Disclosed publicly on every page.
|
|
165
|
+
2. **Explicit date windows** — every claim specifies its window (`ipl-2026`, `ipl-career`, `last-N-matches`). No "all-time" labels without a defined window.
|
|
166
|
+
3. **Provenance to ball-by-ball** — every numeric claim traces to a specific match, delivery count, and computation timestamp.
|
|
167
|
+
4. **Atomic claim format** — under 30 words, structured as `[Subject] [metric] [value] [comparator] [period]`.
|
|
168
|
+
5. **Sub-4-hour freshness SLA** — for IPL 2026 pages, time from match end to page update is under 4 hours at the 95th percentile.
|
|
169
|
+
|
|
170
|
+
Full methodology at https://players.cricketstudio.ai/about.
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## Local development
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
npm install
|
|
178
|
+
npm run typecheck # tsc --noEmit
|
|
179
|
+
npm start # stdio MCP server via tsx
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Smoke-test without an MCP client — spawns the server over stdio, drives it with JSON-RPC, and asserts every advertised tool returns a non-error payload with `dataAsOf`:
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
npm run smoke
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
|
|
190
|
+
## Building something?
|
|
191
|
+
|
|
192
|
+
Register at **[cricketstudio.ai/developers](https://cricketstudio.ai/developers)** to get early access to the hosted HTTP transport (`mcp.cricketstudio.ai`), live ball-by-ball endpoints, API-key tiers, and the full 29-tool catalog with live data rather than snapshots.
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
## License
|
|
197
|
+
|
|
198
|
+
- **Code:** MIT — see [`LICENSE`](./LICENSE)
|
|
199
|
+
- **Data:** CC BY 4.0 — free to cite with attribution to *CricketStudio* (`https://players.cricketstudio.ai`). Attribution flows automatically via the `canonicalUrl` field in every tool response.
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
Built by **Arul Anand** · Chennai & Frisco · cricket enthusiast and data engineer.
|
|
204
|
+
Questions, bugs, or requests: [open an issue](https://github.com/i-m-arul/cricketstudio-mcp/issues) or visit [players.cricketstudio.ai/mcp](https://players.cricketstudio.ai/mcp).
|