home / mcp / mlb v3 projections mcp server
MCP Server generated by mcp.ag2.ai
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.
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.
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]"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 stdioYou 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.
Environment variables to consider.
CONFIG_PATH=/path/to/mcp_config.json
CONFIG='{"name":"mlb_v3_proj","transport":"stdio"}'
SECURITY=KEY=YOUR_API_KEYUses ruff to lint and format code, ensuring consistency across the project.
Runs mypy, bandit, and semgrep to perform type checks and security analysis.
Executes tests with pytest and generates a coverage report to gauge test coverage.