Skip to main content
Glama
megha2432

Zeotap CDP MCP Server

by megha2432

Zeotap CDP MCP 服务器

一个将 Claude 连接到 Zeotap 受众 (Audience) 和目标 (Destination) API 的 MCP (模型上下文协议) 服务器。客户端可以用简单的英语提问——Claude 会在内部处理所有 API 调用和 ID 查找。


功能

  • 从 Zeotap 获取受众、目标和同步状态

  • 使用 tiktoken 将 API 响应压缩约 85%,以便 Claude 可以处理更多数据

  • 关联受众 + 目标数据(通过 API 调用复制您的 SQL 连接)

  • 接受组织名称和受众名称——客户端无需了解 ID


文件

文件

用途

server.py

MCP 服务器 — 处理工具调用、API 请求、响应压缩

tools.yaml

配置 — 组织 ID、工具定义、LLM 友好描述

requirements.txt

Python 依赖项

Skills.md

完整的 API 蓝图和工具设计参考

.env

持有者令牌 (Bearer token)(未提交 — 每小时更新)


设置

1. 安装依赖项

python3 -m venv .venv
source .venv/bin/activate   # Windows: .venv\Scripts\activate
pip install -r requirements.txt

2. 获取您的持有者令牌 (Bearer token)

  1. 登录 unity.zeotap.com

  2. 打开 DevTools → Network 选项卡 → 点击任意请求

  3. 复制 Authorization: Bearer eyJ... 的值(仅 eyJ... 部分)

3. 设置令牌

echo 'ZEOTAP_TOKEN=your-token-here' > .env

⚠️ 令牌每 1 小时 过期一次。当您收到 401 错误时,请重复步骤 2–3。

4. 使用 MCP Inspector 运行(用于测试)

npx @modelcontextprotocol/inspector .venv/bin/python server.py

打开终端中打印的 URL。


添加新组织

每个组织需要两个 ID。在 Zeotap 应用中浏览该组织时,可以通过 DevTools 找到它们:

ID

查找位置

用途

数字 ID (例如 1918)

URL: /audiences/orgs/1918/...

受众 API

UUID (例如 efc1d9ad-...)

Network 选项卡: /channelSettings/...?orgId=efc1...

目标名称查找

更新 tools.yaml

audience_org_id: 1918
org_uuid: "efc1d9ad-8bb2-48a2-8c84-46f2e9f2b9b4"
org_name: "Your Org Name"

工具

工具

描述

所需参数

get_org_overview

受众总数、状态细分、按规模排名前 5 的受众

search_audiences

按名称或状态查找受众

可选: query, status

get_audience_full

一个受众的完整详细信息 + 过滤器 + 目标

audience_nameaudience_id

get_org_full_report

所有受众及其目标和同步状态的关联数据

list_all_destinations

组织中配置的所有目标

无(需要 UUID)

get_destination_full

一个目标的详细信息

destination_namedestination_id(需要 UUID)

list_orgs

列出已知的客户组织及其 ID


Claude 查询示例

连接到 Claude Desktop 后,客户端可以询问:

问题

使用的工具

"Give me a summary of our audiences"

get_org_overview

"List all active audiences"

search_audiences

"Tell me about the Loyalty Program audience"

get_audience_full

"Which audiences are failing to sync?"

get_org_full_report

"What platforms is our CDP syncing to?"

get_org_full_report

"What destinations do we have?"

list_all_destinations


连接到 Claude Desktop

添加到您的 claude_desktop_config.json

{
  "mcpServers": {
    "zeotap-cdp": {
      "command": "/Users/megha/Documents/MCP1/.venv/bin/python",
      "args": ["/Users/megha/Documents/MCP1/server.py"],
      "env": {
        "ZEOTAP_TOKEN": "your-token-here"
      }
    }
  }
}

在 Mac 上,配置文件位于: ~/Library/Application Support/Claude/claude_desktop_config.json

更新配置后重启 Claude Desktop。


受众 ↔ 目标关联

get_org_full_report 工具通过两次 API 调用复制此 SQL 连接:

SELECT fpa.name, fpa.status, csw.status, ip.int_partner_name
FROM public_audience_destinations pad
JOIN public_first_party_audience fpa ON pad.first_party_audience_id = fpa.id
JOIN public_channel_service_workflow csw ON pad.latest_channel_service_workflow_id = csw.id
JOIN public_integration_partner ip ON pad.channel_id = ip.int_id
WHERE fpa.org_id = 1918

SQL 字段

API 来源

fpa.name, fpa.status

audienceSummaries 响应

csw.status, csw.status_detail

destinationsSummary.status + statusDetail.message

ip.int_partner_name

channelSettingsintegrationPartnerName (通过 channelId = intId 关联)

channelSegmentId

destinationsSummary.integrationDetail.channelSegmentId


令牌缩减

工具

原始令牌

压缩后

缩减比例

get_org_overview (100 个受众)

~15,000

~800

~95%

search_audiences (20 个结果)

~8,000

~600

~93%

get_audience_full

~3,000

~300

~90%

get_org_full_report

~20,000

~2,000

~90%

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

No tool schema history has been recorded yet.

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/megha2432/MCP_Zeotap'

If you have feedback or need assistance with the MCP directory API, please join our Discord server