Skip to content

feat(binding-mcp): implement mcp proxy binding#1709

Open
jfallows wants to merge 2 commits intodevelopfrom
feature/1669-mcp-proxy
Open

feat(binding-mcp): implement mcp proxy binding#1709
jfallows wants to merge 2 commits intodevelopfrom
feature/1669-mcp-proxy

Conversation

@jfallows
Copy link
Copy Markdown
Contributor

@jfallows jfallows commented Apr 7, 2026

Summary

  • Add McpProxyFactory implementing the mcp · proxy binding kind in runtime/binding-mcp
  • Add McpProxyState utility class for bit-flag state machine (initial/reply open/closed tracking)
  • Register PROXY kind in McpBindingContext alongside existing SERVER kind
  • Extend McpConditionConfig, McpConditionConfigBuilder, McpConditionConfigAdapter with toolkit and capability fields for route matching
  • Add resolveRoutes(toolkit, capability) to McpBindingConfig and matches(toolkit, capability) predicate to McpRouteConfig
  • Add stub pom.xml files for binding-mcp.spec, binding-mcp-http.spec, binding-mcp-openapi.spec, binding-mcp-http, and binding-mcp-openapi modules referenced by parent poms

Architecture

Follows the cross-protocol proxy pattern from CLAUDE.md:

  • McpProxyFactory holds all *RO/*RW flyweight fields as non-static factory fields
  • McpServer inner class handles the inbound MCP side (onMcpServerMessage)
  • McpClient inner class handles the outbound MCP side (onMcpClientMessage)
  • Bidirectional pass-through: DATA frames forwarded in both directions, END/ABORT/RESET propagated with safety guards using McpProxyState

Test plan

  • Build with ./mvnw install -pl runtime/binding-mcp -am -DskipTests -DskipITs
  • Verify kind: proxy accepted in zilla.yaml with toolkit/capability route conditions
  • Verify MCP stream pass-through from server side to client side
  • Verify orderly close propagation (END in both directions)
  • Verify abortive close propagation (ABORT/RESET)
  • Verify flow control (WINDOW credit) forwarded in both directions

Closes #1669

https://claude.ai/code/session_0174raBeXFTgt98bp4DTyRDm

claude added 2 commits April 7, 2026 05:29
Implements the foundational mcp binding module with server kind handler,
McpBeginEx IDL type, JSON schema patch, config adapters, and module-info.

Closes #1668

https://claude.ai/code/session_0174raBeXFTgt98bp4DTyRDm
Add McpProxyFactory and McpProxyState implementing the mcp proxy kind
in the existing binding-mcp module. The proxy kind accepts mcp streams
and fans them out to exits based on toolkit/capability route conditions.

- McpProxyFactory: server+client inner class pattern with bidirectional
  stream pass-through and proper state tracking
- McpProxyState: bit-flag state machine for initial/reply open/closed
- McpBindingContext: register PROXY kind alongside SERVER
- McpConditionConfig: extend with toolkit and capability fields
- McpConditionConfigBuilder: add toolkit() and capability() builders
- McpConditionConfigAdapter: serialize/deserialize toolkit and capability
- McpBindingConfig: add resolveRoutes(toolkit, capability) for proxy routing
- McpRouteConfig: add matches(toolkit, capability) predicate
- Stub pom.xml files for binding-mcp-http, binding-mcp-openapi and
  binding-mcp.spec modules referenced by parent poms

https://claude.ai/code/session_0174raBeXFTgt98bp4DTyRDm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

binding-mcp: implement mcp · proxy binding

2 participants