MCP: add reusable protocol and transport foundations #45

Closed
opened 2026-12-03 10:24:26 +00:00 by faumaray · 1 comment
Owner

Context: Forge exposes authenticated remote Streamable HTTP and a stdio bridge. Forge tracks this as VL-MCP-01.

Current behavior: the existing RPC is unary /void-rpc/v1/call with a custom binary Wire v1 envelope; it is not MCP. Strict JSON and networking are reusable. No MCP adapter was located in the inspected module inventory.

Need: pin modern behavior to the 2026-07-28 spec: per-request metadata, JSON-RPC framing, Streamable HTTP responses and stdio transport, with an authorization callback boundary.

Proposed API: MCP::Envelope, RequestMetadata, bounded framing/codec functions and transport bindings. Older initialization/session semantics belong in an explicit compatibility adapter with its own fixtures. Forge owns tool schemas, domain dispatch, consent, scope mapping, audit and OAuth integration.

Tests/gate: malformed/oversized messages, metadata mismatches, version negotiation, cancellation, slow readers, clean stdio framing and separate legacy fixtures. Depends on duplex HTTP streaming. Preserve the existing RPC unchanged. Forge gates M17 on this.

Context: Forge exposes authenticated remote Streamable HTTP and a stdio bridge. Forge tracks this as VL-MCP-01. Current behavior: the existing RPC is unary /void-rpc/v1/call with a custom binary Wire v1 envelope; it is not MCP. Strict JSON and networking are reusable. No MCP adapter was located in the inspected module inventory. Need: pin modern behavior to the 2026-07-28 spec: per-request metadata, JSON-RPC framing, Streamable HTTP responses and stdio transport, with an authorization callback boundary. Proposed API: MCP::Envelope, RequestMetadata, bounded framing/codec functions and transport bindings. Older initialization/session semantics belong in an explicit compatibility adapter with its own fixtures. Forge owns tool schemas, domain dispatch, consent, scope mapping, audit and OAuth integration. Tests/gate: malformed/oversized messages, metadata mismatches, version negotiation, cancellation, slow readers, clean stdio framing and separate legacy fixtures. Depends on duplex HTTP streaming. Preserve the existing RPC unchanged. Forge gates M17 on this.
Author
Owner

Implemented on branch issue-45-mcp (commit 32569bb): new Void::MCP module with MCP::Envelope, RequestMetadata, bounded JSON-RPC framing/codec, Streamable HTTP and stdio transport bindings, an authorization callback boundary, and a separate legacy compatibility adapter. Merged into main as 6e636d2. Verified with Testing;MCP and -Werror: 635 tests, 632 passed, 3 skipped. The existing unary /void-rpc/v1/call RPC is unchanged. Pushed to origin/main. Closing as done.

Implemented on branch `issue-45-mcp` (commit `32569bb`): new `Void::MCP` module with `MCP::Envelope`, `RequestMetadata`, bounded JSON-RPC framing/codec, Streamable HTTP and stdio transport bindings, an authorization callback boundary, and a separate legacy compatibility adapter. Merged into `main` as `6e636d2`. Verified with `Testing;MCP` and `-Werror`: 635 tests, 632 passed, 3 skipped. The existing unary `/void-rpc/v1/call` RPC is unchanged. Pushed to origin/main. Closing as done.
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Void/Library#45