Skip to main content
Glama
smw355

NFL Data MCP Server

by smw355
README.md
# NFL Data MCP Server

A Model Context Protocol (MCP) server that provides access to NFL player performance data from 2015-2024.

## Features

- **Player Statistics**: Get detailed season stats for any player by name and position
- **Player Comparison**: Compare statistics between multiple players
- **Position Leaders**: Find top performers at each position for specific metrics
- **Player Search**: Search for players by name pattern across all positions

## Installation

```bash
npm install
npm run build
```

## Usage

### As an MCP Server

Add to your MCP client configuration:

```json
{
  "mcpServers": {
    "nfl-data": {
      "command": "node",
      "args": ["/path/to/nfl-data-mcp-server/build/index.js"]
    }
  }
}
```

### Available Tools

1. **get_player_stats**
   - Get season statistics for a specific player
   - Parameters: `player_name`, `position`, `year` (optional, defaults to 2024)

2. **compare_players**
   - Compare statistics between multiple players
   - Parameters: `players` (array), `year` (optional), `metrics` (optional)

3. **get_position_leaders**
   - Get top performers at a position for specific metrics
   - Parameters: `position`, `metric`, `year` (optional), `limit` (optional, defaults to 10)

4. **search_players**
   - Search for players by name pattern
   - Parameters: `name_pattern`, `year` (optional)

### Supported Positions

- QB (Quarterbacks)
- RB (Running Backs)
- WR (Wide Receivers)
- TE (Tight Ends)
- DB (Defensive Backs)
- LB (Linebackers)
- DL (Defensive Linemen)
- K (Kickers)

### Data Source

Data is fetched from the [NFL-Data repository](https://github.com/hvpkod/NFL-Data/tree/main/NFL-data-Players) which contains player statistics from 2015-2024.

## Development

```bash
npm run dev  # Run in development mode
npm run build  # Build for production
```

TDQS

B3.2/5.0

Scored across 4 tools

Disambiguation4/5

Each tool targets a distinct purpose: getting a player's stats, comparing players, retrieving position leaders, and searching players by name. There's slight overlap between get_player_stats and compare_players since both retrieve player statistics, but the former is single-player while the latter is multi-player, making them mostly distinguishable.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern: get_player_stats, compare_players, get_position_leaders, search_players. Each uses a clear action verb (get, compare, search) followed by the object (player_stats, players, position_leaders, players). This is highly predictable and consistent.

Tool Count4/5

With 4 tools, the count is well within the appropriate range for a focused data retrieval server. Each tool services a distinct query pattern (individual lookups, comparisons, positional rankings, and searching). The count feels slightly lean but reasonable for a data-only server with no write operations.

Completeness3/5

The set covers core statistical queries: individual stats, comparison, position rankings, and discovery. However, there are notable gaps such as team-level stats, game-level data, week-by-week breakdowns, and season/league overviews that a comprehensive NFL data server might be expected to provide. An agent could often work around these gaps, so they're moderate rather than severe.

Maintenance

ActivityInactive
ResponsivenessNo issues