Skip to content

feat: MCP Streamable HTTP transport + protocol version bump #381

Closed

Description

@ajianaz

Motivation

The MCP spec (2025-06-18) defines two standard transports: stdio and Streamable HTTP. The legacy HTTP+SSE transport from protocol version 2024-11-05 is now deprecated.

Uteke currently has two separate binaries with a transport gap:

Binary Transport Status
uteke-mcp stdio (JSON-RPC over stdin/stdout) ✅ implemented
uteke-server HTTP REST (not MCP) ❌ no JSON-RPC
both Streamable HTTP ❌ not implemented
both SSE (legacy, deprecated) ❌ not implemented

Additionally, uteke-mcp advertises protocolVersion: "2024-11-05" (the old spec version). The current spec is 2025-06-18.

Sources:

  • crates/uteke-mcp/src/main.rs:170 — protocolVersion: "2024-11-05"
  • crates/uteke-server/src/main.rs — pure REST routes (/remember, /recall, …), no JSON-RPC handling
  • MCP Transports spec (2025-06-18)

Proposal

1. Bump protocolVersion to 2025-06-18

uteke-mcp and any new HTTP MCP endpoint must negotiate the current protocol version.

2. Add Streamable HTTP transport to uteke-server

Expose a single MCP endpoint (e.g. POST /mcp) on the existing HTTP server that:

  • Accepts JSON-RPC messages (initialize / tools/list / tools/call / notifications/initialized).
  • Returns either Content-Type: application/json (single response) or Content-Type: text/event-stream (SSE stream) per spec § "Streamable HTTP".
  • Validates the Accept: application/json, text/event-stream header.
  • Implements Mcp-Session-Id session management (optional but recommended for stateful servers).
  • Supports DELETE /mcp for session termination.
  • Includes the MCP-Protocol-Version header on all post-initialize responses.

This lets remote MCP clients (Claude Desktop, web clients, etc.) talk to uteke over HTTP instead of having to spawn a subprocess — important for Docker / server deployments.

3. Backward-compat (optional, defer if low demand)

For pre-2025-06-18 clients: keep the old GET /sse + POST /messages endpoints alive alongside the new /mcp endpoint, as the spec recommends in § "Backwards Compatibility".

Scope

  • Bump protocolVersion to 2025-06-18 in uteke-mcp initialize response.
  • Extract the JSON-RPC dispatcher (handle_request) from uteke-mcp into a reusable module so both transports share tool definitions and handlers.
  • Add POST /mcp (and optional GET/DELETE) to uteke-server implementing Streamable HTTP.
  • Validate Accept header, return SSE or JSON content type accordingly.
  • Implement Mcp-Session-Id session management (generate on initialize, require on subsequent requests).
  • Add MCP-Protocol-Version header handling on responses.
  • Security: validate Origin header; bind localhost by default; reuse existing --auth-token bearer auth.
  • Tests: initialize handshake, tools/list, tools/call over HTTP; session lifecycle; invalid session 404.
  • Docs: docs/cli-reference.md or a new docs/mcp.md covering both transports.

Non-Goals

  • Full SSE streaming of long-running tool results (premature — tools/call results are fast).
  • Replacing the REST API on /remember etc. — those stay for non-MCP clients.
  • WebSocket transport (not in spec).

Dependencies

  • None blocking. Refactor of handle_request is the only cross-crate change.

References

Activity

  1. added
    enhancement
    scope:cli
    type:feature
    scope:server
    on Jun 18, 2026
  2. added 4 commits that reference this issue on Jun 19, 2026
  3. added a commit that references this issue on Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementpriority:mediumscope:cliscope:servertype:feature

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions