Skip to content

argotdev/nba-mcp-ts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NBA MCP Server

A Model Context Protocol (MCP) server that provides access to live and historical NBA data. Query game scores, player statistics, team standings, and historical performance data.

Features

  • Live Game Data: Get real-time scores and game status for today's games
  • Historical Games: Query games by specific date
  • Player Statistics: Current season stats including points, rebounds, assists, and more
  • Team Standings: Current NBA team standings with wins, losses, and rankings
  • Historical Data: Access player and team statistics from previous seasons
  • Team Analytics: Advanced team metrics and performance data

Installation

npm install
npm run build

Usage

As an MCP Server

Add this server to your MCP client configuration. For Claude Desktop, add to your config file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "nba": {
      "command": "node",
      "args": ["/absolute/path/to/nba-mcp-ts/build/index.js"]
    }
  }
}

Available Tools

1. get_todays_games

Get today's NBA games with live scores and game status.

Parameters: None

Example:

Get today's NBA games

2. get_games_by_date

Get NBA games for a specific date.

Parameters:

  • date (string, required): Date in YYYY-MM-DD format

Example:

Get NBA games from 2024-10-13

3. get_player_stats

Get current season player statistics.

Parameters:

  • playerName (string, optional): Filter by player name
  • limit (number, optional): Max number of players to return (default: 50)

Examples:

Get stats for LeBron James
Get top 20 player stats

4. get_team_standings

Get current NBA team standings.

Parameters: None

Example:

Show me the current NBA standings

5. get_historical_player_stats

Get historical player statistics for a specific season.

Parameters:

  • playerId (string, required): NBA player ID
  • season (string, required): Season in YYYY-YY format

Example:

Get LeBron James stats from 2020-21 season

6. get_team_stats

Get team statistics for a specific season.

Parameters:

  • season (string, optional): Season in YYYY-YY format (default: current season)

Example:

Get team stats for 2023-24 season

Development

# Watch mode for development
npm run watch

# Build
npm run build

Data Source

This server uses the official NBA Stats API to fetch data. The API provides comprehensive statistics and game information for all NBA games and players.

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published