home / mcp / tagmanager api mcp server
MCP Server generated by mcp.ag2.ai
Configuration
View docs{
"mcpServers": {
"ag2-mcp-servers-tag-manager-api": {
"command": "python",
"args": [
"mcp_server/main.py",
"stdio"
],
"env": {
"CONFIG": "{\"transport\":\"stdio\"} (JSON string)",
"SECURITY": "API_KEYS or other security parameters",
"CONFIG_PATH": "mcp_server/mcp_config.json"
}
}
}
}You run an MCP (Model Context Protocol) Server that surfaces a remote API spec as a structured, testable backend service. This enables clients to interact with the Google Tag Manager API in a consistent MCP environment, with clear transport, configuration, and tooling support.
Start the local MCP server in stdio mode to expose the API locally to your MCP clients. The server is designed to be consumed by MCP clients that understand the standard MCP transport and lifecycle.
Prerequisites you need before running the server are Python 3.9 or newer and the uv executor.
# Install required Python packages in editable mode including development dependencies
pip install -e ".[dev]"
# Alternatively, run with uv to execute editable install
uv pip install --editable ".[dev]"To start the MCP server in stdio mode, run the following command. This launches the local MCP server using the Python runtime.
python mcp_server/main.py stdioConfigure runtime behavior with environment variables. The key variables you will use are:
- CONFIG_PATH: Path to a JSON configuration file (for example, mcp_server/mcp_config.json).
- CONFIG: A JSON string containing the configuration to load at startup.
- SECURITY: Environment variables that control security parameters such as API keys.
If you provide a configuration file, the server loads it at startup and uses it to determine how to expose the MCP endpoints.
Development uses a suite of quality tools to keep code healthy and robust.
# Linting and formatting
ruff check
ruff format
# Static analysis
./scripts/static-analysis.sh
# Tests with coverage
./scripts/test.sh
./scripts/test-cov.shThe MCP server is designed to load its configuration from a JSON file or inline JSON string. It supports multiple transport modes, with stdio being the default for local development and testing.
Lints and formats code; checks for issues and enforces style.
Performs static type checking to catch type errors early.
Runs unit tests and integrates with coverage reporting.