# Streamable HTTP MCP (/v1/mcp), RFC 9728 Protected Resource Metadata & Device Pairing Explained

Updated: 2026-11-30 · Pillar: Context Engineering & Memory Benchmarks · Target Query: mcp oauth 2.1 flow · Canonical: https://memoreal.kolivri.com/articles/streamable-http-mcp-oauth-2-1-discovery

## Direct Answer (TL;DR)

Legacy stdio MCP servers require local process execution, creating security and deployment hurdles for remote agent infrastructure. Streamable HTTP MCP transforms Model Context Protocol servers into scalable cloud endpoints mounted at /v1/mcp. By adopting RFC 9728 Protected Resource Metadata and RFC 8628 Device Authorization Grants, agents authenticate headlessly using 8-character verification codes and scoped Bearer tokens, eliminating static secret exposure and enabling seamless remote tool execution.

## Key Benchmarks & Metrics

- **RFC 9728** — Protected Resource Metadata discovery specification (IETF OAuth Working Group Standard)
- **RFC 8628** — OAuth 2.0 Device Authorization Grant for headless CLI pairing (IETF Standard Specification)
- **/v1/mcp** — Streamable HTTP MCP endpoint with SSE fallback (Memoreal Cloud Protocol Architecture)

## Legacy Stdio MCP vs Streamable HTTP MCP Architecture

| Feature / Capability | Legacy Stdio MCP | Standard REST Tool Calling | Streamable HTTP MCP (/v1/mcp) |
| --- | --- | --- | --- |
| Transport Layer | Local stdin / stdout process pipe launched by host client | Stateless HTTP POST / GET requests over standard web ports | Streamable HTTP with Server-Sent Events (SSE) bidirectional streaming |
| Authentication Protocol | Static environment variables or plain API keys in local config files | API keys or custom bearer tokens passed in headers | OAuth 2.1 RFC 9728 discovery with RFC 8628 headless device authorization |
| Deployment Topology | Must run locally on developer workstation or inside heavy container | Remote web server hosting microservices | Multi-tenant cloud service with server card discovery and zero local dependencies |
| Interactive Authorization | Requires terminal manual key entry and config file edits | Complex browser redirects or hardcoded secret credentials | 3-click browser pairing via 8-character verification code |

## From Local Stdio to Streamable HTTP: The /v1/mcp Architecture

The Model Context Protocol originally launched with stdio transport, requiring host IDEs like Claude Desktop and Cursor to spawn local child processes. In cloud-native agent deployments, running local processes is inefficient, insecure, and incompatible with serverless environments. Streamable HTTP MCP addresses this by hosting tool endpoints over standard HTTP with Server-Sent Events (SSE) streaming at /v1/mcp, allowing remote agents to connect with zero local runtime dependencies.

- Eliminates the requirement to install Python or Node.js runtimes on developer machines.
- Provides resilient Server-Sent Events streaming for long-running tool operations.
- Allows centralized enterprise management, load balancing, and audit logging of MCP calls.

## RFC 9728 Protected Resource Metadata: Dynamic Server Card Discovery

Secure remote tool execution requires standardized protocol discovery. By adopting RFC 9728 Protected Resource Metadata, the MCP server advertises its authorization capabilities at /.well-known/oauth-protected-resource and its tool capabilities via /.well-known/mcp/server-card.json. Connecting AI agents can inspect supported OAuth grant types, token endpoints, and required scopes prior to initiating authentication handshakes.

- Protected resource metadata standardizes endpoint discovery across diverse clients.
- Server card JSON provides machine-readable capability definitions for tool catalogs.
- Prevents credential leakage by negotiating authentication parameters prior to transmission.

## RFC 8628 Device Authorization: Headless 3-Click Agent Authentication

Developers frequently operate in headless environments—such as SSH sessions, remote devcontainers, or cloud CI pipelines—where opening a local browser redirect is impossible. Streamable HTTP MCP implements RFC 8628 Device Authorization Grant. The agent CLI requests a device code, displays an 8-character user code and pairing URL, and polls the token endpoint while the developer approves the connection in their browser.

- Enables seamless browser-based authentication for headless CLI coding agents.
- Generates time-bound, scoped Bearer tokens without exposing master account credentials.
- Provides a smooth 3-click pairing flow that securely configures local MCP settings in seconds.

## Implementation Example: Connecting to Remote Streamable HTTP MCP Server with Bearer Auth

```json
{
  "mcpServers": {
    "memoreal-cloud": {
      "url": "https://memoreal.kolivri.com/v1/mcp",
      "headers": {
        "Authorization": "Bearer mem_live_948a73b2c89f1e4d"
      }
    }
  }
}
```

## Frequently Asked Questions

### What is Streamable HTTP in the Model Context Protocol?

Streamable HTTP is an MCP transport running over standard HTTP/SSE, allowing remote clients to call tools without spawning local processes.

### How does RFC 9728 Protected Resource Metadata protect MCP servers?

It advertises authorization server endpoints and supported token scopes via standard .well-known URLs before the client transmits credentials.

### Why is RFC 8628 device flow ideal for coding harnesses?

Headless developer environments like VS Code Remote or cloud containers cannot open callback URLs, making 8-character device codes the cleanest pairing mechanism.

## Related Engineering Guides

- [enterprise-ai-memory-multi-tenant-rbac-audit](https://memoreal.kolivri.com/articles/enterprise-ai-memory-multi-tenant-rbac-audit)
- [best-mcp-server-for-claude-code](https://memoreal.kolivri.com/articles/best-mcp-server-for-claude-code)
- [codex-cli-mcp-config-persistent-memory](https://memoreal.kolivri.com/articles/codex-cli-mcp-config-persistent-memory)
- [cursor-mcp-configuration-persistent-memory](https://memoreal.kolivri.com/articles/cursor-mcp-configuration-persistent-memory)

### 1-Command Setup
Run `npx -y @kolivri/memoreal-mcp setup` to install the persistent memory MCP server.
