home / mcp / mlb v3 projections mcp server

MLB V3 Projections MCP Server

MCP Server generated by mcp.ag2.ai

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "ag2-mcp-servers-mlb-v3-projections": {
      "command": "python",
      "args": [
        "mcp_server/main.py",
        "stdio"
      ],
      "env": {
        "CONFIG": "JSON_CONFIG_STRING",
        "SECURITY": "YOUR_API_KEY",
        "CONFIG_PATH": "path/to/mcp_config.json"
      }
    }
  }
}

You run an MCP Server to expose the MLB projections data from the SportsData MLB v3 API. This server lets MCP clients query and interact with the projection data through a standardized interface, enabling seamless integration with your tooling and pipelines.

How to use

Start the server in standard input/output mode and connect your MCP client to it. You will run it locally and provide optional configuration through environment variables. Once started, your MCP client can request projections data and related endpoints exposed by the server.

How to install

Prerequisites include Python 3.9+ and a Python environment with pip and uv available.

# Step 1: Clone the server repository
git clone <repository-url>
cd mcp_server

# Step 2: Install development dependencies
# If you are using a dev container, dependencies are installed via the contained setup
pip install -e ".[dev]"

# Alternative: install via uvx if you prefer
uv pip install --editable ".[dev]"

Additional notes

To run the server in stdio mode, use the following command. It starts the MCP server and listens for input/output through standard streams.

python mcp_server/main.py stdio

Configuration and security

You can configure the server using environment variables when starting it. The primary options are to point to a JSON configuration file or supply a JSON string. You can also set security parameters such as API keys.

Run-time configuration options

Environment variables to consider.

CONFIG_PATH=/path/to/mcp_config.json
CONFIG='{"name":"mlb_v3_proj","transport":"stdio"}'
SECURITY=KEY=YOUR_API_KEY

Available tools

linting

Uses ruff to lint and format code, ensuring consistency across the project.

static analysis

Runs mypy, bandit, and semgrep to perform type checks and security analysis.

testing

Executes tests with pytest and generates a coverage report to gauge test coverage.