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 分