- Home
- MCP servers
- Business Unit
Business Unit
- python
0
GitHub Stars
python
Language
4 months ago
First Indexed
3 weeks ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
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.
How to use
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.
How to install
# 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]"
Additional sections
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.
Available tools
Linting
Use ruff to check code quality and formatting. Run ruff check and ruff format to enforce style.
Static analysis
Run static analysis tools (mypy, bandit, semgrep) to ensure type safety and security. Use the provided script ./scripts/static-analysis.sh.
Testing
Execute tests with coverage using ./scripts/test.sh and generate a combined report with ./scripts/test-cov.sh.
Pre-commit
Install and run pre-commit hooks to ensure code quality before commits. Use pre-commit install.
Build and publish
Build and publish the MCP project using Hatch with hatch build and hatch publish.