home / mcp / mlb v3 scores mcp server

Mlb V3 Scores 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-scores": {
      "command": "python",
      "args": [
        "mcp_server/main.py",
        "stdio"
      ],
      "env": {
        "CONFIG": "A JSON string containing the configuration",
        "SECURITY": "Environment variables for security parameters (e.g., API keys)",
        "CONFIG_PATH": "Path to a JSON configuration file (e.g., mcp_server/mcp_config.json)"
      }
    }
  }
}

You run an MCP server to expose a structured context-enabled API for MLB scores data from sportsdata.io mlb-v3-scores. This server lets MCP clients connect using a standard transport and query the underlying data through the predefined OpenAPI-backed interface, enabling reliable, context-aware interactions with the data source.

How to use

To use this MCP server, start it in stdio mode and connect your MCP client through the standard input/output channels. The server is controlled from the command line and reads its configuration from environment variables if you provide them.

Recommended transport: stdio. Start the server and then drive your MCP client against the running process. You can also configure security and runtime behavior via environment variables if you need to customize the startup.

How to install

Prerequisites are Python 3.9 or newer, and you need pip and uv installed to run optional or development workflows.

Step 1. Clone the repository and navigate into the project directory.

git clone <repository-url>
cd mcp-server

Step 2. Install dependencies for development and local testing. If you are using a development container, the setup script handles this for you. Otherwise, install with pip.

pip install -e ".[dev]"

If you prefer to use uv to manage the environment and run in editable mode, you can install with uv and the same editable flag.

uv pip install --editable ".[dev]"

Additional setup and notes

The project uses standard development tooling for Python projects. You can lint, format, and run tests to ensure your setup is healthy.

Lint and format checks use ruff. Static type checks use mypy and related tools. Tests run with pytest.

Security and configuration

Configure the runtime using environment variables when starting the server. The following variables are supported to control behavior and security:

  • CONFIG_PATH: Path to a JSON configuration file (e.g., mcp_server/mcp_config.json)
  • CONFIG: A JSON string containing the configuration
  • SECURITY: Environment variables for security parameters (e.g., API keys)

Starting the server

To run the server in stdio mode, use the following command. It starts the MCP server so you can connect with an MCP client using standard input and output streams.

python mcp_server/main.py stdio

Available tools

lint

Check code quality and style using ruff; includes lint and format checks (ruff check, ruff format)

static-analysis

Run static analysis using a dedicated script to check type safety and security (mypy, bandit, semgrep)

test

Run unit and integration tests with pytest and generate coverage reports

build

Build and publish the project using Hatch

pre-commit

Run pre-commit hooks before commits as configured

Mlb V3 Scores MCP Server - ag2-mcp-servers/mlb-v3-scores