home / mcp / tagmanager api mcp server

Tagmanager API MCP Server

MCP Server generated by mcp.ag2.ai

Installation
Add the following to your MCP client configuration file.

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.

How to use

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.

How to install

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]"

Running the server

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 stdio

Configuration and security

Configure 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 and tooling notes

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.sh

Project structure and startup details

The 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.

Available tools

ruff

Lints and formats code; checks for issues and enforces style.

mypy

Performs static type checking to catch type errors early.

pytest

Runs unit tests and integrates with coverage reporting.

Tagmanager API MCP Server - ag2-mcp-servers/tag-manager-api