NHL MCP Server
Provides 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.
README
NHL MCP Server (Python)
A Model Context Protocol (MCP) server that provides access to NHL live data and statistics through natural language queries. This is an idiomatic Python implementation of the NHL MCP server.
Features
- Live Game Data: Get real-time scores, game status, and schedules
- Team Statistics: Access comprehensive team performance data
- Player Statistics: Query top players by various categories (points, goals, assists, etc.)
- Goalie Statistics: Specialized goalie metrics including save percentage and GAA
- Standings: Current NHL standings with filtering by division or conference
- Head-to-Head Comparisons: Compare teams and analyze matchup history
- Streak Analysis: Track team winning/losing streaks
- Season Comparisons: Compare statistics across multiple NHL seasons
- Playoff Data: Access playoff brackets and series information
Installation
From Source
- Clone this repository
- Install dependencies:
cd nhl-mcp-python
pip install -e .
Using pip (once published)
pip install nhl-mcp-server
Usage
Running the Server
The server communicates via stdio and is designed to be used with MCP clients:
python -m nhl_mcp.server
Or if installed via pip:
nhl-mcp-server
Configuration
Add to your MCP client configuration (e.g., Claude Desktop):
{
"mcpServers": {
"nhl": {
"command": "python",
"args": ["-m", "nhl_mcp.server"]
}
}
}
Or if using a virtual environment:
{
"mcpServers": {
"nhl": {
"command": "/path/to/venv/bin/python",
"args": ["-m", "nhl_mcp.server"]
}
}
}
Available Tools
get_live_games
Get live NHL game scores and status for today or a specific date.
Parameters:
date(optional): Date in YYYY-MM-DD format
Example:
Get today's NHL scores
Show me games on 2024-03-15
get_game_details
Get detailed information about a specific game including play-by-play data.
Parameters:
gameId(required): The NHL game ID
Example:
Get details for game 2024020123
get_standings
Get current NHL standings with optional filtering.
Parameters:
date(optional): Date in YYYY-MM-DD formatdivision(optional): Atlantic, Metropolitan, Central, or Pacificconference(optional): Eastern or Western
Example:
Show me the Atlantic division standings
Get Eastern conference standings
get_team_stats
Get detailed statistics for a specific NHL team.
Parameters:
teamAbbrev(required): Team abbreviation (e.g., TOR, NYR, BOS)season(optional): Season in format YYYYYYYY (e.g., 20242025)
Example:
Get Toronto Maple Leafs stats
Show me Boston Bruins statistics
get_player_stats
Get statistics for top NHL players.
Parameters:
category(optional): points, goals, assists, plusMinus, shots, shootingPctglimit(optional): Number of players to return (default: 20)season(optional): Season in format YYYYYYYY
Example:
Show me top goal scorers
Get top 10 players by points
get_goalie_stats
Get statistics for NHL goalies.
Parameters:
limit(optional): Number of goalies to return (default: 20)season(optional): Season in format YYYYYYYY
Example:
Show me top goalies
Get top 15 goalies by save percentage
get_schedule
Get NHL schedule for upcoming games.
Parameters:
date(optional): Date in YYYY-MM-DD formatteamAbbrev(optional): Team abbreviation for specific team schedule
Example:
Show me the Maple Leafs schedule
Get NHL schedule for next week
get_playoff_bracket
Get current playoff bracket information.
Parameters:
season(optional): Season year (e.g., 2024)
Example:
Show me the current playoff bracket
Get 2024 playoff bracket
compare_teams
Compare head-to-head statistics between two teams.
Parameters:
team1(required): First team abbreviationteam2(required): Second team abbreviationseason(optional): Season in format YYYYYYYY
Example:
Compare Toronto and Montreal
Show me Bruins vs Rangers head to head
get_team_streak
Get current winning or losing streak for a team.
Parameters:
teamAbbrev(required): Team abbreviation
Example:
What's the Maple Leafs current streak?
Show me Boston's win/loss streak
compare_seasons
Compare statistics across multiple NHL seasons.
Parameters:
seasons(required): Array of seasons to compareteamAbbrev(optional): Team abbreviation for team-specific comparison
Example:
Compare the 2023-24 and 2024-25 seasons for Toronto
Compare league stats between 20232024 and 20242025
Team Abbreviations
Common NHL team abbreviations:
- Atlantic: TOR (Toronto), BOS (Boston), MTL (Montreal), TBL (Tampa Bay), FLA (Florida), OTT (Ottawa), DET (Detroit), BUF (Buffalo)
- Metropolitan: NYR (Rangers), NYI (Islanders), CAR (Carolina), NJD (New Jersey), PHI (Philadelphia), PIT (Pittsburgh), WSH (Washington), CBJ (Columbus)
- Central: COL (Colorado), DAL (Dallas), MIN (Minnesota), WPG (Winnipeg), NSH (Nashville), STL (St. Louis), ARI (Arizona), CHI (Chicago)
- Pacific: VGK (Vegas), EDM (Edmonton), LAK (Los Angeles), SEA (Seattle), CGY (Calgary), VAN (Vancouver), SJS (San Jose), ANA (Anaheim)
API Data Sources
This server interfaces with the official NHL APIs:
api-web.nhle.com- Primary data source for games, standings, and schedulesapi.nhle.com/stats/rest- Statistics and player data
Development
Requirements
- Python 3.10 or higher
- Dependencies listed in
requirements.txt
Project Structure
nhl-mcp-python/
├── src/
│ └── nhl_mcp/
│ ├── __init__.py
│ ├── __main__.py
│ ├── server.py # Main MCP server implementation
│ └── nhl_api.py # NHL API client with type models
├── pyproject.toml
├── requirements.txt
└── README.md
Code Style
This implementation follows Python best practices:
- Type hints throughout using Python 3.10+ syntax
- Pydantic models for data validation
- Async/await for all I/O operations
- Snake_case naming conventions
- Comprehensive docstrings
Testing
# Install development dependencies
pip install -e ".[dev]"
# Run tests (if you add them)
pytest
License
MIT
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。