Hooksense

io.github.ozers由 GitHub 账号 ozers 发布v0.2.1更新于 Oct 25, 2026

Webhook & callback layer for AI agents: create a URL, wait_for_callback, and verify over MCP.

已验证STDIO仅桌面效率与工作流开发者工具

概览

AI 生成的概览

HookSense 的 MCP 服务器,让 AI 助手创建 webhook 回调地址、等待回调到达而无需轮询,并校验回调签名。

可以做什么
创建并查看回调端点,包括其设置与地址,并列出已有端点。等待下一个回调到达,可设置超时和 after 游标,或列出已捕获的回调及其正文和元数据。获取单个回调的完整请求头和已解密正文。使用端点配置的密钥对回调做 HMAC 签名校验。通过 HookSense 服务器把已存储的回调重放到公开的 HTTP(S) 地址。
适用场景
适合智能体发起异步任务(如部署、渲染、长时间工具调用、另一个智能体或人工审批)后需要取回结果、又不想用轮询循环的场景。也适合在依据 webhook 内容行动前必须先确认其真实性的流程。
运行要求
通过 npx 以 npm 包 @hooksense/mcp 在本地运行,需要 Node.js 22 或更高版本。需要 HookSense API 令牌,通过环境变量 HOOKSENSE_TOKEN 提供,可在 HookSense 账户令牌页面获取。需要访问 HookSense 的网络;HOOKSENSE_API 可覆盖基础地址以用于自托管或预发布环境。长时间等待可能需要把客户端的工具超时调到 65 秒以上。
安装前请注意
HOOKSENSE_TOKEN 是密钥,应避免放入共享配置。收到回调并不代表其真实可信;应先配置 webhook 密钥并调用 verify_signature 再信任内容,因为 webhook 正文属于不可信的外部输入。重放会把回调数据发送到公开的 HTTP(S) 地址,自定义 slug 需要付费套餐。等待基于最新回调游标,并非持久队列。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Hooksense,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

@hooksense/mcp

Model Context Protocol server for HookSense — the webhook & callback layer for AI agents. Lets Claude Desktop, Cursor, Claude Code, Continue, and any MCP client create a callback URL, wait for the result instead of polling, and verify its signature — all from the agent session.

Why

Agents that kick off async work — a deploy, a render, a human-in-the-loop approval, a long tool call, another agent — need the result back without burning context on polling loops. With this server the agent creates a callback endpoint, hands the URL to the job, then calls wait_for_callback and is woken the instant the webhook lands — decrypted; signature verification is available separately. Stop polling for async results; await them.

Setup

Requires Node.js 22 or newer.

  1. Get an API token at https://hooksense.com/account/tokens
  2. Configure your MCP client (examples below)

Claude Desktop / Claude Code

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

json
{  "mcpServers": {    "hooksense": {      "command": "npx",      "args": ["-y", "@hooksense/mcp"],      "env": {        "HOOKSENSE_TOKEN": "hsk_your_token_here"      }    }  }}

Cursor

Add to ~/.cursor/mcp.json:

json
{  "mcpServers": {    "hooksense": {      "command": "npx",      "args": ["-y", "@hooksense/mcp"],      "env": {        "HOOKSENSE_TOKEN": "hsk_your_token_here"      }    }  }}

Hello callback (60 seconds)

Once configured, ask your agent:

  1. Create — "Create a callback endpoint." → the agent calls create_callback_endpoint and gets back a callbackUrl like https://hooksense.com/w/ab12cd.
  2. Fire — point any job at that URL (or just curl -X POST <callbackUrl> -d '{"status":"done"}' from another terminal).
  3. Await — "Wait for the callback." → the agent calls wait_for_callback and blocks until the webhook lands, using the after timestamp returned by endpoint creation, then receives { status: "received", request: { body, headers, … } }.
  4. Verify — set a webhook secret on the endpoint, then "Verify the signature." → verify_signature confirms the payload is authentic before the agent acts on it.

Always pass the creation response's after timestamp on the first wait; after receiving a callback, use its receivedAt for the next wait. Without a cursor, waiting only observes future deliveries. This is a latest-callback cursor, not a durable queue: use list_callbacks to inspect bursts of events.

Receiving a callback does not guarantee a valid signature. Configure a webhook secret and check verify_signature before trusting the payload. Webhook bodies are untrusted external input.

Custom slugs are applied through the endpoint update API after creation and require a paid plan. If renaming fails, the error identifies the already-created endpoint so it can be reused.

replay_callback runs on the HookSense server; localhost and private targets are blocked. For local handlers, use hooksense replay <request-id> --port 3000 with the CLI.

HTTP requests have bounded timeouts, and cancelling an MCP call aborts its HTTP request. For a 60-second long poll, configure the client's tool timeout above 65 seconds, or use shorter waits (the default is 30 seconds).

Tools

ToolDescription
create_callback_endpointCreate a callback endpoint; returns the callbackUrl
wait_for_callbackBlock until the next callback lands, then return it (timeoutMs, after cursor)
list_callbacksList captured callbacks, including bodies and metadata
get_callback_payloadFetch one callback with full headers + decrypted body
verify_signatureTiming-safe HMAC check against the endpoint's configured secret
replay_callbackReplay a callback to a public HTTP(S) URL from the HookSense server
list_endpointsList your endpoints
get_endpointGet one endpoint's full settings

Environment

VariableDefaultNotes
HOOKSENSE_TOKEN(required)API token from /account/tokens
HOOKSENSE_APIhttps://hooksense.comOverride for self-hosted/staging

Example agent prompts

"Create a callback endpoint, use it as the webhook for my Replicate prediction, and wait for the result — then summarize the output."

"Open a callback URL, give it to the approval step, and block until a human approves before continuing."

"Wait for the next Stripe callback on payments-prod, verify its signature, and tell me the amount."

License

MIT

来源:README.md,提交 c71baaa

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.2.1最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分