You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a965637
Browse filesBrowse the repository at this point in the historyBrowse files
Merge Gateway MCP write mode and the gateway_ tool rename into v3.0.0
Brings the two workstreams onto one branch for a single 3.0.0 release:
Outpost CLI support and MCP server, plus Gateway MCP write mode behind
--allow-write and the hookdeck_ -> gateway_ product tool rename.
The branches combined without textual conflict apart from README.md, but
the Outpost coverage checklist referenced the package-private actionSet
type that the Gateway work lifted into mcpcore. Git could not see that —
a clean merge that did not compile — so the checklist now reads
mcpcore.ActionSet. It is the test that fails when an action ships without
a successful-call test, so losing it would have quietly reopened the gap
it exists to close.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Wajsob136PyRh6nc92w5L3
Copy file name to clipboardExpand all lines: README.md
+50-24Lines changed: 50 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -614,55 +614,81 @@ Claude Desktop (`claude_desktop_config.json`):
614
614
615
615
The client starts `hookdeck gateway mcp` as a stdio subprocess. If you haven't authenticated yet, the `hookdeck_login` tool is available to log in via the browser.
616
616
617
+
#### Read-only by default
618
+
619
+
The server starts read-only. Tools advertise only the actions that read data, so an agent is never offered an action it cannot perform. Pass `--allow-write` (or set `HOOKDECK_MCP_ALLOW_WRITE=true`) to enable creating, changing and deleting:
620
+
621
+
```json
622
+
{
623
+
"mcpServers": {
624
+
"hookdeck": {
625
+
"command": "hookdeck",
626
+
"args": ["gateway", "mcp", "--allow-write"]
627
+
}
628
+
}
629
+
}
630
+
```
631
+
632
+
`--read-only` is accepted explicitly and wins if both are passed.
633
+
634
+
Pausing and unpausing a connection are available in **both** modes. Read-only is the mode incidents get investigated in, and stopping a misbehaving connection is the natural end of an investigation; both are reversible, and pausing buffers delivery rather than dropping events.
635
+
617
636
#### Available tools
618
637
619
-
| Tool | Description |
620
-
|------|-------------|
621
-
|`hookdeck_projects`| List projects or switch the active project for this session |
622
-
|`hookdeck_connections`| Inspect connections and control delivery flow (list, get, pause, unpause) |
623
-
|`hookdeck_sources`| Inspect inbound sources (HTTP endpoints that receive events) |
624
-
|`hookdeck_destinations`| Inspect delivery destinations (HTTP endpoints where events are sent) |
625
-
|`hookdeck_transformations`| Inspect JavaScript transformations applied to event payloads |
626
-
|`hookdeck_requests`| Query inbound requests — list, get details, raw body, linked events |
627
-
|`hookdeck_events`| Query processed events — list, get details, raw payload body |
|`hookdeck_metrics`| Query aggregate metrics — counts, failure rates, queue depth over time |
631
-
|`hookdeck_help`| Discover available tools and their actions |
632
-
633
-
`hookdeck_events` and `hookdeck_requests`**list** actions support the same filters as `hookdeck gateway event list` and `hookdeck gateway request list` — including payload search (`body`, `headers`, `parsed_query`, `path`) and date windows via `*_after` / `*_before` (ISO 8601; maps to API `field[gte]` / `field[lte]`). See `hookdeck_help` with topic `hookdeck_events` or `hookdeck_requests` for the full parameter list.
638
+
Product tools are prefixed `gateway_`. Signing in and switching project are Hookdeck operations rather than Event Gateway ones, so they keep the platform `hookdeck_` prefix and are shared with `hookdeck outpost mcp`.
`transformations run` executes code without storing anything, but it is gated as a write: a read-only session should not be able to run caller-supplied code.
656
+
657
+
`gateway_events` and `gateway_requests`**list** actions support the same filters as `hookdeck gateway event list` and `hookdeck gateway request list` — including payload search (`body`, `headers`, `parsed_query`, `path`) and date windows via `*_after` / `*_before` (ISO 8601; maps to API `field[gte]` / `field[lte]`). See `gateway_help` with topic `gateway_events` or `gateway_requests` for the full parameter list.
658
+
659
+
`gateway_help` reports which mode the session is in and lists only the actions it can perform.
634
660
635
661
#### Example prompts
636
662
637
663
Once the MCP server is configured, you can ask your agent questions like:
638
664
639
665
```
640
666
"Are any of my events failing right now?"
641
-
→ Agent uses hookdeck_issues to list open issues, then hookdeck_events to inspect recent failures.
667
+
→ Agent uses gateway_issues to list open issues, then gateway_events to inspect recent failures.
642
668
643
669
"Show me the last 10 events for my Stripe source and check if any failed."
644
-
→ Agent uses hookdeck_sources to find the Stripe source, then hookdeck_events filtered by source and status.
670
+
→ Agent uses gateway_sources to find the Stripe source, then gateway_events filtered by source and status.
645
671
646
672
"What's the error rate for my API destination over the last 24 hours?"
647
-
→ Agent uses hookdeck_metrics with measures like failed_count and count, grouped by destination.
673
+
→ Agent uses gateway_metrics with measures like failed_count and count, grouped by destination.
648
674
649
675
"Trace request req_abc123 — what events did it produce, and did they all deliver successfully?"
650
-
→ Agent uses hookdeck_requests to get the request, then the events action to list generated events.
676
+
→ Agent uses gateway_requests to get the request, then the events action to list generated events.
651
677
652
678
"Why is my checkout endpoint returning 500s? Show me the latest attempt details."
653
-
→ Agent uses hookdeck_events filtered by status FAILED, then hookdeck_attempts to inspect delivery details.
679
+
→ Agent uses gateway_events filtered by status FAILED, then gateway_attempts to inspect delivery details.
654
680
655
681
"Pause the connection between Stripe and my staging endpoint while I debug."
656
-
→ Agent uses hookdeck_connections to find and pause the connection.
682
+
→ Agent uses gateway_connections to find and pause the connection.
657
683
658
684
"Compare failure rates across all my destinations this week."
659
-
→ Agent uses hookdeck_metrics with dimensions set to destination_id and measures like error_rate.
685
+
→ Agent uses gateway_metrics with dimensions set to destination_id and measures like error_rate.
660
686
661
687
"Find Stripe charge.succeeded events from the last week."
662
-
→ Agent uses hookdeck_events list with body filter {"type":"charge.succeeded"} and created_after / created_before ISO datetimes.
688
+
→ Agent uses gateway_events list with body filter {"type":"charge.succeeded"} and created_after / created_before ISO datetimes.
663
689
664
690
"Show failed events that had delivery attempts in the last 24 hours."
665
-
→ Agent uses hookdeck_events list with status FAILED and last_attempt_after set to yesterday's ISO datetime.
691
+
→ Agent uses gateway_events list with status FAILED and last_attempt_after set to yesterday's ISO datetime.
cmd.Flags().BoolVar(allowWrite, "allow-write", false, allowWriteUsage+" Also read from "+allowWriteEnvVar+"; the flag wins.")
19
+
// Users arriving from other MCP servers type --read-only reflexively. It is
20
+
// already the default, so accept it rather than failing on an unknown flag.
21
+
cmd.Flags().BoolVar(readOnly, "read-only", false, "Run without write actions. This is the default; the flag is accepted so it can be passed explicitly, and wins over --allow-write.")
22
+
}
23
+
24
+
// resolveAllowWrite decides whether write actions are enabled.
25
+
//
26
+
// --read-only wins over everything so an explicit request for a safe session is
27
+
// never overridden; otherwise --allow-write wins over the environment variable,
28
+
// which is the more distant and easier-to-forget setting.
// allowWriteEnvVar enables write actions without a flag, for MCP clients whose
15
-
// config makes environment variables easier to set than arguments.
16
-
constallowWriteEnvVar="HOOKDECK_MCP_ALLOW_WRITE"
17
-
18
13
// publishAPIKeyEnvVar carries the Project API key the publish tool needs.
19
14
//
20
15
// It is deliberately distinct from HOOKDECK_API_KEY. That variable means
@@ -78,10 +73,8 @@ before the server runs go to stderr.`),
78
73
RunE: mc.runOutpostMCPCmd,
79
74
}
80
75
81
-
mc.cmd.Flags().BoolVar(&mc.allowWrite, "allow-write", false, "Enable tools that create, change or delete data, and that return tenant credentials. Also read from "+allowWriteEnvVar+"; the flag wins.")
82
-
// Users arriving from other MCP servers type --read-only reflexively. It is
83
-
// already the default, so accept it rather than failing on an unknown flag.
84
-
mc.cmd.Flags().BoolVar(&mc.readOnly, "read-only", false, "Run without write actions. This is the default; the flag is accepted so it can be passed explicitly, and wins over --allow-write.")
"Enable tools that create, change or delete data, and that return tenant credentials.")
85
78
// The env var is read at run time rather than used as the flag default, so a
86
79
// key that is already in the environment is not printed back out by --help.
87
80
mc.cmd.Flags().StringVar(&mc.apiKey, "publish-api-key", "", "Hookdeck Project API key, required by the publish tool. Also read from "+publishAPIKeyEnvVar+". HOOKDECK_API_KEY is deliberately not used here.")
0 commit comments