Skip to main content
Glama

honeycomb-mcp-server

MIT License
27
2
  • Linux
  • Apple

Honeycomb MCP 服务器

概述

该服务器是一个使用模型上下文协议(MCP)的接口,使 Claude AI 能够与Honeycomb API进行交互。

通过此 MCP 服务器,Claude AI 可以执行检索、创建和更新 Honeycomb 数据集、查询、事件、板、标记、SLO 和触发器等操作。

关于存储库

此代码库提供了 Honeycomb MCP 服务器的独立实现。它将 Claude AI 与 Honeycomb 集成,以简化可观察性和监控工作流程。

设置

先决条件

  • Node.js 18 或更高版本

  • Honeycomb API 密钥

安装

# Install globally npm install -g @kajirita2002/honeycomb-mcp-server # Or use directly with npx npx @kajirita2002/honeycomb-mcp-server

设置环境变量

# Set environment variables export HONEYCOMB_API_KEY="your_honeycomb_api_key"

MCP 配置示例

如果您使用此 MCP 服务器,请将以下配置添加到您的mcp_config.json文件中:

"honeycomb": { "command": "npx", "args": ["-y", "@kajirita2002/honeycomb-mcp-server"], "env": { "HONEYCOMB_API_KEY": "your_honeycomb_api_key" } }

启动服务器

# Start the server npm start

可用工具

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

验证

  1. honeycomb_auth

    • 使用 Honeycomb API 进行身份验证

    • 输入:

      • apiKey (字符串,可选):Honeycomb API 密钥(如果未提供,则使用环境变量)

数据集管理

  1. honeycomb_datasets_list

    • 列出所有可用的数据集

    • 无需输入参数

  2. honeycomb_dataset_get

    • 获取有关特定数据集的信息

    • 输入:

      • datasetSlug (字符串,必需):数据集的 Slug

  3. honeycomb_datasets_create

    • 创建新数据集

    • 输入:

      • name (字符串,必需):数据集的名称

      • description (字符串,可选):数据集的描述

列管理

  1. honeycomb_columns_list

    • 列出数据集中的所有列

    • 输入:

      • datasetSlug (字符串,必需):数据集的 Slug

查询管理

  1. honeycomb_query_create

    • 为数据集创建新查询

    • 输入:

      • datasetSlug (字符串,必需):数据集的 Slug

      • query (对象,必需):查询配置

  2. honeycomb_query_result_create

    • 执行查询并返回结果

    • 输入:

      • datasetSlug (字符串,必需):数据集的 Slug

      • query (对象,必需):查询配置

活动管理

  1. honeycomb_event_create

    • 在数据集中创建新事件

    • 输入:

      • datasetSlug (字符串,必需):数据集的 Slug

      • data (对象,必需):事件数据

董事会管理

  1. honeycomb_boards_list

    • 列出所有板块

    • 无需输入参数

  2. honeycomb_board_get

    • 获取特定板的信息

    • 输入:

      • boardId (字符串,必需):董事会的 ID

  3. honeycomb_board_create

    • 创建新董事会

    • 输入:

      • name (字符串,必需):板的名称

      • description (字符串,可选):板的描述

      • query_ids (字符串数组,可选):要包含在板中的查询 ID

  4. honeycomb_board_update

    • 更新现有板

    • 输入:

      • boardId (字符串,必需):要更新的板的 ID

      • name (字符串,可选):董事会的新名称

      • description (字符串,可选):板的新描述

      • query_ids (字符串数组,可选):要包含在板中的新查询 ID

标记管理

  1. honeycomb_markers_list

    • 列出数据集的所有标记

    • 输入:

      • datasetSlug (字符串,必需):数据集的 Slug

  2. honeycomb_marker_create

    • 创建新标记

    • 输入:

      • datasetSlug (字符串,必需):数据集的 Slug

      • message (字符串,必需):标记的消息

      • type (字符串,必需):标记的类型

      • start_time (字符串,必需):标记的开始时间

      • end_time (字符串,可选):标记的结束时间

      • url (字符串,可选):与标记关联的 URL

    • 输入:

      • datasetSlug (字符串,必需):数据集的 Slug

      • markerId (字符串,必需):要删除的标记的 ID

示例用法

以下是 Claude 使用此 MCP 服务器创建新的 Honeycomb 数据集并添加事件的示例:

