home / mcp / managed identity mcp server
MCP Server generated by mcp.ag2.ai
Configuration
View docs{
"mcpServers": {
"ag2-mcp-servers-managed-service-for-microsoft-active-directory-api": {
"command": "python",
"args": [
"mcp_server/main.py",
"stdio"
],
"env": {
"CONFIG": "{...JSON config...}",
"SECURITY": "YOUR_SECURITY_VARS",
"CONFIG_PATH": "mcp_server/mcp_config.json"
}
}
}
}This MCP Server exposes the Google-managed identities API via MCP, enabling you to run a local or remote MCP endpoint that your MCP clients can connect to for context-aware actions and data retrieval. It is designed to be started in a variety of transport modes and can be configured through environment variables or a JSON config file.
You run the MCP Server locally and connect your MCP clients to it to access the Google Managed Identities API surface. Use the stdio transport for a simple in-process setup, or switch to other transports as your integration requires. Start the server in stdio mode and provide configuration via environment variables or a config file.
Prerequisites you need before installing and running: Python 3.9 or newer, and a working Python package manager (pip) along with the uv runtime for serving the MCP protocol.
Step by step commands to set up and run the server locally:
# 1) Clone the server repository
# Replace <repository-url> with the actual repository URL
git clone <repository-url>
cd mcp-server
# 2) Install development dependencies
pip install -e ".[dev]"
# If you prefer to use uv for the runtime, you can install the editable dev package via uv
uv pip install --editable ".[dev]"
# 3) Run the server in stdio mode
python mcp_server/main.py stdioConfigure how the server loads its settings using environment variables. The following variables are supported:
- CONFIG_PATH: Path to a JSON configuration file (for example, mcp_server/mcp_config.json). - CONFIG: A JSON string containing the configuration. - SECURITY: Environment variables for security parameters (for example, API keys).
These variables are applied when the server starts and determine how the MCP endpoint exposes the Managed Identities API. See the start command below for a minimal runtime example.
# Example: start with a path-based config
CONFIG_PATH=mcp_server/mcp_config.json python mcp_server/main.py stdio
# Example: start with an inline JSON config
CONFIG='{"transport":"stdio","endpoints":["googleapis.com/managedidentities/v1alpha1"]}' python mcp_server/main.py stdio
# Example: provide security parameters
SECURITY_API_KEY=your_api_key python mcp_server/main.py stdio