home / mcp / nascar v2 mcp server

Nascar V2 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-nascar-v2": {
      "command": "python",
      "args": [
        "mcp_server/main.py",
        "stdio"
      ],
      "env": {
        "CONFIG": "JSON string with configuration",
        "SECURITY": "Security parameters (e.g., API keys)",
        "CONFIG_PATH": "Path to JSON configuration file (e.g., mcp_server/mcp_config.json)"
      }
    }
  }
}

You can run a dedicated MCP (Model Context Protocol) server that exposes the NASCAR Nascar v2 sports data API for client applications. This server acts as a bridge between clients and the underlying API, enabling efficient data access, context-aware responses, and consistent interactions across your tooling.

How to use

Start the MCP server in stdio mode to run it locally. You interact with it through an MCP client by connecting to the local process and issuing context-aware requests. Use the same runtime you would use for typical Python command-line tasks, and ensure your client is configured to communicate over the chosen transport mode.

Key usage patterns you can adopt include establishing a long-running server process in stdio mode and feeding it requests from your MCP client as you iterate on models and contexts. You can provide a JSON-based configuration to customize the server’s behavior and security parameters, such as API keys or access controls, via environment variables.

How to install

  • Prerequisites: Python 3.9+ and a working Python environment with pip and uv for local development

1) Clone the MCP server repository and navigate into the project directory.

git clone <repository-url>
cd nascar-v2

2) Install development dependencies using pip with editable mode so changes are immediately reflected.

pip install -e ".[dev]"

If you prefer to use uv for local development, you can install editable dependencies with uv.

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

3) Run the MCP server in stdio mode to start listening for client requests.

python mcp_server/main.py stdio

4) Configure runtime environment if needed. You can provide a JSON configuration or environment variables to control security and behavior.

CONFIG_PATH=path/to/config.json CONFIG='{"example":"value"}' SECURITY='API_KEYS=your_key' python mcp_server/main.py stdio

Additional setup and development workflow

If you are actively developing the MCP server, you may also run linting, static analysis, and tests to keep the codebase healthy.

ruff check
ruff format
./scripts/static-analysis.sh
./scripts/test.sh

Available tools

ruff

Linting and formatting tool to ensure clean, consistent Python code.

mypy

Static type checker used to validate type correctness across the codebase.

pytest

Testing framework used to run unit tests and generate coverage reports.

pre-commit

Automation that runs linters and checks before every commit.

hatch

Build and publish tool used to package the MCP server.