Token导航 LogoToken导航TokenDH.com
Amplitude MCP Server logo
数据服务stdio官方级别未说明来源级核验

Amplitude MCP Server

MCP Server

amplitude-mcp-server

Amplitude MCP Server是一个用于将Amplitude分析功能集成到AI工作流中的模型上下文协议服务器,支持跟踪事件、页面浏览、用户注册、设置用户属性和跟踪收入。

工具数

5

提示词数

0

GitHub Stars

7

资源数

0
数据分析JavaScriptClaudeClaude DesktopClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

moonbirdai

提供方

moonbirdai

最后核验

2026/5/17 20:54

运行时

Node.js

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

npx amplitude-mcp-server --api-key YOUR_AMPLITUDE_API_KEY

详细介绍

振幅MCP服务器

A. 模型上下文协议(MCP) 用于将Amplitude分析集成到AI工作流中的服务器。该服务器允许像Claude这样的人工智能助手在Amplitude中跟踪事件、页面浏览量、用户注册、设置用户属性和跟踪收入。

版本1.0.1注: 工具名称现在包括 amplitude_ 前缀,以防止与其他分析MCP服务器的命名空间冲突。

目录

- 使用克劳德桌面 - 与其他MCP客户端

特性

  • 在振幅中跟踪自定义事件
  • 使用属性跟踪页面浏览量
  • 跟踪用户注册并创建用户配置文件
  • 更新现有用户属性
  • 跟踪收入和购买情况
  • 与Claude Desktop和其他MCP客户端简单集成

安装

先决条件

  • Node.js 16或更高版本
  • Amplitude API密钥(通过在 振幅)

NPM安装(推荐)

# Install globally
npm install -g amplitude-mcp-server

# Or use directly with npx
npx amplitude-mcp-server --api-key YOUR_AMPLITUDE_API_KEY

手动安装

# Clone the repository
git clone https://github.com/ciaraadkins/amplitude-mcp-server.git
cd amplitude-mcp-server

# Install dependencies
npm install

# Run the server
node index.js --api-key YOUR_AMPLITUDE_API_KEY

快速开始

要开始在Claude Desktop上使用Amplitude MCP服务器,请执行以下操作:

  1. 确保您的计算机上安装了Claude Desktop(从下载 claude.ai/下载)
  1. 创建或编辑Claude Desktop配置文件:

- macOS: ~/Library/Application Support/Claude/claude_desktop_config.json - 窗户: %AppData%\Claude\claude_desktop_config.json

  1. 添加Amplitude MCP服务器配置:
{
  "mcpServers": {
    "amplitude-analytics": {
      "command": "npx",
      "args": [
        "-y",
        "amplitude-mcp-server",
        "--api-key",
        "YOUR_AMPLITUDE_API_KEY"
      ]
    }
  }
}
  1. 重新启动Claude Desktop并开始跟踪分析!

详细用法

使用克劳德桌面

按照快速入门部分所示设置配置文件后,您可以在与Claude的对话中直接使用振幅分析功能。

您可以使用的提示示例:

  • “在Amplitude中为用户'user123'跟踪名为'document_generated'的自定义事件”
  • “在Amplitude中跟踪定价页面的页面浏览量”
  • “通过电子邮件在Amplitude中为John Doe创建新的用户配置文件john@example.com"
  • “在Amplitude中更新用户'user123'的用户配置文件信息”
  • “追踪以49.99美元购买产品X”

Claude将根据您的要求使用适当的振幅MCP工具。

与其他MCP客户端

此服务器使用标准的模型上下文协议,可以与任何MCP客户端集成:

  1. 启动服务器:
   npx amplitude-mcp-server --api-key YOUR_AMPLITUDE_API_KEY
  1. 使用stdio传输将MCP客户端连接到服务器
  1. 客户端可以发现并使用可用的工具(track_event、track_pageview、track_signup、set_user_properties、track_revenue)

工具参考

Amplitude MCP服务器提供以下工具:

amplitude_track_event

在振幅中跟踪自定义事件。

参数:

  • event_name (string,必填):要跟踪的事件的名称
  • user_id (字符串,可选):用户标识符
  • device_id (字符串,可选):设备标识符
  • properties (对象,可选):要跟踪事件的其他属性
  • user_properties (对象,可选):要使用此事件更新的用户属性

注: 要么 user_iddevice_id 必须提供。

例子:

{
  "event_name": "button_clicked",
  "user_id": "user123",
  "properties": {
    "button_id": "submit_form",
    "page": "checkout"
  },
  "user_properties": {
    "last_action": "form_submit"
  }
}

amplitude_track_pageview

在振幅中跟踪页面查看事件。

