Add proposal for dynamic webhook middleware #2300
Open
+862
−0
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
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.
Configuration Examples
CLI:
Kubernetes:
Implementation Plan
Documentation
Full proposal:
docs/proposals/THV-0000-dynamic-webhook-middleware.mdWill update filename with issue number once PR is created.
🤖 Generated with Claude Code