feat(binding-mcp-http): implement mcp_http · proxy binding#1708
Open
jfallows wants to merge 3 commits into
Open
feat(binding-mcp-http): implement mcp_http · proxy binding#1708jfallows wants to merge 3 commits into
jfallows wants to merge 3 commits into
Conversation
Implements the mcp_http · proxy binding that accepts mcp streams and produces http streams, mapping MCP tool calls to HTTP requests with configurable method and header routing via routes[].with. https://claude.ai/code/session_0174raBeXFTgt98bp4DTyRDm
…xy inner classes with state tracking - Rename McpHttpProxy to McpProxy (MCP side) per CLAUDE.md cross-protocol proxy naming - Add McpHttpState utility class with per-direction bitmask state tracking - Add OctetsFW emptyRO flyweight on factory for no-payload operations - Remove LinkedHashMap allocation on BEGIN path (hot path fix) - Remove -XX:+UseCompactObjectHeaders JVM flag (Java 21 incompatible) https://claude.ai/code/session_0174raBeXFTgt98bp4DTyRDm
- Add specs/binding-mcp-http.spec/src/main/resources/META-INF/zilla/mcp.idl defining the mcp scope with McpBeginExFW (kind: string16) flyweight - Add 'mcp' to scopeNames in runtime/binding-mcp-http/pom.xml so the flyweight-maven-plugin generates McpBeginExFW during build Without this IDL the McpBeginExFW import referenced in McpHttpProxyFactory could not be satisfied; the type is now generated from the mcp scope at generate-sources phase. 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
runtime/binding-mcp-httpmodule implementing themcp_http · proxybindingmcpstreams and produceshttpstreams, mapping MCP tool calls to downstream HTTP requestswith.method(HTTP verb) andwith.headers(static or${args.x}-substituted headers) for each matched routeMcpHttpBindingFactorySpi(typemcp_http),McpHttpOptionsConfigAdapter,McpHttpConditionConfigAdapter, andMcpHttpWithConfigAdaptervia SPI andmodule-info.javaspecs/binding-mcp-http.specmodule with JSON schema patch definingkind: proxy,options.tools,routes[].when.tool, androutes[].with.method/headersruntime/pom.xmlandspecs/pom.xmlTest plan
./mvnw install -DskipTests -pl runtime/binding-mcp-http -ampassesMcpHttpBindingFactorySpiregisters type"mcp_http"correctlymcp.http.schema.patch.jsonvalidatestype: mcp_http, kind: proxyconfigsMcpHttpOptionsConfigAdapterround-tripstoolsmap (with description + input/output schemas)McpHttpConditionConfigAdapterround-tripstoolandresourcefieldsMcpHttpWithConfigAdapterround-tripsmethodandheadersfields:methodheader and configured headersCloses #1675. Depends on #1668 (mcp stream type).
https://claude.ai/code/session_0174raBeXFTgt98bp4DTyRDm