Test Webhooks in Cursor and Claude with MCP
Connect the OpenWebhook MCP server to Cursor or Claude Code, list custom endpoints, watch a slug, and wait for the next webhook from the chat.
The OpenWebhook MCP server lets an AI coding agent list your Pro endpoints, watch a slug, and block until the next HTTP request arrives. The same revocable token used by the CLI authenticates it. Nothing is written to stdout except JSON-RPC.
Install the public package:
npm install --global openwebhook
Tools
| Tool | Purpose |
|---|---|
list_endpoints |
Slugs and IDs on the account |
create_endpoint |
Create a custom slug |
delete_endpoint |
Delete by endpoint ID |
watch |
Start an in-memory SSE buffer (up to 100 events) |
unwatch |
Stop the stream and drop the buffer |
wait_for_webhook |
Block until the next event (timeout_ms, max 300000) |
Payloads stay in the MCP process only. They are not written to disk.
Claude Code
claude mcp add openwebhook \
--env OPENWEBHOOK_TOKEN=owh_live_YOUR_TOKEN \
-- openwebhook mcp
Run /mcp and confirm openwebhook is connected. Then ask: “List my OpenWebhook endpoints.”
Cursor
Add a project or user MCP server that runs openwebhook mcp with OPENWEBHOOK_TOKEN. Restart the agent after saving.
If the GUI cannot find the binary, use the absolute path from which openwebhook, or:
{
"mcpServers": {
"openwebhook": {
"command": "npx",
"args": ["-y", "openwebhook", "mcp"],
"env": {
"OPENWEBHOOK_TOKEN": "owh_live_YOUR_TOKEN"
}
}
}
}
A complete loop
- Ask the agent to
watchyour slug (for examplebilling). - Ask it to
wait_for_webhookwith a 60 second timeout. - In another terminal:
curl -X POST \
'https://hooks.openwebhook.co/billing/probe' \
-H 'content-type: application/json' \
--data '{"from":"mcp"}'
The agent should return the method, path, headers and body. That proves the stream ticket, token, and tool wiring work.
When to use MCP versus the CLI
Use openwebhook listen --port when a real local HTTP server must receive the request. Use MCP when you want the payload inside the chat to write a handler, compare headers, or generate a test.
See Forward webhooks to localhost for the listen path.