Webhook消息服务

一款支持通过MCP协议向任意Webhook端点发送消息的服务,适用于通知、警报和自动化消息传递。

  • by kevinwatt
  • JavaScript
  • 本地部署
  • 30 星标
  • 更新于
在 GitHub 查看 kevinwatt/mcp-webhook

使用说明

🪝 mcp webhook

强大的MCP服务器,为您的AI代理提供webhook消息传递功能

通过Claude、Dive和其他MCP兼容的AI系统向任何webhook端点发送消息。非常适合通知、警报和自动消息传递。

特性 • 安装 • 工具 • 用法 • 配置


✨ 特性

🌐 通用Webhook支持

  • 适用于任何webhook端点
  • 兼容Discord、Slack、Mattermost
  • 自定义HTTP POST请求
  • JSON有效载荷格式

🎨 定制

  • 自定义显示名称(用户名)
  • 头像URL支持
  • 灵活的消息内容
  • 易于与任何平台集成

🔌 MCP集成

  • 与Dive Desktop配合使用
  • 克劳德桌面兼容
  • 游标、VS代码支持
  • 任何兼容MCP的LLM

🛡️ 简单安全

  • 最小配置
  • 环境变量支持
  • 无跟踪或分析
  • 麻省理工学院许可

🚀 安装

入门指南

将以下配置添加到MCP客户端:

{
  "mcpServers": {
    "webhook": {
      "command": "npx",
      "args": ["-y", "@kevinwatt/mcp-webhook"],
      "env": {
        "WEBHOOK_URL": "your-webhook-url"
      }
    }
  }
}

MCP客户端配置

Dive
  1. 打开 潜水桌面
  2. 点击 “+添加MCP服务器”
  3. 粘贴上面提供的配置
  4. 点击 “保存” 你准备好了!
Claude Code

使用Claude Code CLI添加webhook MCP服务器(引导):

claude mcp add webhook -- npx @kevinwatt/mcp-webhook

然后在您的环境或配置中设置webhook URL。

Claude Desktop

添加到您的 claude_desktop_config.json:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • 窗户: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "webhook": {
      "command": "npx",
      "args": ["-y", "@kevinwatt/mcp-webhook"],
      "env": {
        "WEBHOOK_URL": "your-webhook-url"
      }
    }
  }
}
Cursor

首选 Cursor Settings -> MCP -> New MCP Server.使用上面提供的配置。

VS Code / Copilot

通过VS Code CLI安装:

code --add-mcp '{"name":"webhook","command":"npx","args":["-y","@kevinwatt/mcp-webhook"],"env":{"WEBHOOK_URL":"your-webhook-url"}}'

或者跟随 MCP安装指南 使用上面的标准配置。

Windsurf

跟随 配置MCP指南 使用上面的标准配置。

Cline

跟随 临床MCP配置指南 并使用上面提供的配置。

Warp

首选 Settings | AI | Manage MCP Servers -> + Add 到 添加MCP服务器.使用上面提供的配置。

JetBrains AI Assistant

首选 Settings | Tools | AI Assistant | Model Context Protocol (MCP) -> Add.使用上面提供的配置。

通过Smithery安装

通过以下方式自动安装适用于Claude Desktop的MCP Webhook服务器 史密瑟里:

npx -y @smithery/cli install @kevinwatt/mcp-webhook --client claude

手动安装

npm install -g @kevinwatt/mcp-webhook

🛠️ 可用工具

Tool Description
send_message

向配置的webhook端点发送消息

  • 参数:
    • content (字符串,必填):要发送的消息内容
    • username (字符串,可选):自定义显示名称
    • avatar_url (字符串,可选):自定义头像URL
  • 退货:成功/失败状态

💡 使用示例

基本消息

"Send a message to webhook: Hello World!"
"Send 'Build completed successfully' to the webhook"
"Notify the team: Deployment finished"

自定义用户名

"Send a message with username 'Deploy Bot': Production update complete"
"Send content='Server restarted', username='System Monitor'"

与阿凡达

"Send a message with custom avatar: content='Alert!', avatar_url='https://example.com/alert.png'"

自动化示例

"Send a webhook message when the build completes"
"Notify via webhook: All tests passed!"
"Send deployment status to the webhook channel"

🔧 配置

环境变量

变量 描述 必填
WEBHOOK_URL webhook端点URL 是

示例配置

Discord Webhook:

{
  "env": {
    "WEBHOOK_URL": "https://discord.com/api/webhooks/..."
  }
}

Slack传入Webhook:

{
  "env": {
    "WEBHOOK_URL": "https://hooks.slack.com/services/..."
  }
}

Mattermost Webhook:

{
  "env": {
    "WEBHOOK_URL": "https://your-mattermost.com/hooks/..."
  }
}

🏗️ 建筑

构建于

  • MCP-SDK -模型上下文协议
  • 阿西奥斯 -HTTP客户端
  • TypeScript -类型安全和开发人员经验

主要特点

  • ✅ 简单:最少的设置,只需提供一个webhook URL
  • ✅ 灵活的:适用于任何与webhook兼容的服务
  • ✅ 类型安全:完全支持TypeScript
  • ✅ 轻量级:最小依赖性

🤝 贡献

欢迎投稿!

  1. 克隆该仓库
  2. 创建要素分支(git checkout -b feature/amazing-feature)
  3. 提交您的更改(git commit -m 'Add amazing feature')
  4. 推到分支(git push origin feature/amazing-feature)
  5. 打开拉取请求

📝 许可证

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


🙏 致谢


📚 相关项目


⬆ 返回顶部