home / mcp / mlb v3 scores mcp server
MCP Server generated by mcp.ag2.ai
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.
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.
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-serverStep 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]"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.
Configure the runtime using environment variables when starting the server. The following variables are supported to control behavior and security:
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 stdioCheck code quality and style using ruff; includes lint and format checks (ruff check, ruff format)
Run static analysis using a dedicated script to check type safety and security (mypy, bandit, semgrep)
Run unit and integration tests with pytest and generate coverage reports
Build and publish the project using Hatch
Run pre-commit hooks before commits as configured