Transform
Transform changes a payload's representation as it moves through the gateway, so an AI agent and an upstream MCP server or API don't have to agree on the same wire format. It's built on the view option of a schema-backed model, the same mechanism Kafka Gateway uses to present JSON to clients while storing Avro or Protobuf on the topic.
How It Works
The avro and protobuf models accept a view, which transforms the model from its wire format to the view format when producing, and back from the view format to the wire format when consuming:
model: avro
view: json
catalog:
schema_registry:
- strategy: topicWith this configuration, a payload validated as avro on the wire is presented as json to whatever reads it next, and a json payload written back is converted to avro before it's validated and forwarded. See the Avro and Protobuf reference for the full set of options.
Applying It on mcp-http
view is a property of the model itself, not of a specific binding. The mcp-http proxy binding's schemas.input/schemas.output (see Validate) are converters using that same model/catalog shape:
schemas:
output:
model: avro
view: json
catalog:
my_catalog:
- subject: create_pr_result
version: latestWith view: json added, an upstream that returns Avro-encoded data is presented to the agent as structuredContent decoded to JSON, the same translation Kafka Gateway performs on a topic's value.
When to Use It
Reach for Transform when an agent expects one representation of a payload (typically JSON) while the upstream system or a compliance requirement calls for another (Avro or Protobuf). Rather than writing a translation layer in the agent or the upstream service, the view transform does it at the gateway, in configuration.
Next Steps
- Schema Enforcement covers each schema-backed model type that supports a
view. - Validate covers rejecting a payload that doesn't conform to a schema in the first place.

