home / mcp / policy analyzer mcp server
Provides an MCP server for the Policy Analyzer API, exposing its OpenAPI-defined capabilities.
Configuration
View docs{
"mcpServers": {
"ag2-mcp-servers-policy-analyzer-api": {
"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 expose an MCP server for the Policy Analyzer API so clients can interact with it in a standardized way. This server manages requests, handles model-context operations, and can be wired into your tooling for automated workflows and integrations.
Start the MCP server in stdio mode and connect your MCP client to it. Use the server as a local service that exposes the Policy Analyzer capabilities to your tooling. Configure the server via environment variables or a JSON config file, then launch a client that sends MCP requests. You can run the server in different transport modes, but stdio is the simplest for local development and testing.
Prerequisites: Python 3.9 or later, pip, and uv.
Clone the project and install dependencies.
git clone <repository-url>
cd mcp-server
pip install -e ".[dev]"
# Or, if you prefer using uv to install the editable dev package:
uv pip install --editable ".[dev]"Use the stdio transport to run the MCP server locally. This starts the server and makes it available to a local MCP client.
python mcp_server/main.py stdioConfigure the server using environment variables or a JSON config file. Key variables include the path to the config and security settings.
- CONFIG_PATH: Path to a JSON configuration file (for example, mcp_server/mcp_config.json).\n- CONFIG: A JSON string containing the configuration.\n- SECURITY: Environment variables for security parameters (such as API keys).
python mcp_server/main.py stdio{
"type": "stdio",
"name": "policy_analy_mcp",
"command": "python",
"args": ["mcp_server/main.py", "stdio"],
"env": [
{"name": "CONFIG_PATH", "value": "mcp_server/mcp_config.json"},
{"name": "SECURITY", "value": "API_KEY=YOUR_API_KEY"}
]
}