mcpField
W
webhooks.cc

webhooks.cc

远程服务
webhooks.cc开发工具2今天更新

关于 webhooks.cc

webhooks.cc 是面向编码 Agent 的 MCP 服务,用于测试 Webhook 和接收邮件。它提供端点管理、请求检查、签名验证,以及转发和工作流提示词与资源。

主要功能

  1. 01创建端点并发送测试 Webhook
  2. 02检查、搜索和比较捕获请求
  3. 03验证签名并生成负载模式
  4. 04读取和发送接收邮件
  5. 05转发请求并查看投递日志

适用场景

  1. 01测试带服务商签名的 Webhook 并检查捕获结果
  2. 02比较投递尝试并提取指定 JSON 字段
  3. 03验证已捕获请求的签名
  4. 04运行端到端 Webhook 测试流程

MCP 相关

通过 MCP 暴露用于 Webhook 和邮件测试的工具、提示词与资源。使用 API 密钥可启用完整功能;无密钥时提供受限沙盒工具和账户连接流程。

配置

远程服务无需本地安装。选择你使用的客户端,复制配置或使用一键安装。

服务地址https://webhooks.cc/mcp
一键复制安装命令
Claude CodeTerminal
Cursor.cursor/mcp.json
VS Code.vscode/mcp.json
Claude Desktopclaude_desktop_config.json
Windsurf~/.codeium/windsurf/mcp_config.json

命令在终端中运行;JSON 粘贴到对应客户端的 MCP 配置后重启。需要授权的服务会在首次连接时提示登录。

安装包
npm@webhooks-cc/mcp1.15.1

工具

11
参数类型必填说明
namestring否端点的显示名称
ephemeralboolean否创建自动过期的临时端点
expiresInstring|number否在此时长后自动过期,例如 "12h"
mockResponseobject否收到请求时返回的可选模拟响应
mockResponse.bodystring否响应正文(默认:空)。{{ placeholders }} 的值会从请求中填充:{{ json.id }}(JSON 或表单正文中的字段)、{{ body }}、{{ headers.user-agent }}、{{ query.page }}、{{ method }}、{{ path }}、{{ id }}、{{ uuid }}、{{ now }};过滤器:| default: "x"、| json、| lower、| upper、| truncate: 80
mockResponse.delayinteger否响应延迟,单位为毫秒(0-30000,默认:无)
mockResponse.statusinteger是HTTP 状态码(100-599)
mockResponse.headersobject否响应标头(默认:无);值也可以使用 {{ placeholders }}
responseRulesarray否条件响应规则。每条规则包含条件和响应。采用第一个匹配的规则。
signingHeaderstring否自定义签名标头名称。仅与 generic-hmac 提供方搭配使用。
signingSecretstring否签名密钥(在服务器端加密,绝不返回)。设置 signingProvider 时必填。
notificationUrlstring否每次捕获请求后,向此 URL POST JSON 摘要(例如,Slack/Discord webhook)
signingProviderstring否用于自动验证签名的签名提供方(例如,stripe、github、shopify)

详细介绍

@webhooks-cc/mcp

适用于 webhooks.cc 的 MCP 服务。它让编码 Agent 能直接使用 Webhook 测试工作流:创建端点、发送带签名的测试 Webhook、检查捕获记录、比较请求尝试、验证签名,并通过 MCP 资源读取近期 Webhook 上下文。

它支持 Claude Code、Cursor、VS Code、Codex、Windsurf 和 Claude Desktop。

安装

该服务从环境中读取 WHK_API_KEY。它还支持:

  • 用于自定义 API 基础 URL 的 WHK_BASE_URL
  • 用于自定义接收端基础 URL 的 WHK_WEBHOOK_URL
Claude Code 插件

该插件会一并安装服务和 Webhook 测试技能,告知 Claude 何时使用该服务:

/plugin install webhooks-cc --marketplace kroqdotdev/webhooks-cc

对于其他 Agent,运行 npx skills add kroqdotdev/webhooks-cc 即可安装相同的技能。请参阅Agent 技能。

一键安装
命令行
# Claude Code
claude mcp add -s user --transport stdio webhooks-cc -e WHK_API_KEY=whcc_... -- npx -y @webhooks-cc/mcp

# OpenAI Codex
codex mcp add webhooks-cc -e WHK_API_KEY=whcc_... -- npx -y @webhooks-cc/mcp

# Cursor
npx @webhooks-cc/mcp setup cursor --api-key whcc_...

# VS Code
npx @webhooks-cc/mcp setup vscode --api-key whcc_...

# Windsurf
npx @webhooks-cc/mcp setup windsurf --api-key whcc_...

# Claude Desktop
npx @webhooks-cc/mcp setup claude-desktop --api-key whcc_...
手动配置
{
  "mcpServers": {
    "webhooks-cc": {
      "command": "npx",
      "args": ["-y", "@webhooks-cc/mcp"],
      "env": {
        "WHK_API_KEY": "whcc_..."
      }
    }
  }
}

请在 webhooks.cc/account/api-keys 获取 API 密钥。

提供的功能

使用 API 密钥时,该服务提供 39 个工具、3 个提示词和 3 个资源接口;无需密钥时则提供 11 个沙盒工具。

端点工具
  • create_endpoint
  • list_endpoints
  • get_endpoint
  • update_endpoint
  • delete_endpoint
  • create_endpoints
  • delete_endpoints
请求工具
  • list_requests
  • search_requests
  • count_requests
  • get_request
  • wait_for_request
  • wait_for_requests
  • replay_request
  • compare_requests
  • generate_payload_schema(根据捕获的请求体生成 TypeScript、Zod、Pydantic 或 JSON Schema)
  • extract_from_request
  • verify_signature
  • clear_requests
