Repository navigation
Labels
enhancementNew feature or request
Description
Summary
Implement the mcp · client binding (in the same binding-mcp module). Accepts mcp streams and produces http, ws, or sse streams to upstream MCP servers.
Stream type
- Accepts:
mcp - Produces:
http/ws/sse
Responsibilities
- Maintains persistent connection to upstream MCP servers
- Forwards
tools/list,resources/list, andprompts/listupstream; refreshes on change notification - Handles upstream MCP wire protocol (HTTP, WebSocket, or SSE)
authorizationoptions declare how to inject exchanged credentials as headers — consistent with themqtt · clientpattern- Route
withblock sets:scheme,:authority, and:pathheaders on the produced http stream - No toolkit awareness — toolkit handling is fully owned by
mcp · proxyupstream
Configuration
mcp_client_github0:
type: mcp
kind: client
options:
authorization:
oauth_github0:
credentials:
headers:
authorization: Bearer {credentials}
routes:
- exit: sys:http_client
with:
headers:
":scheme": https
":authority": mcp.github.com
":path": /mcpCallback stream handling
When a callback mcp stream arrives (OAuth authorization code callback from the browser):
- Validates the nonce from the OAuth
stateparameter usingstore.getAndDelete— atomic, prevents replay, multi-replica safe - Signals the referenced guard to exchange the authorization code for an access token
- Guard writes the token to the store keyed by
(user, audience, scope) - Returns an HTTP success page to the user's browser
Notes
- The destination host and port are not statically configured — they are derived from
:authorityin theHttpBeginExproduced by this binding (seebinding-http: derive ProxyBeginEx from :authority) - A single
sys:http_clientinstance can serve allmcp_clientexits; each stream is independently routed to its correct upstream
Additional Context
Metadata
Metadata
Assignees
Labels
enhancementNew feature or request
Activity
feat(binding-mcp): implement mcp client binding (#1670)
feat(binding-mcp): implement mcp·client binding (#1670)
feat(binding-mcp): add mcp·client binding and merge mcp·server (#1670)
feat(binding-mcp): add prompts.get and resources.read scenarios (#1670)
fix(binding-mcp): fix doData field ordering in McpClientFactory (#1670)
feat(binding-mcp): implement mcp client binding
feat(binding-mcp): implement mcp client binding (#1711)