mcp-kafka proxy
mcp-kafka proxy
The mcp-kafka proxy binding routes the same fixed set of intrinsic Kafka tools as the client kind, matching by tool name and, for produce_message and consume_messages, by topic, then dispatching each matched tools/call to the route's own exit, or the binding's top-level exit when the route has none — typically a mcp-kafka client connected to a specific Kafka cluster. Unlike client, a proxy binding has no options or vault of its own; it only routes.
mcp_kafka_proxy:
type: mcp-kafka
kind: proxy
routes:
- exit: kafka_orders_client
when:
- tool: produce_message
topics: [ orders ]
- tool: consume_messages
topics: [ orders ]
- exit: kafka_shipments_client
when:
- tool: produce_message
topics: [ shipments ]
- tool: consume_messages
topics: [ shipments ]
- exit: kafka_admin_client
guarded:
my_guard:
- kafka:admin
when:
- tool: create_topics
- tool: delete_topics
- tool: alter_topic_configs
- tool: alter_broker_configsConfiguration (* required)
exit
string
Default exit binding when no conditional routes are viable.
exit: echo_serverroutes*
arrayofobject
Conditional mcp-kafka proxy routes, matching by tool name and, for produce_message and consume_messages, by topic, then dispatching the matched tools/call unmodified to the route's own exit, or the binding's top-level exit when the route has none. At least one route is required. Routes are evaluated in order; the first matching route wins.
routes:
- exit: kafka_orders_client
when:
- tool: produce_message
topics: [ orders ]
- tool: consume_messages
topics: [ orders ]routes[].exit
string
Exit binding — typically an mcp-kafka client connected to the target Kafka cluster — that a matched tools/call is forwarded to, letting different routes forward to different clusters. Falls back to the binding's top-level exit when omitted.
routes[].when
arrayofobject
List of conditions (any match) restricting this route to particular tools.
routes:
- when:
- tool: create_topics
- tool: delete_topicswhen[].tool
string,arrayofstring
Tool name matched by tools/call. Omit to match every tool not already claimed by an earlier route.
when[].resource
string
Resource URI matched by resources/read.
when[].topics
arrayofstring
Topic name allow-list (exact names or * glob patterns) restricting this route to matching topics. Only enforced for produce_message and consume_messages, the only two tools that name a single topic as a routing key — every other tool either takes no topic or names one as a tools/call argument rather than a route match, so this list has no effect on them.
routes[].with
object
Reserved for a future per-route override. Currently has no effect: a matched tools/call is always forwarded unmodified.
routes[].guarded
objectas map of namedarrayofstring
Roles required by the named guard for a tools/call against this route. Roles for the same guard are unioned into one entry; roles naming a different guard add a separate entry that must also authorize.
routes:
- guarded:
my_guard:
- kafka:admin
exit: kafka_admin_client
when:
- tool: alter_broker_configstelemetry
object
Defines the desired telemetry for the binding.
telemetry.metrics
array
Telemetry metrics to track
telemetry:
metrics:
- stream.*telemetry.attributes
objectas map of namedstringproperties
Telemetry attributes to add to the binding metrics.

