home / mcp / policy troubleshooter mcp server

Policy Troubleshooter 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-policy-troubleshooter-api": {
      "command": "python",
      "args": [
        "mcp_server/main.py",
        "stdio"
      ],
      "env": {
        "CONFIG": "{...}",
        "SECURITY": "YOUR_API_KEYS",
        "CONFIG_PATH": "mcp_server/mcp_config.json"
      }
    }
  }
}

You run an MCP Server that bridges your client applications with the Policy Troubleshooter API. This server exposes a dedicated MCP endpoint that you can interact with from any MCP client, enabling you to perform policy-related checks and obtain contextual results in a standardized way.

How to use

Start the MCP server in stdio mode to interact with clients through standard input and output. You will launch the server, then connect your MCP client to it to send requests and receive responses in real time. Use the provided environment variables to configure security and runtime behavior.

Your MCP client should initialize a connection to the local stdio-based server and then perform the usual MCP handshakes and request/response cycles defined by the MCP protocol. You can swap to other transports later if needed, but stdio is the recommended starting point for local development and testing.

How to install

# Prerequisites
Python 3.9+
 pip and uv

# 1. Clone the MCP server repository
 git clone <repository-url>
 cd mcp-server

# 2. Install dependencies
 pip install -e ".[dev]"

# Alternative with uv
 uv pip install --editable ".[dev]"

# 3. Run static checks and tests (optional but recommended)
 ruff check
 ruff format

 ./scripts/static-analysis.sh
 ./scripts/test.sh

# 4. Start the MCP server in stdio mode
 python mcp_server/main.py stdio

Additional notes

Configuration can be supplied via environment variables. The server recognizes CONFIG_PATH for a path to a JSON configuration file, CONFIG for a JSON configuration string, and SECURITY for security-related parameters such as API keys. The exact loading behavior is implemented in the main entry point of the server.

Configuration and startup details

# Example environment configuration
export CONFIG_PATH=mcp_server/mcp_config.json
export SECURITY={"apiKey":"YOUR_API_KEY"}

# Start in stdio mode
python mcp_server/main.py stdio

Available tools

ruff

Linting and formatting tool to keep code style consistent and catch issues early.

mypy

Static type checker that analyzes code for type correctness.

pytest

Testing framework used to run unit and integration tests.

pre-commit

Automation that runs a series of checks before every commit to ensure code quality.