@webhooks-cc/mcp 1.14.0 → 1.15.1

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 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
+ The easiest way in is the [remote server](#remote-server) at `https://webhooks.cc/mcp`, for any client that can add a remote MCP server (Claude Code, Cursor, VS Code, Codex, claude.ai, ChatGPT): you approve it once in your browser, with no key and nothing to install. This package is the local server, for sends to a handler on your machine, its prompts and resources, a keyless sandbox, and CI. It works with Claude Code, Cursor, VS Code, Codex, Devin Desktop (formerly Windsurf), and Claude Desktop.
6
6
 
7
7
  ## Install
8
8
 
9
- The server reads `WHK_API_KEY` from the environment. It also supports:
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,46 @@ 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 Code**: `claude mcp add -s user --transport http webhooks-cc https://webhooks.cc/mcp`, then `/mcp` in Claude Code to sign in
31
+ - **Codex**: `codex mcp add webhooks-cc --url https://webhooks.cc/mcp` (it opens the browser to sign in; if it does not, `codex mcp login webhooks-cc`)
32
+ - **Cursor** (`.cursor/mcp.json`): `{ "mcpServers": { "webhooks-cc": { "url": "https://webhooks.cc/mcp" } } }`
33
+ - **VS Code** (`.vscode/mcp.json`): `{ "servers": { "webhooks-cc": { "type": "http", "url": "https://webhooks.cc/mcp" } } }`
34
+ - **claude.ai and Claude Desktop**: Settings, Connectors, add a custom connector with the URL `https://webhooks.cc/mcp`
35
+ - **ChatGPT**: add it as a custom connector (developer mode)
36
+
37
+ 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.
38
+
24
39
  ### One-click
25
40
 
26
41
  - **Cursor**: [Add to Cursor](https://cursor.com/en/install-mcp?name=webhooks-cc&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkB3ZWJob29rcy1jYy9tY3AiXSwiZW52Ijp7IldIS19BUElfS0VZIjoid2hjY18uLi4ifX0=)
27
42
  - **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
43
 
44
+ Both links set `WHK_API_KEY`; to start without a key, use the commands below.
45
+
29
46
  ### CLI
30
47
 
31
48
  ```bash
32
49
  # Claude Code
33
- claude mcp add -s user --transport stdio webhooks-cc -e WHK_API_KEY=whcc_... -- npx -y @webhooks-cc/mcp
50
+ claude mcp add -s user --transport stdio webhooks-cc -- npx -y @webhooks-cc/mcp
34
51
 
35
52
  # OpenAI Codex
36
- codex mcp add webhooks-cc -e WHK_API_KEY=whcc_... -- npx -y @webhooks-cc/mcp
37
-
38
- # Cursor
39
- npx @webhooks-cc/mcp setup cursor --api-key whcc_...
40
-
41
- # VS Code
42
- npx @webhooks-cc/mcp setup vscode --api-key whcc_...
43
-
44
- # Windsurf
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_...
53
+ codex mcp add webhooks-cc -- npx -y @webhooks-cc/mcp
54
+
55
+ # Or let setup write the config
56
+ npx @webhooks-cc/mcp setup claude-code
57
+ npx @webhooks-cc/mcp setup cursor
58
+ npx @webhooks-cc/mcp setup vscode
59
+ npx @webhooks-cc/mcp setup codex
60
+ npx @webhooks-cc/mcp setup devin # Devin Desktop, formerly Windsurf ("windsurf" works too)
61
+ npx @webhooks-cc/mcp setup claude-desktop
49
62
  ```
50
63
 
64
+ To start with an API key, add `-e WHK_API_KEY=whcc_...` to the `mcp add` commands, or `--api-key whcc_...` to `setup`.
65
+
51
66
  ### Manual config
52
67
 
53
68
  ```json
@@ -64,11 +79,11 @@ npx @webhooks-cc/mcp setup claude-desktop --api-key whcc_...
64
79
  }
65
80
  ```
66
81
 
67
- Get your API key at [webhooks.cc/account/api-keys](https://webhooks.cc/account/api-keys).
82
+ 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
83
 
69
84
  ## What it exposes
70
85
 
71
- The server exposes `46` tools, `3` prompts, and `3` resource surfaces with an API key, and `11` sandbox tools without one.
86
+ 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
87
 
73
88
  ### Endpoint tools
74
89
 
@@ -147,13 +162,19 @@ Endpoints shared with you already appear in `list_endpoints` (with `fromTeam`) a
147
162
 
148
163
  ### Without an API key: the agent sandbox
149
164
 
150
- Started without `WHK_API_KEY`, the server registers sandbox tools instead ([auth.md](https://webhooks.cc/auth.md)):
165
+ 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)):
151
166
 
152
167
  - `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).
153
- - `connect_account`: returns a link and a 6-digit code for a human to connect the agent to their account.
154
- - `wait_for_connection`: waits for the human, then replaces the sandbox tools with the full tools for that account (`notifications/tools/list_changed`).
168
+ - `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.
169
+ - `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.
155
170
  - `about_sandbox`: the limits and how to connect, without a network call.
156
171
 
172
+ 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.
173
+
174
+ ### The agent credential file
175
+
176
+ 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).
177
+
157
178
  ## Prompts
158
179
 
159
180
  The server exposes MCP prompts for common workflows:
@@ -231,7 +252,7 @@ Typical agent flows:
231
252
 
232
253
  ## Programmatic use
233
254
 
234
- The package also exports `createServer()`, `registerTools()`, `registerPrompts()`, and `registerResources()` if you want to embed the server yourself.
255
+ 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`.
235
256
 
236
257
  ```ts
237
258
  import { createServer } from "@webhooks-cc/mcp";