tealium-mcp-server
Parse tracking specifications from Google Sheets spreadsheets, allowing users to import CSV-formatted specs directly.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@tealium-mcp-server Validate this data layer: { page: { pageName: 'Home' }, user: { isLoggedIn: true } }"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Tealium MCP Server
An MCP (Model Context Protocol) server for Tealium data layer validation, documentation generation, debugging, and code generation. Built for tag management specialists and analytics engineers.
Features
Tools
Tool | Description |
| Validate data layers against schemas and Tealium best practices |
| Generate Markdown or JSON Schema documentation from specs |
| Diagnose issues, find missing variables, detect type mismatches |
| Generate TypeScript/JavaScript code from specifications |
| Parse CSV/JSON tracking specs from spreadsheets |
Resources
Resource | Description |
| Standard data layer schema (page, user, event) |
| E-commerce schema (products, transactions) |
| Hotel industry schema (bookings, rooms, guests) |
| Basic data layer template |
| Hotel booking funnel template |
| Tealium implementation best practices |
Related MCP server: Google Tag Manager MCP Server
Installation
# Clone or download this repository
cd tealium-mcp-server
# Install dependencies
npm install
# Build
npm run buildConfiguration
Claude Code
# Add the server to Claude Code
claude mcp add --transport stdio tealium -- node /path/to/tealium-mcp-server/dist/index.js
# Verify it's configured
claude mcp listClaude Desktop
Edit your Claude Desktop config file:
Linux/WSL: ~/.config/Claude/claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"tealium": {
"command": "node",
"args": ["/path/to/tealium-mcp-server/dist/index.js"]
}
}
}Usage Examples
Validate a Data Layer
Ask Claude:
"Validate this data layer: { page: { pageName: 'Home' }, user: { isLoggedIn: true } }"
Debug Tracking Issues
Ask Claude:
"Debug this data layer from my booking page and tell me what's wrong"
Then paste your data layer JSON from the browser console.
Generate Documentation
Ask Claude:
"Generate documentation for my tracking specification"
Then provide your spec in JSON or paste CSV content.
Generate TypeScript Code
Ask Claude:
"Generate TypeScript interfaces for my hotel booking data layer"
Parse a Tracking Spec
Ask Claude:
"Parse this tracking spec from my Google Sheet"
Then paste CSV content with columns like: variable, type, required, description
Daily Workflow
1. Validating Implementations
When a developer sends a data layer for review or when checking a live page:
"Validate this data layer against the hotel schema:
{
page: { pageName: 'Booking Confirmation', pageType: 'confirmation' },
hotel: { hotelCode: 'BCN001', hotelName: 'Barceló Sants' },
booking: { bookingId: 'RES123', bookingTotal: 450, bookingCurrency: 'EUR' }
}"2. Debugging Tracking Issues
When something isn't tracking correctly (e.g., QA finds missing data in reports):
"Debug this data layer from the booking page - events aren't firing correctly:
[paste JSON from browser console: copy(utag_data)]"The tool will identify:
Missing required variables
Wrong data types (string vs number)
Invalid dates
Empty values
PII exposure risks
3. Creating Documentation
When onboarding new developers or updating tracking specs:
"Generate documentation for our hotel booking data layer"Or from an existing spec:
"Parse this tracking spec and generate documentation:
[paste CSV from Google Sheets]"4. Generating Code for Developers
When developers need implementation code:
"Generate TypeScript code for our booking funnel data layer with these events:
- search.initiated
- hotel.viewed
- room.selected
- booking.completed"5. Reviewing New Tracking Specs
When the analytics team sends a new tracking requirement (usually a spreadsheet):
"Parse this tracking spec from our Google Sheet:
variable,type,required,description
page.pageName,string,true,Page identifier
booking.bookingTotal,number,true,Total booking amount
booking.bookingCurrency,string,true,ISO currency code
..."Quick Reference
Task | Ask Claude |
Validate data layer | "Validate this data layer: {...}" |
Debug issues | "Debug this data layer: {...}" |
Generate docs | "Generate documentation for this spec" |
Generate code | "Generate TypeScript for this data layer" |
Parse spreadsheet | "Parse this tracking spec: [CSV]" |
Get best practices | "Show me Tealium best practices" |
Get hotel template | "Show me the hotel booking template" |
Pro Tip: Browser Console
To quickly grab the data layer from any page:
// In browser DevTools console:
copy(JSON.stringify(utag_data, null, 2))Then paste it into Claude with "Debug this data layer" or "Validate this".
Testing
# Use the MCP Inspector to test
npx @modelcontextprotocol/inspector node dist/index.jsHotel Industry Schema
This server includes specialized support for hotel/travel tracking:
Search data: destination, check-in/out dates, guests, rooms
Hotel data: code, name, brand, star rating, category
Room data: type, code, capacity, amenities
Booking data: ID, status, dates, nights, rates, totals
Guest data: type, loyalty ID, tier, points
Perfect for hotel chains like Barcelo, Marriott, Hilton, etc.
Development
# Build
npm run build
# Run development (build + start)
npm run devLicense
MIT
Available Tools
5 toolsdebug_data_layerB
Analyzes a data layer for common issues, missing variables, type mismatches, and provides recommendations. Perfect for troubleshooting tracking issues.
Inputs: dataLayer (required), checkPoints.
generate_codeA
Generates TypeScript or JavaScript code from a tracking specification or data layer. Includes type definitions, helper functions, and event tracking code.
Inputs: spec, language, dataLayer, includeHelpers.
generate_documentationA
Generates documentation from a data layer structure or tracking specification. Outputs Markdown or JSON Schema format.
Inputs: spec, format, dataLayer.
parse_tracking_specA
Parses tracking specifications from CSV or JSON format (e.g., exported from Google Sheets or Excel). Normalizes the data into a structured format.
Inputs: content (required), format, hasHeader.
validate_data_layerB
Validates a Tealium data layer object against schemas and best practices. Returns errors, warnings, and suggestions for improvement.
Inputs: dataLayer (required), schemaUri, strictMode.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Most tools are distinct, but validate_data_layer and debug_data_layer have significant overlap: both analyze a data layer for errors and issues. The descriptions differ in focus (schemas/best practices vs. common issues/missing variables), but an agent could easily confuse which to use for troubleshooting.
All five tool names follow a consistent verb_noun snake_case pattern: validate_, generate_, debug_, parse_, generate_. The pattern is predictable and clearly conveys the action and target.
Five tools is well-scoped for a data layer/tracking specification utility server. Each tool covers a distinct phase (parse, validate, debug, generate docs, generate code) without unnecessary bloat.
The toolset covers a complete workflow: parse raw specs, validate/debug data layers, and generate documentation or code. Minor gaps exist, such as no tool to edit or transform an existing data layer definition directly, but the core lifecycle is well represented.
Maintenance
Related MCP Connectors
Let AI manage your Google Tag Manager containers — tags, triggers, variables, and more.
GTM data layer for AI agents: find scored B2B leads free, reveal verified email+mobile, audit ads.
Define, ship & query your analytics tracking from one source of truth, trusted by humans and agents.
SEO & marketing toolkit for AI agents: GA4, Search Console, AdSense, GTM, PageSpeed, Trends.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to manage Google Tag Manager, Google Search Console, and Google Analytics (GA4) through unified access to tags, search performance data, URL inspection, sitemaps, and analytics reporting.7 npmISC
- AlicenseNot gradedqualityAmaintenanceEnables interaction with Google Tag Manager through its API with built-in Google OAuth authentication. Allows managing GTM containers, tags, triggers, and variables through natural language.250Apache 2.0
- FlicenseNot gradedqualityDmaintenanceIntegrates Google Tag Manager with Claude to automate the creation and management of tags, triggers, and variables using natural language prompts. It provides specialized tools for GA4 and Facebook Pixel setup, along with automated tracking workflows for ecommerce and lead generation sites.10-
- FlicenseNot gradedqualityFmaintenanceEnables interaction with Google Tag Manager containers, tags, triggers, and variables through natural language, using OAuth authentication.-