Skip to content

feat(binding-mcp-http): implement mcp_http · proxy binding#1708

Open
jfallows wants to merge 3 commits into
developfrom
feature/1675-mcp-http
Open

feat(binding-mcp-http): implement mcp_http · proxy binding#1708
jfallows wants to merge 3 commits into
developfrom
feature/1675-mcp-http

Conversation

@jfallows
Copy link
Copy Markdown
Contributor

@jfallows jfallows commented Apr 7, 2026

Summary

  • Adds runtime/binding-mcp-http module implementing the mcp_http · proxy binding
  • Accepts mcp streams and produces http streams, mapping MCP tool calls to downstream HTTP requests
  • Configures route with.method (HTTP verb) and with.headers (static or ${args.x}-substituted headers) for each matched route
  • Registers McpHttpBindingFactorySpi (type mcp_http), McpHttpOptionsConfigAdapter, McpHttpConditionConfigAdapter, and McpHttpWithConfigAdapter via SPI and module-info.java
  • Adds specs/binding-mcp-http.spec module with JSON schema patch defining kind: proxy, options.tools, routes[].when.tool, and routes[].with.method/headers
  • Registers both modules in runtime/pom.xml and specs/pom.xml

Test plan

  • Verify ./mvnw install -DskipTests -pl runtime/binding-mcp-http -am passes
  • Verify McpHttpBindingFactorySpi registers type "mcp_http" correctly
  • Verify schema patch mcp.http.schema.patch.json validates type: mcp_http, kind: proxy configs
  • Verify McpHttpOptionsConfigAdapter round-trips tools map (with description + input/output schemas)
  • Verify McpHttpConditionConfigAdapter round-trips tool and resource fields
  • Verify McpHttpWithConfigAdapter round-trips method and headers fields
  • Verify proxy relays MCP BEGIN → HTTP BEGIN with correct :method header and configured headers
  • Verify proxy forwards DATA and END frames bidirectionally between MCP and HTTP streams

Closes #1675. Depends on #1668 (mcp stream type).

https://claude.ai/code/session_0174raBeXFTgt98bp4DTyRDm

claude added 3 commits April 7, 2026 05:38
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
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-http: implement mcp_http · proxy binding

2 participants