@webhooks-cc/mcp 1.13.0 → 1.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +55 -29
- package/dist/bin/mcp.js +503 -199
- package/dist/chunk-RHQD2GRD.mjs +1819 -0
- package/dist/index.d.mts +21 -9
- package/dist/index.d.ts +21 -9
- package/dist/index.js +467 -173
- package/dist/index.mjs +161 -1649
- package/dist/tools.d.mts +171 -0
- package/dist/tools.d.ts +171 -0
- package/dist/tools.js +1827 -0
- package/dist/tools.mjs +34 -0
- package/package.json +8 -3
package/README.md
CHANGED
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
MCP server for [webhooks.cc](https://webhooks.cc). It gives coding agents direct access to webhook testing workflows: create endpoints, send signed test webhooks, inspect captures, compare attempts, verify signatures, and read recent webhook context through MCP resources.
|
|
4
4
|
|
|
5
|
-
It works with Claude Code, Cursor, VS Code, Codex, Windsurf, and Claude Desktop.
|
|
5
|
+
It works with Claude Code, Cursor, VS Code, Codex, Windsurf, and Claude Desktop. Hosted agents such as claude.ai and ChatGPT use the [remote server](#remote-server) at `https://webhooks.cc/mcp` instead.
|
|
6
6
|
|
|
7
7
|
## Install
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
No API key is needed. Without one, the server starts with the full tools for the account a human connected the agent to before, or else in the keyless [agent sandbox](#without-an-api-key-the-agent-sandbox). It reads:
|
|
10
10
|
|
|
11
|
+
- `WHK_API_KEY` (optional) for an API key, which always wins over a saved connection
|
|
12
|
+
- `WHK_AGENT_FILE` for where the sandbox and the connection are saved (default `~/.config/whk/agent.json`, see [the agent credential file](#the-agent-credential-file))
|
|
11
13
|
- `WHK_BASE_URL` for a custom API base URL
|
|
12
14
|
- `WHK_WEBHOOK_URL` for a custom receiver base URL
|
|
13
15
|
|
|
@@ -21,33 +23,45 @@ The plugin installs the server together with a webhook testing skill that tells
|
|
|
21
23
|
|
|
22
24
|
For other agents, `npx skills add kroqdotdev/webhooks-cc` installs the same skill. See [Agent skill](https://webhooks.cc/docs/mcp/skills).
|
|
23
25
|
|
|
26
|
+
### Remote server
|
|
27
|
+
|
|
28
|
+
`https://webhooks.cc/mcp` serves the same tools over streamable HTTP, with nothing to install. The client opens webhooks.cc in the browser once; the human signs in and clicks Connect (OAuth 2.1 with PKCE, no code to type), and can disconnect it later under Account, Connected agents.
|
|
29
|
+
|
|
30
|
+
- **claude.ai and Claude Desktop**: Settings, Connectors, add a custom connector with the URL `https://webhooks.cc/mcp`
|
|
31
|
+
- **ChatGPT**: add it as a custom connector (developer mode)
|
|
32
|
+
- **Claude Code**: `claude mcp add --transport http webhooks-cc https://webhooks.cc/mcp`
|
|
33
|
+
- **Cursor** (`.cursor/mcp.json`): `{ "mcpServers": { "webhooks-cc": { "url": "https://webhooks.cc/mcp" } } }`
|
|
34
|
+
- **VS Code** (`.vscode/mcp.json`): `{ "servers": { "webhooks-cc": { "type": "http", "url": "https://webhooks.cc/mcp" } } }`
|
|
35
|
+
|
|
36
|
+
A client that can send headers may use an API key instead: `Authorization: Bearer whcc_...`. The remote server has 44 tools: `send_to` and `replay_request` are left out and `targetUrl` is refused, because a hosted server cannot reach your machine, and waits are capped at 50 seconds. It needs an account (no sandbox), and serves tools only, without prompts or resources.
|
|
37
|
+
|
|
24
38
|
### One-click
|
|
25
39
|
|
|
26
40
|
- **Cursor**: [Add to Cursor](https://cursor.com/en/install-mcp?name=webhooks-cc&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkB3ZWJob29rcy1jYy9tY3AiXSwiZW52Ijp7IldIS19BUElfS0VZIjoid2hjY18uLi4ifX0=)
|
|
27
41
|
- **VS Code**: [Add to VS Code](https://insiders.vscode.dev/redirect/mcp/install?name=webhooks-cc&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40webhooks-cc%2Fmcp%22%5D%2C%22env%22%3A%7B%22WHK_API_KEY%22%3A%22%24%7Binput%3Awhk_api_key%7D%22%7D%7D&inputs=%5B%7B%22id%22%3A%22whk_api_key%22%2C%22type%22%3A%22promptString%22%2C%22description%22%3A%22webhooks.cc%20API%20key%20%28get%20yours%20at%20webhooks.cc%2Faccount%29%22%2C%22password%22%3Atrue%7D%5D)
|
|
28
42
|
|
|
43
|
+
Both links set `WHK_API_KEY`; to start without a key, use the commands below.
|
|
44
|
+
|
|
29
45
|
### CLI
|
|
30
46
|
|
|
31
47
|
```bash
|
|
32
48
|
# Claude Code
|
|
33
|
-
claude mcp add -s user --transport stdio webhooks-cc
|
|
49
|
+
claude mcp add -s user --transport stdio webhooks-cc -- npx -y @webhooks-cc/mcp
|
|
34
50
|
|
|
35
51
|
# OpenAI Codex
|
|
36
|
-
codex mcp add webhooks-cc
|
|
37
|
-
|
|
38
|
-
#
|
|
39
|
-
npx @webhooks-cc/mcp setup
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
npx @webhooks-cc/mcp setup
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
npx @webhooks-cc/mcp setup windsurf --api-key whcc_...
|
|
46
|
-
|
|
47
|
-
# Claude Desktop
|
|
48
|
-
npx @webhooks-cc/mcp setup claude-desktop --api-key whcc_...
|
|
52
|
+
codex mcp add webhooks-cc -- npx -y @webhooks-cc/mcp
|
|
53
|
+
|
|
54
|
+
# Or let setup write the config
|
|
55
|
+
npx @webhooks-cc/mcp setup claude-code
|
|
56
|
+
npx @webhooks-cc/mcp setup cursor
|
|
57
|
+
npx @webhooks-cc/mcp setup vscode
|
|
58
|
+
npx @webhooks-cc/mcp setup codex
|
|
59
|
+
npx @webhooks-cc/mcp setup windsurf
|
|
60
|
+
npx @webhooks-cc/mcp setup claude-desktop
|
|
49
61
|
```
|
|
50
62
|
|
|
63
|
+
To start with an API key, add `-e WHK_API_KEY=whcc_...` to the `mcp add` commands, or `--api-key whcc_...` to `setup`.
|
|
64
|
+
|
|
51
65
|
### Manual config
|
|
52
66
|
|
|
53
67
|
```json
|
|
@@ -64,11 +78,11 @@ npx @webhooks-cc/mcp setup claude-desktop --api-key whcc_...
|
|
|
64
78
|
}
|
|
65
79
|
```
|
|
66
80
|
|
|
67
|
-
Get your API key at [webhooks.cc/account/api-keys](https://webhooks.cc/account/api-keys).
|
|
81
|
+
Leave out `env` to start without a key. Get your API key at [webhooks.cc/account/api-keys](https://webhooks.cc/account/api-keys).
|
|
68
82
|
|
|
69
83
|
## What it exposes
|
|
70
84
|
|
|
71
|
-
The server exposes `
|
|
85
|
+
The server exposes `46` tools, `3` prompts, and `3` resource surfaces with an API key, the same `46` tools and the prompts with a saved connection, and `11` sandbox tools otherwise. The remote server exposes `44` tools.
|
|
72
86
|
|
|
73
87
|
### Endpoint tools
|
|
74
88
|
|
|
@@ -76,6 +90,7 @@ The server exposes `39` tools, `3` prompts, and `3` resource surfaces with an AP
|
|
|
76
90
|
- `list_endpoints`
|
|
77
91
|
- `get_endpoint`
|
|
78
92
|
- `update_endpoint`
|
|
93
|
+
- `preview_response`
|
|
79
94
|
- `delete_endpoint`
|
|
80
95
|
- `create_endpoints`
|
|
81
96
|
- `delete_endpoints`
|
|
@@ -103,19 +118,24 @@ Every endpoint on an account receives email at `{slug}@mailhooks.cc` (and `{slug
|
|
|
103
118
|
- `get_email`
|
|
104
119
|
- `wait_for_email`
|
|
105
120
|
- `send_test_email`
|
|
121
|
+
- `render_email` (an email in Postmark, SendGrid, Mailgun or CloudMailin shape, optionally posted to your local inbound handler)
|
|
106
122
|
|
|
107
123
|
The request tools and resources return emails too (filter with `kind`), without the raw message or the HTML part and with the text cut at 8,000 characters; `get_email` returns the HTML.
|
|
108
124
|
|
|
109
125
|
### Forwarding tools
|
|
110
126
|
|
|
111
|
-
|
|
112
|
-
|
|
127
|
+
Send captured HTTP requests and emails to up to 10 destinations (your servers, Slack or Discord
|
|
128
|
+
channels, Zapier or n8n), each with its own kinds, conditions, format (as received, signed JSON,
|
|
129
|
+
a JSON body you shape with placeholders, or a chat message), throttle, delay and signing secret,
|
|
130
|
+
retried and logged (owner only):
|
|
113
131
|
|
|
114
|
-
- `
|
|
115
|
-
- `
|
|
116
|
-
- `
|
|
117
|
-
- `
|
|
118
|
-
- `
|
|
132
|
+
- `list_destinations`, `add_destination`, `update_destination`, `remove_destination`
|
|
133
|
+
- `preview_destination` (dry run: does the filter pass, and the exact request it would send)
|
|
134
|
+
- `configure_forwarding` (the primary destination: URL, on/off, kinds, format, your headers, path, retries, order, sent time field)
|
|
135
|
+
- `get_forwarding_secret` (returns a destination's `whsec_` secret; with `rotate: true`, replaces it)
|
|
136
|
+
- `test_forwarding` (sends one request to a destination and reports the answer)
|
|
137
|
+
- `list_deliveries` (the delivery log with its counts, by destination, or every try of one request)
|
|
138
|
+
- `redeliver` (one request, to one destination or all, or every failed delivery of an endpoint)
|
|
119
139
|
|
|
120
140
|
### Send and test tools
|
|
121
141
|
|
|
@@ -141,13 +161,19 @@ Endpoints shared with you already appear in `list_endpoints` (with `fromTeam`) a
|
|
|
141
161
|
|
|
142
162
|
### Without an API key: the agent sandbox
|
|
143
163
|
|
|
144
|
-
Started without `WHK_API_KEY`, the server registers sandbox tools instead ([auth.md](https://webhooks.cc/auth.md)):
|
|
164
|
+
Started without `WHK_API_KEY`, the server starts with the full tools when [the agent credential file](#the-agent-credential-file) holds a live connection to a human's account. Otherwise it registers sandbox tools instead ([auth.md](https://webhooks.cc/auth.md)):
|
|
145
165
|
|
|
146
166
|
- `create_endpoint`, `list_endpoints`, `get_endpoint`, `delete_endpoint`, `list_requests`, `get_request`, `wait_for_request`, `generate_payload_schema`: the same names and arguments as the full tools, in a sandbox of up to 3 endpoints, 25 captured requests each and 100 in all, for 24 hours. The first `create_endpoint` registers it (a few seconds of proof of work).
|
|
147
|
-
- `connect_account`: returns a link and a 6-digit code for a human to connect the agent to their account.
|
|
148
|
-
- `wait_for_connection`: waits for the human, then replaces the sandbox tools with the full tools for that account (`notifications/tools/list_changed`).
|
|
167
|
+
- `connect_account`: returns a link and a 6-digit code for a human to connect the agent to their account. Pass the email they sign in to webhooks.cc with.
|
|
168
|
+
- `wait_for_connection`: waits for the human, then replaces the sandbox tools with the full tools for that account (`notifications/tools/list_changed`) and saves the connection.
|
|
149
169
|
- `about_sandbox`: the limits and how to connect, without a network call.
|
|
150
170
|
|
|
171
|
+
The human approves the agent once: later sessions start connected, for 90 days. When they disconnect the agent under Account, Connected agents, the sandbox tools come back. A sandbox made in an earlier session cannot move into the account, because only the process that registered holds the claim token; `connect_account` then connects through a new registration and says so, and the old endpoints stay in the sandbox until they expire.
|
|
172
|
+
|
|
173
|
+
### The agent credential file
|
|
174
|
+
|
|
175
|
+
The sandbox and the connection are saved in `~/.config/whk/agent.json` (`$XDG_CONFIG_HOME/whk/agent.json` when set; `~/Library/Application Support/whk/agent.json` on macOS; `%APPDATA%\whk\agent.json` on Windows), or wherever `WHK_AGENT_FILE` points. The [TypeScript](https://webhooks.cc/docs/sdk), [Python](https://webhooks.cc/docs/sdk/python) and [Go](https://webhooks.cc/docs/sdk/go) SDKs and the [`whk` CLI](https://webhooks.cc/docs/cli/commands#sandbox) share it, so a connection made in one works in all of them. It is written atomically with mode `0600`, holds identity assertions and short-lived tokens (never the claim token), and an API key always wins over it. The format is described in [AI agents](https://webhooks.cc/docs/agents#the-agent-credential-file) and specified in [agent-credentials.md](https://github.com/kroqdotdev/webhooks-cc/blob/main/packages/sdk/conformance/agent-credentials.md).
|
|
176
|
+
|
|
151
177
|
## Prompts
|
|
152
178
|
|
|
153
179
|
The server exposes MCP prompts for common workflows:
|
|
@@ -225,7 +251,7 @@ Typical agent flows:
|
|
|
225
251
|
|
|
226
252
|
## Programmatic use
|
|
227
253
|
|
|
228
|
-
The package also exports `createServer()`, `registerTools()`, `registerPrompts()`, and `registerResources()` if you want to embed the server yourself.
|
|
254
|
+
The package also exports `createServer()`, `registerTools()`, `registerSandboxTools()`, `registerPrompts()`, and `registerResources()` if you want to embed the server yourself. `createServer()` without `apiKey` takes `credentialsFile` (a path, or `false` to keep the sandbox and the connection in memory). `registerTools(server, client, { remote: true })` applies the remote server's restrictions; it is also exported from `@webhooks-cc/mcp/tools`.
|
|
229
255
|
|
|
230
256
|
```ts
|
|
231
257
|
import { createServer } from "@webhooks-cc/mcp";
|