nhl-stats-mcp
Provides tools for accessing live NHL data via the NHL public web API, including scores, standings, schedules, rosters, player stats and searches, team schedules, and league leaders.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@nhl-stats-mcp How are the Oilers doing, and how has McDavid played lately?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
nhl-stats-mcp
An MCP server that gives Claude (or any MCP-compatible AI assistant) live NHL data: scores, standings, schedules, rosters, player stats and league leaders.
No API key or sign-up needed. It uses the NHL's public web API.
You: How are the Oilers doing, and how has McDavid played in his last few games?
Claude: (calls
get_standingsandget_player_stats) Edmonton leads the Western Conference at 16-3-3 (35 pts) and has won five straight. McDavid leads the league with 53 points in 22 games, with 8 points over his last 5, including a 3-point night in Philadelphia…
Tools
Tool | What it does | Example question |
| Live and final scores with period, clock and shots, plus optional goal-by-goal summaries | "Who scored in the Oilers game last night?" |
| League, conference or division standings with points %, goal differential, L10 and streak | "Show me the Atlantic Division." |
| Bio, current season, career and last 5 games, for skaters and goalies. Accepts a name or an id | "How is Ullmark doing this year?" |
| Find players (active or retired) by name | "Which Hughes brothers are in the NHL?" |
| Upcoming games or recent results with W/L/OTL | "When do the Leafs play next?" |
| Current forwards, defense and goalies | "Who's on the Canucks' blue line?" |
| Leaders in points, goals, assists, +/-, PP/SH goals, PIM, TOI, faceoff %, wins, SV%, GAA and shutouts | "Who leads the league in save percentage?" |
Teams can be given as abbreviations, names or nicknames: TOR, Leafs, Toronto Maple Leafs and the Habs all work.
Related MCP server: NHL MCP Server
Install
Requires Node.js 20+.
Claude Code
claude mcp add nhl-stats -- npx -y nhl-stats-mcpClaude Desktop
Add this to claude_desktop_config.json (Settings → Developer → Edit Config) and restart Claude:
{
"mcpServers": {
"nhl-stats": {
"command": "npx",
"args": ["-y", "nhl-stats-mcp"]
}
}
}On Windows, Claude Desktop can't start npx directly (it's a .cmd script), so run it through cmd:
{
"mcpServers": {
"nhl-stats": {
"command": "cmd",
"args": ["/c", "npx", "-y", "nhl-stats-mcp"]
}
}
}From source
git clone https://github.com/bnocz/nhl-stats-mcp.git
cd nhl-stats-mcp
npm install
npm run build
claude mcp add nhl-stats -- node "$(pwd)/dist/index.js"Development
npm run build # compile TypeScript to dist/
npm test # unit + in-process MCP tests (no network)
npm run smoke # end-to-end: launches the server over stdio and calls every tool against the live API
npm run inspect # open the MCP Inspector UI to try tools by handProject layout
src/
index.ts entry point: starts the server on stdio
tools.ts tool definitions (zod input schemas + handlers)
nhl-client.ts typed HTTP client for the NHL API, with timeouts and error mapping
format.ts pure functions that turn raw API JSON into compact text
teams.ts the 32 clubs + fuzzy name resolution ("habs" -> MTL)
*.test.ts vitest suites
scripts/
smoke.mjs live end-to-end check using the official MCP clientDesign notes
Compact, model-friendly output. NHL API responses are 50–200 KB of JSON. Each tool returns 1–3 KB of formatted text (markdown tables for standings, one line per game), so answers stay fast and fit easily in context.
Errors are tool results, not crashes. Network failures, HTTP errors and bad input (an unknown team or a malformed date) come back as
isErrorresults with a readable message. The model can then recover, for example by retrying with a valid team.Forgiving input. Team nicknames, accent-insensitive player names ("Sturzle" matches "Stützle"), and name or id for players. When a name search is ambiguous, the result lists the other candidates.
Testable by construction. The HTTP client takes an injectable
fetch, and the formatters are pure functions. The test suite runs the real MCP server in-process over the SDK's in-memory transport, so the tests cover what a client actually sees, without touching the network.Read-only. Every tool sets
readOnlyHint, so clients can call them without extra confirmation.
Caveats
The NHL web API is public but unofficial and undocumented, so endpoints can change without notice. Times are shown in US Eastern.
Roadmap
MLB support via
statsapi.mlb.com(same tool shapes,sportparameter)Playoff bracket tool
Game box score / play-by-play tool
Response caching for frequently repeated calls
License
MIT
Available Tools
7 toolsget_league_leadersNHL league leadersBRead-only
Get the current season's NHL leaders in a stat category. Skater categories: points (Points), goals (Goals), assists (Assists), plusMinus (Plus/minus), goalsPp (Power-play goals), goalsSh (Shorthanded goals), penaltyMins (Penalty minutes), toi (Time on ice per game), faceoffLeaders (Faceoff win %). Goalie categories: wins (Wins), savePctg (Save %), goalsAgainstAverage (Goals-against average), shutouts (Shutouts).
Inputs: limit, category.
get_player_statsNHL player statsARead-only
Get a player's profile, current-season and career regular-season stats, and their last 5 games. Accepts a player name (e.g. "McDavid") or a numeric NHL player id. Works for skaters and goalies.
Inputs: player (required).
get_scoresNHL scoresARead-only
Get NHL games for a date: live scores with period and clock, final scores, or start times for upcoming games. Set include_goals to list every goal with scorer, assists and strength.
Inputs: date, include_goals.
get_standingsNHL standingsARead-only
Get NHL standings (W-L-OTL, points, point %, goal differential, last 10, streak), grouped league-wide, by conference or by division.
Inputs: date, group.
get_team_rosterNHL team rosterARead-only
Get a team's current roster: forwards, defensemen and goalies with numbers, positions and player ids.
Inputs: team (required).
get_team_scheduleNHL team scheduleARead-only
Get a team's upcoming games (with start times) or recent results (W/L and score) for the current season.
Inputs: team (required), mode, count.
search_playersSearch NHL playersARead-only
Find NHL players (current and retired) by name. Returns player ids, positions and teams. Use this when a name is ambiguous before calling get_player_stats.
Inputs: name (required), active_only.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool targets a distinct resource: rosters, daily scores, standings, player search, player stats, team schedule and league leaders. The only mild overlap is between get_scores (league-wide by date, including finals) and get_team_schedule (a single team's recent results), but the descriptions make the date-vs-team distinction workable.
All names use snake_case verb_noun form (get_team_roster, get_scores, search_players) with no case or style mixing. The single 'search_' prefix is semantically justified and does not break the pattern.
Seven tools is well within the ideal 3-15 range and each covers a distinct facet of NHL data (teams, players, games, standings, leaders). No tool feels redundant or like padding.
The surface covers the core lifecycle: discover a player (search_players), drill into stats (get_player_stats), browse teams, rosters, schedules, scores, standings and leaders. Minor gaps exist for team-level stats, head-to-head comparisons and historical season queries, but agents can work around most of these.
Maintenance
Related MCP Connectors
NHL and PWHL stats, play-by-play, expected goals and odds. REST API and MCP server. Free to start.
NBA, NFL, NHL and combined sports scores as agent tools.
Live sports stats and pre-computed analysis for AI assistants across NBA, MLB, NFL, and NHL.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides access to live NHL game data, team and player statistics, standings, schedules, playoff information, and head-to-head comparisons through natural language queries using official NHL APIs.MIT
- AlicenseAqualityDmaintenanceProvides access to live NHL game data, player and team statistics, standings, schedules, playoff brackets, and historical comparisons through natural language queries using the official NHL API.11MIT
- AlicenseAqualityDmaintenanceEnables access to live ESPN sports data for NFL, NHL, and NBA leagues, including standings, scores, schedules, team info, and playoffs through natural language queries.626 npm1MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to look up Swedish ice-hockey data from stats.swehockey.se — schedules & results, standings, team rosters, and season-total scoring & goalie stats.-