[Claude] Please create a new dataset in Honeycomb called "Application Monitoring" with a description "Monitoring for our production application". [User] I'll help you create a new dataset in Honeycomb. [Claude] I'll create a new dataset for you in Honeycomb. I'll use the honeycomb_datasets_create tool: Input: { "name": "Application Monitoring", "description": "Monitoring for our production application" } The dataset has been created successfully! [Claude] Now, let me add an event to this dataset. I'll create an event with some sample metrics. I'll use the honeycomb_event_create tool: Input: { "datasetSlug": "application-monitoring", "data": { "service": "api-gateway", "duration_ms": 45.2, "status_code": 200, "endpoint": "/users", "method": "GET" } } Event created successfully! You can now see this event in the Honeycomb UI under the Application Monitoring dataset. [Claude] I can also create a query to analyze this data. Let me create a query that shows the average duration by endpoint. I'll use the honeycomb_query_create tool: Input: { "datasetSlug": "application-monitoring", "query": { "calculations": [ { "op": "AVG", "column": "duration_ms" } ], "breakdowns": ["endpoint"], "time_range": 3600 } }

常见的集成模式

  1. 可观察性自动化

    [User] Claude, please help me set up a new SLO for API response times. [Claude] I can help with that. Let me create an SLO to track API response times. I'll use honeycomb_slo_create with these parameters: { "datasetSlug": "production-api", "name": "API Response Time SLO", "description": "Tracks response time for critical API endpoints", "sli": { "alias": "Response Time < 300ms", "conditions": { "column": "duration_ms", "operator": "<", "value": 300 } }, "time_period_days": 30, "target_per_million": 995000 }
  2. 事故调查

    [User] We're seeing elevated error rates in production. Can you help investigate? [Claude] I'll help investigate the elevated error rates. Let me query the recent error data. First, I'll use honeycomb_query_result_create: { "datasetSlug": "production", "query": { "calculations": [ { "op": "COUNT" } ], "filters": [ { "column": "status_code", "operator": ">=", "value": 500 } ], "breakdowns": ["service", "endpoint"], "time_range": 3600, "granularity": 60 } }

创建数据集“应用程序监控”,描述为“监控我们的生产应用程序”...

[Claude 使用 honeycomb_datasets_create]

数据集已成功创建!现在我们可以向其中添加事件了。

您希望我在数据集中创建一个示例事件来测试它吗?

[用户] 是的,请添加一个示例事件。

[Claude] 我将向“应用程序监控”数据集添加一个示例事件。

[Claude 使用 honeycomb_event_create]

成功!我已将示例事件添加到您的“应用程序监控”数据集,其中包含以下数据:{“service”:“api-server”,“message”:“用户登录成功”,“duration_ms”:45,“status_code”:200,“endpoint”:“/api/login”,“timestamp”:“2025-03-25T14:30:00Z”}

此事件表示用户登录操作成功,耗时 45 毫秒完成。

您现在可以在 Honeycomb 仪表板中查看此事件并开始构建查询来分析您的数据。

## Error Handling This MCP server returns error information in a consistent format. When an error occurs, the following structure is returned: ```json { "error": { "message": "Detailed error description", "code": "ERROR_CODE" } }

常见错误代码

  • AUTH_ERROR :身份验证失败。请检查您的 API 密钥。

  • NOT_FOUND :未找到请求的资源。

  • INVALID_PARAMETER :一个或多个参数无效。

  • RATE_LIMIT :已达到 Honeycomb API 速率限制。

  • SERVER_ERROR :发生内部服务器错误。

故障排除提示

  1. 身份验证问题

    • 确保您的HONEYCOMB_API_KEY设置正确

    • 验证 API 密钥是否具有适当的权限

  2. 未找到数据集

    • 确认数据集 slug 正确(检查是否有拼写错误)

    • 确保数据集存在于您的 Honeycomb 帐户中

  3. 查询执行问题

    • 验证查询参数的格式是否正确

    • 检查查询中的列名是否与数据集中的列名匹配

贡献

欢迎为 Honeycomb MCP 服务器做出贡献!贡献方式如下:

开发设置

  1. 分叉存储库

  2. 克隆你的 fork

    git clone https://github.com/your-username/honeycomb-mcp-server.git
  3. 安装依赖项

    npm install
  4. 进行更改

  5. 运行构建

    npm run build
  6. 在本地测试您的更改

拉取请求流程

  1. 创建功能分支

    git checkout -b feat-your-feature-name
  2. 按照常规提交格式提交您的更改

    git commit -m "feat: add new feature"
  3. 推送到你的 fork

    git push origin feat-your-feature-name
  4. 打开拉取请求

编码标准

  • 所有新代码均使用 TypeScript

  • 遵循现有的代码风格

  • 为公共 API 添加注释

  • 为新功能编写测试

执照

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

Related MCP Servers

View all related MCP servers

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/kajirita2002/honeycomb-mcp-server'

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