邮件工具

账户上的每个端点都会接收发送至 {slug}@mailhooks.cc(以及 {slug}+{tag}@mailhooks.cc)的邮件。除非端点所有者关闭此功能,否则这些工具会读取邮件,并提取其中的一次性代码和主要链接:

  • list_emails
  • get_email
  • wait_for_email
  • send_test_email

请求工具和资源也会返回邮件(使用 kind 进行筛选),但不包含原始邮件或 HTML 部分,且文本会截断至 8,000 个字符;get_email 会返回 HTML。

转发工具

将每个捕获到的 HTTP 请求和邮件转发到 URL 或 Slack、Discord 频道,按接收时的原样转发、 作为带签名的 JSON 或聊天消息转发,并进行重试和记录(仅限所有者):

  • configure_forwarding(URL、启用/关闭、类型、格式、自定义标头、路径、重试次数、顺序、发送时间字段)
  • get_forwarding_secret(返回 whsec_ 密钥;设置 rotate: true 可替换该密钥)
  • test_forwarding
  • list_deliveries(查看包含数量的投递日志,或查看某个请求的每次投递尝试)
  • redeliver(重新投递单个请求,或重新投递某个端点的所有失败投递)
发送与测试工具
  • send_webhook
  • send_to
  • preview_webhook
  • test_webhook_flow
团队工具
  • list_teams
  • list_team_members
  • share_endpoint
  • unshare_endpoint

与你共享的端点会自动显示在 list_endpoints 中(带有 fromTeam),并可使用除 clear_requests 外的所有请求工具;clear_requests 仍仅限所有者使用。不会提供邀请功能:接受邀请即会占用一个付费席位。

发现与账户工具
  • list_provider_templates
  • get_usage(个人套餐以及每个已订阅团队的额度池)
  • describe
无需 API 密钥:Agent 沙盒

在未设置 WHK_API_KEY 的情况下启动时,服务会注册沙盒工具 (auth.md):

  • create_endpoint、list_endpoints、get_endpoint、delete_endpoint、list_requests、get_request、wait_for_request、generate_payload_schema:名称和参数与完整工具相同,可在沙盒中使用,最多支持 3 个端点、每个端点捕获 25 个请求、总计 100 个请求,有效期为 24 小时。首次调用 create_endpoint 时会注册端点(需要几秒钟进行工作量证明)。
  • connect_account:返回一个链接和 6 位代码,供用户将 Agent 连接到自己的账户。
  • wait_for_connection:等待用户完成操作,然后将沙盒工具替换为该账户的完整工具(notifications/tools/list_changed)。
  • about_sandbox:介绍限制和连接方式,无需网络调用。

提示词

服务提供适用于常见工作流的 MCP 提示词:

  • debug_webhook_delivery
  • setup_provider_testing
  • compare_webhook_attempts

这些提示词不会自行执行任何操作,而是为客户端提供结构化的起点,以便 Agent 完成多步骤工作。

资源

服务提供近期 Webhook 上下文的 MCP 资源:

  • webhooks://endpoints
  • webhooks://endpoint/{slug}/recent
  • webhooks://request/{id}

当客户端支持浏览资源或附加提示词/资源时,这些资源会很有用。

提供商支持

提供商模板和签名支持包括:

  • stripe
  • github
  • shopify
  • twilio
  • slack
  • paddle
  • linear
  • sendgrid
  • clerk
  • discord
  • vercel
  • gitlab
  • typeform
  • standard-webhooks
  • meta
  • lemonsqueezy
  • coinbase-commerce
  • razorpay
  • cal
  • intercom
  • telegram
  • square
  • hubspot
  • mailgun
  • calendly
  • mux
  • sentry
  • bitbucket
  • docusign
  • adyen
  • paypal
  • plaid
  • resend
  • workos

签名验证还支持:

  • 除 sendgrid(IP 允许列表)和 plaid(JWT/JWK 验证需要 Plaid API 凭据)外的所有模板提供商

使用 list_provider_templates,即可从 Agent 检查模板、默认事件、签名标头和签名要求。

工作流示例

常见的 Agent 工作流:

  • 创建临时端点,发送由提供商签名的 Webhook,并等待捕获请求
  • 使用全文筛选器搜索各端点中保留的请求
  • 比较两次 Webhook 尝试,并仅提取所需的 JSON 字段
  • 使用已知密钥验证捕获请求的签名
  • 运行 test_webhook_flow,通过一次工具调用完成创建、发送、捕获、验证、重放和清理

编程使用

如果要自行嵌入服务,软件包还导出了 createServer()、registerTools()、registerPrompts() 和 registerResources()。

import { createServer } from "@webhooks-cc/mcp";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";

const server = createServer({
  apiKey: process.env.WHK_API_KEY!,
  baseUrl: process.env.WHK_BASE_URL,
  webhookUrl: process.env.WHK_WEBHOOK_URL,
});

await server.connect(new StdioServerTransport());

对话示例

You: Create an ephemeral endpoint for GitHub webhook testing.

Agent: Created endpoint https://go.webhooks.cc/w/abc123 and marked it ephemeral.

You: Preview the signed request for a push event before sending it.

Agent: Here is the exact method, headers, and JSON body that would be sent.

You: Send it, wait for two requests, and compare them.

Agent: Sent the webhook, captured two requests, and here are the header and body differences.

文档

完整文档:webhooks.cc/docs/mcp

许可证

MIT

评论

支持 Markdown

第一次接触 MCP?

从协议是什么,到在客户端里装上第一个服务,这几条回答覆盖了大多数入门问题。

一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。