home / mcp / business unit mcp server
MCP Server generated by mcp.ag2.ai
Configuration
View docs{
"mcpServers": {
"ag2-mcp-servers-business-unit": {
"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 that exposes a specific OpenAPI-based context API to clients, enabling standardized Model Context Protocol communication for your business unit data and actions. This server type is designed to be started locally and configured via environment variables or a JSON config, helping you integrate with MCP clients seamlessly.
Start the MCP server in the local stdio transport mode to interact with your client components. The server serves as a bridge that exposes a defined MCP interface, enabling clients to request and stream model context information for your business unit data. Once running, point your MCP client at the server’s endpoint. You will be able to perform context queries, subscribe to relevant data streams, and receive responses that conform to the MCP contract. Use environmental configuration to tailor security and runtime behavior, such as API keys and file-based configurations.
# Prerequisites
Python 3.9+
pip and uv
# 1. Clone the repository
git clone <repository-url>
cd mcp-server
# 2. Install dependencies
# If you are using the development container, this is handled automatically.
# Otherwise run:
pip install -e ".[dev]"
# Optional alternative using uv
uv pip install --editable ".[dev]"Configuration and runtime details you’ll use when running the server are described below. The server supports starting in stdio mode and can be configured through environment variables or a JSON config file.
Starting the server in stdio mode uses the following command. This is the primary way to run the MCP server locally for development and testing.
Environment variables you can use to configure the server include the path to a JSON configuration file, a JSON string containing the configuration, and security-related parameters such as API keys.
If you want to see how to interact with the server programmatically or in tests, you can refer to the test module that demonstrates starting and interfacing with the server in a programmatic way.
Use ruff to check code quality and formatting. Run ruff check and ruff format to enforce style.
Run static analysis tools (mypy, bandit, semgrep) to ensure type safety and security. Use the provided script ./scripts/static-analysis.sh.
Execute tests with coverage using ./scripts/test.sh and generate a combined report with ./scripts/test-cov.sh.
Install and run pre-commit hooks to ensure code quality before commits. Use pre-commit install.
Build and publish the MCP project using Hatch with hatch build and hatch publish.