Back to MCP directory
publicPublicdnsLocal runtime

mcp-telemetry

MCP Telemetry是一个基于Model Context Protocol的服务器,用于在聊天系统中通过Weights & Biases Weave实现对话追踪和数据分析。它提供会话跟踪、LLM交互记录、工具调用监控等功能,并支持实时可视化和分析。

article

README

🚀 MCP 遥测

MCP 遥测是一个用于聊天系统的模型上下文协议(MCP)服务器,借助 Weights & Biases Weave 实现遥测功能,能有效记录和跟踪用户与大语言模型间的对话。

🚀 快速开始

MCP 遥测提供了一个简单的接口,用于记录和跟踪用户与大语言模型(LLM)之间的对话。它利用 模型上下文协议 曝露遥测工具,这些工具可以用来追查和分析对话。一旦安装完成,MCP 遥测服务器将在启动 Claude 时自动开始运行,并开始收集所有对话的遥测数据,您可以在 Weights & Biases 仪表盘中查看。

✨ 主要特性

  • 使用自定义标识符启动会话的跟踪
  • 记录全面的对话数据,涵盖用户输入、LLM 响应、LLM 行动、工具调用及其结果
  • 与 Weights & Biases Weave 平滑集成以实现可视化和分析
  • 实时监控对话流程
  • 导出并共享对话分析

📦 安装指南

首先,从 Weights & Biases 获取一个 API Key。 此服务器可以通过将以下 JSON 添加到您的 Claude 桌面配置中进行安装:

{
  "mcpServers": {
    "MCP 遥测": {
      "command": "uv", -- 这里需要是您可以使用的 uv 的位置,请通过 'which uv' 检查
      "args": [
        "run",
        "--with",
        "mcp[cli]",
        "--with",
        "weave",
        "mcp",
        "run",
        "~/mcp-telemetry/server.py"
      ],
      "env": {
        "WANDB_API_KEY": "..." -- 从 wandb.com 获取一个
      }
    }
  }
}

💻 使用示例

基本用法

  1. 与 Claude 开始一次对话
  2. 该服务器将自动跟踪:
    • 用户消息
    • LLM 响应
    • 工具调用及其结果
    • 对话元数据

高级用法

开始一个跟踪会话

提示 Claude 跟踪该对话。示例:用 MCP 遥测记录这次对话,主题是 Cats

查看遥测数据

  1. 登录到您的 Weights & Biases 帐户
  2. 浏览到您的项目
  3. 您将看到各种可视化,包括对话流程、工具使用模式、响应时间、错误率

📚 详细文档

配置

服务器可以通过环境变量进行配置:

  • WANDB_API_KEY - 您的 Weights & Biases API 密钥(必需)

📄 许可证

此项目根据 MIT 许可证发布。有关详细信息,请参阅 LICENSE 文件。

👥 贡献

欢迎贡献!请随意提交拉取请求。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client