tealium-mcp-server

tealium-mcp-server

Enables Tealium data layer validation, debugging, documentation generation, and code generation through natural language, assisting tag management specialists and analytics engineers.

Category
访问服务器

README

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_layer Validate data layers against schemas and Tealium best practices
generate_documentation Generate Markdown or JSON Schema documentation from specs
debug_data_layer Diagnose issues, find missing variables, detect type mismatches
generate_code Generate TypeScript/JavaScript code from specifications
parse_tracking_spec Parse CSV/JSON tracking specs from spreadsheets

Resources

Resource Description
tealium://schema/standard Standard data layer schema (page, user, event)
tealium://schema/ecommerce E-commerce schema (products, transactions)
tealium://schema/hotels Hotel industry schema (bookings, rooms, guests)
tealium://templates/basic Basic data layer template
tealium://templates/hotel-booking Hotel booking funnel template
tealium://best-practices Tealium implementation best practices

Installation

# Clone or download this repository
cd tealium-mcp-server

# Install dependencies
npm install

# Build
npm run build

Configuration

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 list

Claude 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.js

Hotel 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 dev

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选