-
Notifications
You must be signed in to change notification settings - Fork 0
RFC: Dynamic webhook middleware for ToolHive #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jhrozek
previously approved these changes
Jan 15, 2026
Contributor
jhrozek
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is great, I left some questions inline, but I'd love to see this along with some example webhooks implemented.
Port proposal from toolhive PR #2300. This RFC introduces a dynamic webhook middleware system inspired by Kubernetes admission webhooks, enabling external services to participate in the MCP request pipeline. Signed-off-by: Juan Antonio Osorio <ozz@stacklok.com>
Signed-off-by: Juan Antonio Osorio <ozz@stacklok.com>
- Add HMAC payload signing to Security section (defense-in-depth) - Wrap MCP payload in mcp_request container for mutating webhooks - Add mcp_version field to webhook request formats - Clarify vMCP context fields (server_name vs backend_server) - Add signing_secret_ref to configuration examples - Promote HMAC signing to Phase 1, remove from Phase 3 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1b8ba30 to
0d6157b
Compare
Contributor
Author
|
Addressed all the feedback! Here's a quick summary:
Thanks for the thorough review @jhrozek! |
jhrozek
approved these changes
Jan 19, 2026
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Port proposal from toolhive PR #2300.
Introduces a dynamic webhook middleware system for ToolHive that enables external services to participate in the MCP request pipeline, inspired by Kubernetes admission webhooks.
Problem
Organizations need to integrate ToolHive with existing enterprise systems (policy engines, SIEM, ticketing, HR, CMDB) but currently require forking ToolHive and maintaining custom builds to add new middleware functionality.
Solution
Two new webhook types:
Key Features
--webhook-config webhook.yaml)version: v0.1.0) for evolutionUse Cases
Architecture
Webhooks integrate into existing middleware chain:
Multiple webhooks execute sequentially in configuration order.