mcp-sports-server


Namemcp-sports-server JSON
Version 1.0.2 PyPI version JSON
download
home_pageNone
SummaryModel Context Protocol SDK for real-time sports stats. Requires an API key from SportsRadar
upload_time2025-01-12 18:05:41
maintainerNone
docs_urlNone
authorRobert Oxley
requires_python>=3.10
licenseMIT
keywords automation llm mcp sports stats
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Sports MCP Server
[![MIT licensed][mit-badge]][mit-url]
[![Python Version][python-badge]][python-url]
[![PyPI version][pypi-badge]][pypi-url]

[mit-badge]: https://img.shields.io/pypi/l/mcp.svg
[mit-url]: https://github.com/reeeeemo/mcp-sports/blob/main/LICENSE
[python-badge]: https://img.shields.io/pypi/pyversions/mcp.svg
[python-url]: https://www.python.org/downloads/
[pypi-badge]: https://badge.fury.io/py/mcp-sports-server.svg
[pypi-url]: https://pypi.org/project/mcp-sports-server


<strong>Built on top of the [Model Context Protocol Python SDK](https://modelcontextprotocol.io)</strong>

## Overview
Python server implementing Model Context Protocol (MCP) for interactability with real-time sports stats via [**SportRadar**](https://sportradar.com/)

## Supported Sports
- NFL

**Note:** Please check **Development** for adding more sport support

## Features
- Get game, league and player stats
- Get team rosters and schedules
- Get tournament info and player transactions

**Note:** The server will need an API key from SportRadar. [Here is the instruction link](https://developer.sportradar.com/football/docs/football-ig-account-setup)

## Resources
- `sports://seasonsched/{_cache}`: Season schedule cache
- `sports://leaguetransactions/{_cache}`: League transactions cache / parser
- `sports://gamestats/{_cache}`: Game stats cache
- `sports://leaguestats/{_cache}`: League stats cache
- `sports://teamstats/{_cache}`: Team stats cache
- `sports://playerstats/{_cache}`: Player stats cache

## Tools

- **update_api_config**
    - Update SportRadar's API configuration settings 
    - Args
        - language (str)
        - access_level (str) -> trial or production api key
        - format (str) -> data return format (JSON or XML)
- **get_schedule**
    - Gets a specific week schedule for the sport given
    - Args
        - sport (str) 
        - week (int)
        - type (str) -> type of season (PRE, REG, PST)
        - year (int)
- **get_daily_transactions**
    - Gets info on transactions done in sports teams throughout the year
    - Args
        - year (int)
        - month (int)
        - day (int)
        - sport (str)
- **get_game_stats**
    - Gets statistical info on a specific sports game using it's ID
    - Args
        - game_id (str)
        - sport (str)
- **get_league_info**
    - Gets top-level info about each team in the sport provided
    - Args
        - sport (str)
- **get_team_roster**
    - Gets franchise team info + complete roster of players in the sport provided
    - Args
        - team_id (str)
        - sport (str)
- **get_tournament_list**
    - Gets lists of tournaments that are happening for the sport in that year
    - Args
        - sport (str)
        - year (int)
- **get_tournament_info**
    - Gets information of a tournament that is happening for the sport
    - Args
        - tournament_id (str)
        - sport (str)
- **get_player_stats**
    - Gets top-level info about each player in the sport provided
    - Args
        - sport (str)
        - player_id (str)
- **get_address**
    - When given coordinates (lat and lon), find the address
    - Args
        - lat (float)
        - lon (float)


## Usage with Claude Desktop

### Installing Manually
1. First, install the package:
```pip install mcp-sports-server```


2. Add this to your `claude_desktop_config.json` 

```json
{
  "mcpServers": {
     "sports": {
       "command": "mcp-sports-server",
       "args": ["--api-key", "your_api_key"]
     }
  }
}
```
## Development
As currently there is only NFL support. If there is enough interest more sports will be added.

If you want to create your own sport support, you can fork this repo and either make your own MCP server, or push changes to this current server.

Most of the code inside has DOCTYPE comments about how to add a new sport, essentially to add a new sport:
1. Create a new Sport inside of `sportsclasses.py`
2. Update MCP Resources *(more specifically the `parser_map` to include your sport parsing function)*
3. Update MCP Tools as needed *(you will need to update the Annotated parameters in tools)*
## License

This project is licensed under the MIT License - see the LICENSE file for details.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "mcp-sports-server",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "Robert Oxley <robert@oxley.ca>",
    "keywords": "automation, llm, mcp, sports, stats",
    "author": "Robert Oxley",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/e7/f6/e2cd8bee1c480e5f5db7fde0e65f7db875ee071da3b22b31515c69cfa83c/mcp_sports_server-1.0.2.tar.gz",
    "platform": null,
    "description": "# Sports MCP Server\n[![MIT licensed][mit-badge]][mit-url]\n[![Python Version][python-badge]][python-url]\n[![PyPI version][pypi-badge]][pypi-url]\n\n[mit-badge]: https://img.shields.io/pypi/l/mcp.svg\n[mit-url]: https://github.com/reeeeemo/mcp-sports/blob/main/LICENSE\n[python-badge]: https://img.shields.io/pypi/pyversions/mcp.svg\n[python-url]: https://www.python.org/downloads/\n[pypi-badge]: https://badge.fury.io/py/mcp-sports-server.svg\n[pypi-url]: https://pypi.org/project/mcp-sports-server\n\n\n<strong>Built on top of the [Model Context Protocol Python SDK](https://modelcontextprotocol.io)</strong>\n\n## Overview\nPython server implementing Model Context Protocol (MCP) for interactability with real-time sports stats via [**SportRadar**](https://sportradar.com/)\n\n## Supported Sports\n- NFL\n\n**Note:** Please check **Development** for adding more sport support\n\n## Features\n- Get game, league and player stats\n- Get team rosters and schedules\n- Get tournament info and player transactions\n\n**Note:** The server will need an API key from SportRadar. [Here is the instruction link](https://developer.sportradar.com/football/docs/football-ig-account-setup)\n\n## Resources\n- `sports://seasonsched/{_cache}`: Season schedule cache\n- `sports://leaguetransactions/{_cache}`: League transactions cache / parser\n- `sports://gamestats/{_cache}`: Game stats cache\n- `sports://leaguestats/{_cache}`: League stats cache\n- `sports://teamstats/{_cache}`: Team stats cache\n- `sports://playerstats/{_cache}`: Player stats cache\n\n## Tools\n\n- **update_api_config**\n    - Update SportRadar's API configuration settings \n    - Args\n        - language (str)\n        - access_level (str) -> trial or production api key\n        - format (str) -> data return format (JSON or XML)\n- **get_schedule**\n    - Gets a specific week schedule for the sport given\n    - Args\n        - sport (str) \n        - week (int)\n        - type (str) -> type of season (PRE, REG, PST)\n        - year (int)\n- **get_daily_transactions**\n    - Gets info on transactions done in sports teams throughout the year\n    - Args\n        - year (int)\n        - month (int)\n        - day (int)\n        - sport (str)\n- **get_game_stats**\n    - Gets statistical info on a specific sports game using it's ID\n    - Args\n        - game_id (str)\n        - sport (str)\n- **get_league_info**\n    - Gets top-level info about each team in the sport provided\n    - Args\n        - sport (str)\n- **get_team_roster**\n    - Gets franchise team info + complete roster of players in the sport provided\n    - Args\n        - team_id (str)\n        - sport (str)\n- **get_tournament_list**\n    - Gets lists of tournaments that are happening for the sport in that year\n    - Args\n        - sport (str)\n        - year (int)\n- **get_tournament_info**\n    - Gets information of a tournament that is happening for the sport\n    - Args\n        - tournament_id (str)\n        - sport (str)\n- **get_player_stats**\n    - Gets top-level info about each player in the sport provided\n    - Args\n        - sport (str)\n        - player_id (str)\n- **get_address**\n    - When given coordinates (lat and lon), find the address\n    - Args\n        - lat (float)\n        - lon (float)\n\n\n## Usage with Claude Desktop\n\n### Installing Manually\n1. First, install the package:\n```pip install mcp-sports-server```\n\n\n2. Add this to your `claude_desktop_config.json` \n\n```json\n{\n  \"mcpServers\": {\n     \"sports\": {\n       \"command\": \"mcp-sports-server\",\n       \"args\": [\"--api-key\", \"your_api_key\"]\n     }\n  }\n}\n```\n## Development\nAs currently there is only NFL support. If there is enough interest more sports will be added.\n\nIf you want to create your own sport support, you can fork this repo and either make your own MCP server, or push changes to this current server.\n\nMost of the code inside has DOCTYPE comments about how to add a new sport, essentially to add a new sport:\n1. Create a new Sport inside of `sportsclasses.py`\n2. Update MCP Resources *(more specifically the `parser_map` to include your sport parsing function)*\n3. Update MCP Tools as needed *(you will need to update the Annotated parameters in tools)*\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Model Context Protocol SDK for real-time sports stats. Requires an API key from SportsRadar",
    "version": "1.0.2",
    "project_urls": {
        "Repository": "https://github.com/reeeeemo/mcp-sports.git"
    },
    "split_keywords": [
        "automation",
        " llm",
        " mcp",
        " sports",
        " stats"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c1d6d276871efeb920649949aa98d1d2048709c503b2ea0a1515e8a294e4bee0",
                "md5": "1787c8661ef7dde2181254feb670dd4a",
                "sha256": "eaf9704133b9a60731b4f2364fd29530dfa22406b00ed28aecc6cd1219c1f068"
            },
            "downloads": -1,
            "filename": "mcp_sports_server-1.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1787c8661ef7dde2181254feb670dd4a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 8894,
            "upload_time": "2025-01-12T18:05:38",
            "upload_time_iso_8601": "2025-01-12T18:05:38.106821Z",
            "url": "https://files.pythonhosted.org/packages/c1/d6/d276871efeb920649949aa98d1d2048709c503b2ea0a1515e8a294e4bee0/mcp_sports_server-1.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e7f6e2cd8bee1c480e5f5db7fde0e65f7db875ee071da3b22b31515c69cfa83c",
                "md5": "273a86bde354e032a0303ae8a7d1f348",
                "sha256": "71e6587cb31f64d6bead9682e121b08ad38e2a850e1a14cb104c266fbba78361"
            },
            "downloads": -1,
            "filename": "mcp_sports_server-1.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "273a86bde354e032a0303ae8a7d1f348",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 29911,
            "upload_time": "2025-01-12T18:05:41",
            "upload_time_iso_8601": "2025-01-12T18:05:41.214151Z",
            "url": "https://files.pythonhosted.org/packages/e7/f6/e2cd8bee1c480e5f5db7fde0e65f7db875ee071da3b22b31515c69cfa83c/mcp_sports_server-1.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-12 18:05:41",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "reeeeemo",
    "github_project": "mcp-sports",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "mcp-sports-server"
}
        
Elapsed time: 0.42221s