College Football Data MCP server

Integrates with College Football Data API to provide natural language querying of game results, team records, player stats, rankings, and advanced metrics.
Back to servers
Setup instructions
Provider
Chris Leonard
Release date
Dec 20, 2024
Language
Python
Stats
15 stars

This MCP server implementation provides access to comprehensive college football statistics through the College Football Data API V2, allowing AI assistants to query and analyze college football data using natural language requests.

Prerequisites

Installation Options

Via Smithery

The simplest installation method is using Smithery:

npx -y @smithery/cli install cfbd --client claude

Manual Installation

  1. Clone the repository:
git clone https://github.com/yourusername/cfbd-mcp-server
cd cfbd-mcp-server
  1. Create and activate a virtual environment:
uv venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
  1. Install dependencies:
uv pip install -e .
  1. Create a .env file in the project root with your API key:
CFB_API_KEY=your_api_key_here

Usage

Running the Server

Start the MCP server with:

uv run cfbd-mcp-server

Connecting with Claude Desktop

  1. Locate your Claude Desktop configuration file:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
  2. Add the server configuration:

{
    "mcpServers": {
        "cfbd-mcp-server": {
            "command": "uv",
            "args": [
                "--directory",
                "/full/path/to/cfbd-mcp-server",
                "run",
                "cfbd-mcp-server"
            ],
            "env": {
                "CFB_API_KEY": "xxx",
                "PATH": "/full/path/to/python"
            }
        }
    }
}
  1. Close and restart Claude Desktop

If successfully installed, clicking the plus sign in the lower left corner of the text box will show "Add from cfbd-mcp-server" as a menu option.

Updating After Installation

  1. Download the updated files:
cd cfbd-mcp-server
git pull
  1. Uninstall the existing package:
uv pip uninstall cfbd-mcp-server
  1. Delete existing build artifacts and metadata:

Windows:

rmdir /s /q build dist
del /s /q *.egg-info

macOS:

rm -rf build dist *.egg-info
  1. Install the revised package:
uv pip install -e .
uv sync --dev --all-extras
  1. Start the server:
uv run cfbd-mcp-server
  1. Close and restart Claude Desktop

Available Features

Resources

The server provides access to various data through schemas:

  • Game information and scores
  • Team season records
  • Detailed team game data
  • Play-by-play information
  • Drive summaries and results
  • Individual play statistics
  • Team rankings across polls
  • Pregame win probabilities
  • Advanced box score statistics

Tools

Query endpoints directly with tools like:

  • get-games - Retrieve game data
  • get-records - Get team records
  • get-games-teams - Access team game statistics
  • get-plays - Query play-by-play data
  • get-drives - Analyze drive information
  • get-play-stats - View play statistics
  • get-rankings - Check team rankings
  • get-pregame-win-probability - See win probabilities
  • get-advanced-box-score - Access detailed game statistics

Prompts

Pre-built analysis templates:

  • analyze-game - Get detailed analysis of a specific game
  • analyze-team - Comprehensive single team analysis
  • analyze-trends - Analyze trends over a season
  • compare-teams - Compare performance of two teams
  • analyze-rivalry - Analyze historical rivalry matchups

API Limits

The College Football Data API has rate limiting:

  • Free tier: Limited requests per minute
  • CFBD Patreon subscribers get higher rate limits
  • Use efficient querying patterns to avoid hitting limits

Troubleshooting

Common Issues

  1. API Key Errors

    • Verify your API key is correctly set in both the .env and claude_desktop_config.json files
    • Check that the key is valid
  2. Rate Limiting

    • Space out requests when possible
    • Consider a Patreon subscription for higher limits
  3. Connection Issues

    • Verify internet connectivity
    • Check the API status at collegefootballdata.com

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "cfbd-mcp-server" '{"command":"uv","args":["--directory","/full/path/to/cfbd-mcp-server","run","cfbd-mcp-server"],"env":{"CFB_API_KEY":"xxx","PATH":"/full/path/to/python"}}'

See the official Claude Code MCP documentation for more details.

For 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 > Tools & Integrations and click "New MCP Server".

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

{
    "mcpServers": {
        "cfbd-mcp-server": {
            "command": "uv",
            "args": [
                "--directory",
                "/full/path/to/cfbd-mcp-server",
                "run",
                "cfbd-mcp-server"
            ],
            "env": {
                "CFB_API_KEY": "xxx",
                "PATH": "/full/path/to/python"
            }
        }
    }
}

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 explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "cfbd-mcp-server": {
            "command": "uv",
            "args": [
                "--directory",
                "/full/path/to/cfbd-mcp-server",
                "run",
                "cfbd-mcp-server"
            ],
            "env": {
                "CFB_API_KEY": "xxx",
                "PATH": "/full/path/to/python"
            }
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

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