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: net_clientConfiguration (* required)
options
object
The client kind mcp specific options.
options:
server: https://upstream.example.com/mcpoptions.server*
string
URL of the upstream MCP server to forward requests to. Must match ^https?://.
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: net_client
when:
- tool:
- get_weather
- exit: net_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
stringorarrayofstring
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
stringorarrayofstring
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
stringorarrayofstring
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[].exit
string
Next binding when following this route.
exit
string
Default exit binding when no conditional routes are viable.
exit: echo_servertelemetry
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.

