API Reference / MCP Integration

MCP Integration

Use Tagstack directly inside Claude, ChatGPT, and any MCP-compatible AI agent.

The Model Context Protocol (MCP) lets AI assistants call external tools on your behalf. With Tagstack connected as an MCP server, your AI agent can scan any website, detect its marketing technology stack, and surface martech insights — without leaving the chat. Think of it as giving your AI a built-in GTM inspector.

Connect to Claude in 3 steps
Takes about 60 seconds. No API key needed — just your Tagstack account.
1
Open Claude Settings — Go to Click here to go to Claude.ai settings, or click your profile → SettingsConnectors (or Integrations, depending on your plan).
2
Add the connector — Click Add connector and paste this URL:
Claude.ai connect MCP modal
MCP Server URL
https://service.tagstack.io/mcp/api
3
Log in and approve — You'll be redirected to tagstack.io to sign in and grant Claude access. After approving, Tagstack appears in Claude's tool list and is ready to use.
Tagstack oauth consent screen

Free plan works. MCP access is available on all Tagstack plans including free. Scans made through the MCP tool count against your normal monthly scan allowance.

Available Tools

The tools are designed around a two-step gate pattern: cheap summary tools first, expensive detail tools only when the user explicitly asks. This keeps token costs predictable and prevents Claude from accidentally dumping 100k tokens of container JSON into your context.

ToolCostUse when…
get_technologiescheapYou want a vendor list + container overview. Always call this first.
has_server_sidecheapThe only question is whether GA4 server-side tagging is active.
get_tagsmediumYou need the full tag list with names and types, not just vendor counts.
get_full_auditexpensiveYou need the raw container JSON. Always gated — Claude asks you to confirm first.
tool get_technologies
cheap

The summary gate. Returns the vendor list, per-container metadata (tag count, consent mode, CMP, server-side flag), and a fullAuditTokenEstimate so Claude can warn you before calling the expensive tools. Call this first for any new site.

Input
ParameterDescription
url
string
Website URL or GTM container ID (e.g. GTM-XXXX).
Required
Output (example)
JSON Response
{ "tagsCount": 12, "technologies": ["Google Analytics 4", "OneTrust", "Hotjar"], "containers": { "GTM-XXXX": { "entityType": "GTM Container", "tagCount": 12, "consentMode": true, "cmp": "OneTrust", "ga4ServerSide": false } }, "fullAuditTokenEstimate": 8400 }
tool has_server_side
cheap

Checks whether GA4 server-side tagging is configured (a server-side GTM transport URL detected on the GA4 tag). Returns a top-level boolean plus a per-container breakdown. Ultra-focused — use this instead of get_technologies when that's the only thing you need to know.

Input
ParameterDescription
url
string
Website URL or GTM container ID.
Required
Output (example)
JSON Response
{ "hasServerSide": false, "containers": { "GTM-XXXX": { "ga4ServerSide": false } } }
tool get_tags
medium

Returns the full tag list per container — name, type, and paused status for every tag. More granular than get_technologies, but far cheaper than get_full_audit. Useful for "show me every tag firing on this site" or spotting paused/duplicate tags.

Input
ParameterDescription
url
string
Website URL or GTM container ID.
Required
Output (example)
JSON Response
{ "GTM-XXXX": { "entityType": "GTM Container", "tags": [ { "name": "Google Analytics 4", "type": "gaawe", "paused": false }, { "name": "Google Ads Conversion Tracking", "type": "awct", "paused": false }, { "name": "Hotjar", "type": "hjtc", "paused": true } ] } }
tool get_full_audit
expensive

Returns the complete container data — all tags with their parameters, consent configuration, CMP detection, and server-side status. Can be very large for complex containers (50k–150k tokens). Built-in two-step gate: the first call always returns a cost estimate; the full data is only returned after you pass confirmed: true.

Input
ParameterDescription
url
string
Website URL or GTM container ID.
Required
confirmed
boolean
Set to true after the user has confirmed the cost. Without this, only a token estimate is returned.
Optional
First call — estimate only (confirmed omitted or false)
JSON Response
{ "tokenEstimate": 94200, "estimatedCost": { "claude-sonnet-4": "$0.283", "claude-haiku-4": "$0.0235" }, "containers": [ { "id": "GTM-XXXX", "tagCount": 47, "consentMode": true, "ga4ServerSide": false, "cmp": "OneTrust" } ], "instructions": "Ask the user to confirm before proceeding. Then call get_full_audit again with confirmed=true." }
Second call — full data (confirmed: true)
JSON Response
// Full containersInfos object — all tags with parameters, consent config, etc. { "GTM-XXXX": { "entityType": "GTM Container", "tags": [ /* ... */ ], ... } }

Example Prompts

Once connected, just ask Claude in plain English. Here are prompts you can copy and use right away:

Competitive research
What marketing technologies does [competitor.com] use?
Privacy audit
Scan [site.com] and tell me if they have a Consent Management Platform installed.
Stack comparison
Compare the martech stack of [site-a.com] vs [site-b.com] — which one is more sophisticated?
Sales intelligence
List all tracking tags on [prospect.com] and flag any privacy or compliance concerns I should raise on our next call.
Server-side check
Does [site.com] use GA4 server-side tagging?
Deep container inspection
Show me the full GTM container for [site.com] — I want to see every tag and its configuration.

Compatibility

Tagstack uses the Streamable HTTP transport (MCP 2025-03-26 spec) — the modern standard that works with most MCP clients without needing a local proxy or SSE connection.

ClientStatusNotes
Claude.aiSupportedUse the Quick Connect steps above. Requires Claude Pro or Team plan.
Claude DesktopSupportedAdd to claude_desktop_config.json — see snippet below.
Other MCP clientsShould workAny client that supports Streamable HTTP + OAuth 2.1 dynamic client registration.
Claude Desktop config

Add this to your claude_desktop_config.json file (located at ~/Library/Application Support/Claude/ on macOS):

claude_desktop_config.json
{ "mcpServers": { "tagstack": { "url": "https://service.tagstack.io/mcp/api" } } }

OAuth login required. When Claude Desktop first calls a Tagstack tool, it will open a browser window to authenticate with tagstack.io. This only happens once — the token is stored locally and reused for future calls.

Troubleshooting

Most connection issues have a simple fix. Check these first:

Connection fails or tool doesn't appear
Make sure you're logged into tagstack.io in your browser before completing the OAuth flow. If the browser window doesn't open, try disconnecting the connector in Claude and re-adding it. Also confirm your Claude plan supports MCP connectors (Pro or Team required on Claude.ai).
Tool returns no results or empty technologies list
The site may not use Google Tag Manager — in that case, Tagstack can't inspect its tags. Try scanning the GTM container ID directly (e.g. GTM-XXXX) if you know it. Alternatively, use the web scanner to check what's detected for that domain.
Scan limit exceeded
MCP scans count against your monthly allowance just like web scans. Check your remaining credits on your profile page. Upgrade your plan to get more scans.

Still stuck? Reach out at lucas@tagstack.io — happy to help debug your setup.

Also see the full API Reference → Last updated: February 2026