mcp client
mcp client
The mcp client binding forwards outbound MCP requests to an upstream MCP server.
mcp_client:
type: mcp
kind: client
options:
server: https://upstream.example.com/mcp
exit: sys:http_clientConfiguration (* required)
options*
object
The client kind mcp specific options.
options:
server: https://upstream.example.com/mcpoptions.server*
string| Pattern:^https?://
URL of the upstream MCP server to forward requests to.
options.authorization
objectas map of namedobjectproperties
Authorization by a named guard, used to authorize outbound requests to the upstream MCP server.
authorization:
my_jwt_guard:
credentials: "Bearer {credentials}"authorization.credentials
string| Default:Bearer {credentials}
Template used to build the outbound Authorization header. When it contains the {credentials} placeholder, the placeholder is replaced with the value returned by the named guard. When omitted from the template, the header is sent as the literal template value regardless of the guard outcome.
routes
arrayofobject
Conditional mcp specific routes, resolved per matched tool, prompt, or resource, used to authorize individual tools/call, prompts/get, and resources/read requests against the upstream MCP server.
routes:
- exit: sys:http_client
when:
- tool:
- get_weather
- exit: sys:http_client
when:
- tool:
- get_status
guarded:
my_jwt_guard:
- readroutes[].guarded
objectas map of namedarrayofstring
Roles required by the named guard. When a guarded route matches a requested tool, prompt, or resource, the session must be authorized for the listed roles, otherwise the request is rejected. Also drives which entries are stamped with securitySchemes in tools/list responses.
routes:
- guarded:
my_jwt_guard:
- readroutes[].when
arrayofobject
List of conditions (any match) to match this route. Read more: When a route matches
when[].tool
string,arrayofstring
Glob patterns of tool names to match, where * matches any sequence of characters. A bare string is shorthand for a single-element array. When omitted, all tools are admitted.
when[].prompt
string,arrayofstring
Glob patterns of prompt names to match, where * matches any sequence of characters. A bare string is shorthand for a single-element array. When omitted, all prompts are admitted.
when[].resource
string,arrayofstring
Glob patterns of resource URIs to match, where * matches any sequence of characters. A bare string is shorthand for a single-element array. When omitted, all resources are admitted.
routes[].with
object
Reserved for a future per-route override. Currently has no effect: a matched request is always forwarded unmodified.
routes[].exit
string
Next binding when following this route. At least one route must declare its own exit unless the binding declares a top-level exit.
exit
string
Default exit binding when no conditional routes are viable. Required unless every route declares its own exit.
exit: sys:http_clienttelemetry
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.

