NHL Stats MCP server

Provides real-time NHL sports data retrieval by bridging official web and stats APIs, enabling comprehensive access to team standings, player statistics, game schedules, and roster information through a flexible, multi-endpoint TypeScript implementation.
Back to servers
Provider
Dylan Groos
Release date
Mar 10, 2025
Language
TypeScript
Stats
4 stars

This TypeScript implementation of the NHL API uses the Model-Context Protocol pattern to provide structured access to NHL data, including teams, players, standings, schedules, and statistics through a clean interface to the NHL's official APIs.

Getting Started

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/nhl-mcp.git
    cd nhl-mcp
    
  2. Install dependencies:

    npm install
    
  3. Configure API credentials:

    cp .env.example .env
    # Edit .env with your API keys
    
  4. Start the development server:

    npm run dev
    

API Reference

The NHL-MCP server provides access to NHL data through several core endpoints:

Teams

  • get-team: Retrieves basic team information
  • get-team-roster: Gets current team roster
  • get-team-stats: Gets team statistics
  • get-team-prospects: Gets team prospect information

Players

  • get-player-landing: Gets detailed player information

Standings

  • get-current-standings: Gets current NHL standings with division breakdowns and complete team record information

Schedule

  • get-schedule: Gets general schedule information
  • get-current-schedule: Gets a team's upcoming schedule
  • get-date-schedule: Gets schedule for a specific date

Statistics

  • get-current-stat-leaders: Gets current statistical leaders
  • get-current-goalie-leaders: Gets current goalie statistical leaders

Games

  • get-scores-now: Gets current scores and game states

Available Features

Standings

  • League-wide standings with division breakdowns
  • Complete team record information

Teams

  • Basic team identity information
  • Current roster information with player details
  • Team statistics (skaters and goalies)
  • Prospect tracking

Players

  • Player biographical information
  • Current season and career statistics
  • Award recognition

Schedules

  • Current team schedules
  • Date-specific league schedules
  • Upcoming game information

Statistics

  • Current statistical leaders (skaters and goalies)
  • Team-specific statistical breakdowns

Game Information

  • Live game scores and status
  • Game schedules

Known Limitations

  • Team division and conference information missing in team lookup
  • Basic team data incomplete (city/location details absent)
  • Limited game state information for in-progress games
  • Play-by-play data implementation needs further testing
  • Some historical data functionality requires additional verification

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later