feat(binding-mcp): implement mcp proxy binding#1709
Open
feat(binding-mcp): implement mcp proxy binding#1709
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
McpProxyFactoryimplementing themcp · proxybinding kind inruntime/binding-mcpMcpProxyStateutility class for bit-flag state machine (initial/reply open/closed tracking)PROXYkind inMcpBindingContextalongside existingSERVERkindMcpConditionConfig,McpConditionConfigBuilder,McpConditionConfigAdapterwithtoolkitandcapabilityfields for route matchingresolveRoutes(toolkit, capability)toMcpBindingConfigandmatches(toolkit, capability)predicate toMcpRouteConfigpom.xmlfiles forbinding-mcp.spec,binding-mcp-http.spec,binding-mcp-openapi.spec,binding-mcp-http, andbinding-mcp-openapimodules referenced by parent pomsArchitecture
Follows the cross-protocol proxy pattern from CLAUDE.md:
McpProxyFactoryholds all*RO/*RWflyweight fields as non-static factory fieldsMcpServerinner class handles the inbound MCP side (onMcpServerMessage)McpClientinner class handles the outbound MCP side (onMcpClientMessage)McpProxyStateTest plan
./mvnw install -pl runtime/binding-mcp -am -DskipTests -DskipITskind: proxyaccepted inzilla.yamlwith toolkit/capability route conditionsCloses #1669
https://claude.ai/code/session_0174raBeXFTgt98bp4DTyRDm