参数:

  • page_name (string,必填):查看的页面名称
  • user_id (字符串,可选):用户标识符
  • device_id (字符串,可选):设备标识符
  • properties (对象,可选):要跟踪事件的其他属性

注: 要么 user_iddevice_id 必须提供。

例子:

{
  "page_name": "homepage",
  "user_id": "user123",
  "properties": {
    "referrer": "google.com",
    "duration": 120
  }
}

amplitude_track_signup

跟踪注册事件并在Amplitude中创建用户配置文件。

参数:

  • user_name (string,必填):用户的全名
  • email (string,必填):用户的电子邮件地址
  • plan (字符串,可选):注册计划。默认为“免费”

例子:

{
  "user_name": "John Doe",
  "email": "john@example.com",
  "plan": "premium"
}

振幅_设置_用户_特性

在振幅中更新用户的配置文件属性。

参数:

  • user_id (字符串,必填):用户标识符
  • properties (对象,必填):要设置的配置文件属性

例子:

{
  "user_id": "user123",
  "properties": {
    "name": "John Doe",
    "email": "john@example.com",
    "plan": "premium",
    "company": "Acme Inc"
  }
}

振幅_轨迹_位置

在Amplitude中跟踪收入事件。

参数:

  • user_id (字符串,必填):用户标识符
  • product_id (string,必填):所购产品的标识符
  • price (数字,必填):所购商品的价格
  • quantity (数字,可选):购买的物品数量。默认为1
  • revenue_type (字符串,可选):收入类型(例如,“购买”、“退款”、“订阅”)

例子:

{
  "user_id": "user123",
  "product_id": "premium_plan",
  "price": 49.99,
  "quantity": 1,
  "revenue_type": "subscription"
}

例子

以下是与Claude一起使用Amplitude MCP服务器的一些实际示例:

跟踪按钮点击

You: Can you track an event in Amplitude when a user clicks the submit button?

Claude: I'll track that event for you. Let me use the Amplitude analytics tool.

[Claude uses the amplitude_track_event tool with appropriate parameters]

Claude: I've successfully tracked the 'button_clicked' event in Amplitude with the properties you specified.

创建用户配置文件

You: Create a new user profile in Amplitude for Sarah Johnson who signed up with sarah@example.com on the premium plan.

Claude: I'll create that user profile in Amplitude.

[Claude uses the amplitude_track_signup tool with appropriate parameters]

Claude: I've successfully tracked the signup for Sarah Johnson and created a profile in Amplitude with the premium plan.

跟踪收入

You: Track a purchase of our premium plan for $99.99 by user12345.

Claude: I'll track that revenue event in Amplitude.

[Claude uses the amplitude_track_revenue tool with appropriate parameters]

Claude: I've successfully tracked revenue of $99.99 for the premium plan purchase by user12345.

故障排除

常见问题

  1. 服务器未启动:

- 确保您提供了有效的Amplitude API密钥 - 检查Node.js是否已安装,以及是否为16或更高版本

  1. Claude Desktop未显示振幅工具:

- 验证claude_desktop_config.json文件语法 - 确保在编辑配置后重新启动了Claude Desktop - 检查服务器的路径是否正确

  1. 振幅中未出现的事件:

- 验证Amplitude API键是否正确 - 检查振幅项目设置,以确保正在接收数据 - 事件可能需要几分钟才能显示在振幅界面中

调试模式

要在调试模式下运行服务器以进行更详细的日志记录,请执行以下操作:

npx amplitude-mcp-server --api-key YOUR_AMPLITUDE_API_KEY --debug

安全说明

  • 您的Amplitude API密钥存储在Claude Desktop配置文件中。确保此文件具有适当的权限
  • 考虑在生产环境中为敏感令牌使用环境变量
  • 此服务器未实现速率限制-考虑为生产使用添加其他安全措施
  • 事件直接发送到Amplitude的API-查看Amplitude的数据处理实践隐私政策

贡献

欢迎投稿!请随时提交拉取请求。

  1. 分叉存储库
  2. 创建功能分支(git checkout -b feature/amazing-feature)
  3. 提交您的更改(git commit -m 'Add some amazing feature')
  4. 推到分支(git push origin feature/amazing-feature)
  5. 打开拉取请求

许可证

此项目根据MIT许可证获得许可-有关详细信息,请参阅许可证文件。

目录标签

目录标签

数据分析JavaScriptClaude本地部署AI集成用户行为跟踪收入分析Amplitude

支持客户端

Claude DesktopClaude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Node.js

部署方式(deploymentType,部署类型)

remote-capable

来源包(packageName,安装包名)

amplitude-mcp-server

工具数量(toolCount,工具数)

5

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdiononeremote-capable

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP