mcp-http Binding
Bindingmcp-httpclientproxy
mcp-http Binding
Defines a binding accepting mcp streams and producing http streams, terminating tools/list, resources/list, and resources/templates/list from configuration, and expanding tools/call and resources/read into upstream http requests, with client or proxy behavior.
client
The client kind mcp-http binding originates every upstream http request itself, with no exit.
mcp_http_client:
type: mcp-http
kind: client
options:
authorization:
my_guard:
credentials:
headers:
authorization: Bearer {credentials}
tools:
create_pr:
description: Create a pull request to merge one branch into another.
summary: "Created pull request #${result.number}"
schemas:
input:
model: json
catalog:
my_catalog:
- subject: create_pr_params
version: latest
output:
model: json
catalog:
my_catalog:
- subject: create_pr_result
version: latest
resources:
order:
uri: "order://{orderId}"
description: Customer order by identifier
mimeType: application/json
schemas:
output:
model: json
catalog:
my_catalog:
- subject: order_result
version: latest
routes:
- when:
- tool: create_pr
with:
headers:
":method": POST
":scheme": https
":authority": api.github.com:443
":path": /repos/${args.owner}/${args.repo}/pulls
body:
model: json
catalog:
my_catalog:
- subject: create_pr_body
version: latest
- when:
- resource: order
with:
headers:
":method": GET
":scheme": https
":authority": api.orders.internal:443
":path": /orders/${params.orderId}proxy
The proxy kind mcp-http binding dispatches every upstream http request to a route's exit instead of originating it directly.
mcp_http_proxy:
type: mcp-http
kind: proxy
options:
authorization:
my_guard:
credentials:
headers:
authorization: Bearer {credentials}
tools:
create_pr:
description: Create a pull request to merge one branch into another.
summary: "Created pull request #${result.number}"
schemas:
input:
model: json
catalog:
my_catalog:
- subject: create_pr_params
version: latest
output:
model: json
catalog:
my_catalog:
- subject: create_pr_result
version: latest
resources:
order:
uri: "order://{orderId}"
description: Customer order by identifier
mimeType: application/json
schemas:
output:
model: json
catalog:
my_catalog:
- subject: order_result
version: latest
routes:
- when:
- tool: create_pr
exit: http_client
with:
headers:
":method": POST
":scheme": https
":authority": api.github.com
":path": /repos/${args.owner}/${args.repo}/pulls
body:
model: json
catalog:
my_catalog:
- subject: create_pr_body
version: latest
- when:
- resource: order
exit: http_client
with:
headers:
":method": GET
":scheme": https
":authority": api.orders.internal
":path": /orders/${params.orderId}
