What’s New in MCP 2025‑03‑26? A Deep Dive into OAuth 2.1, Streamable HTTP, JSON‑RPC Batching and AI‑Tool Enhancements
The MCP 2025‑03‑26 release replaces the implicit OAuth 2.0 flow with mandatory OAuth 2.1 PKCE, introduces a single‑endpoint Streamable HTTP protocol, enforces JSON‑RPC batch processing, adds multimodal audio support, tool metadata annotations and progress messaging, and outlines migration steps for developers and operators.
Version Update (2025‑03‑26)
The MCP specification introduces major security, communication, and developer‑experience enhancements.
OAuth 2.1 Migration
Implicit flow removed; PKCE is mandatory.
All endpoints require HTTPS.
Access tokens are short‑lived (≤15 min) and must be rotated.
# PKCE generation (Python)
import hashlib, base64, os
code_verifier = base64.urlsafe_b64encode(os.urandom(32)).decode().rstrip('=')
code_challenge = base64.urlsafe_b64encode(hashlib.sha256(code_verifier.encode()).digest()).decode().rstrip('=')Streamable HTTP (Single‑Endpoint)
Replaces the dual HTTP + SSE model with a bidirectional, resumable HTTP connection.
Uses Accept negotiation, Mcp-Request-Id for multiplexing, and Last-Event-ID for replay.
Performance: 44 % lower connection‑setup latency (180 ms vs 320 ms) and 72 % higher reconnection success.
JSON‑RPC Batch Processing (MUST)
Requests must be a JSON array; notifications (no id) return HTTP 202. Supports atomic execution via an atomic flag.
[
{"jsonrpc":"2.0","id":1,"method":"text_analyze","params":{"text":"Hello"}},
{"jsonrpc":"2.0","id":2,"method":"image_tag","params":{"url":"img.jpg"}},
{"jsonrpc":"2.0","method":"log_event"}
]Tool Annotations
Tools can declare metadata such as title, readOnlyHint, destructiveHint, idempotentHint, and openWorldHint. Front‑ends render risk warnings and back‑ends enforce policy checks.
tools:
- name: database_backup
annotations:
title: "Database Backup"
readOnlyHint: false
destructiveHint: false
idempotentHint: true
openWorldHint: falseRich Progress Notification
A new message field allows structured status descriptions.
{
"type":"ProgressNotification",
"progress":65,
"message":{
"phase":"Data Cleaning",
"detail":"Processed 12000/20000 records",
"next_step":"Feature extraction soon"
}
}Multimodal Audio Support
Audio streams (e.g., audio/webm, audio/mp3) can be sent via chunked POST with optional X-Audio-Metadata headers for sample‑rate, channels, etc.
Parameter Completion (Completions)
Servers may expose /completions to provide context‑aware suggestions.
GET /completions?prefix=dat
Response: ["date_format","data_source","dataset"]Session Management
All requests include Mcp-Session-Id (UUIDv7).
Clients store the last Event-ID and resend Last-Event-ID on reconnection to resume streams without data loss.
Mcp-Session-Id: sess_XYZ123
Last-Event-ID: 159Migration Guide (Sample Code)
// OAuth 2.1 PKCE flow (JavaScript)
const { verifier, challenge } = generatePKCE();
startAuthFlow(challenge);
function handleCallback(code) {
fetchToken(code, verifier).then(token => {
secureStorage.save('mcp_token', token);
callMCPService(token);
});
}Impact Summary
Security: Mandatory PKCE, HTTPS, short‑lived tokens, token binding.
Performance: Up to 43 % lower latency, 72 % higher reconnection success, ~85 % less network overhead.
Developer Experience: Auto‑completion, rich progress UI, unified transport, mandatory batch processing.
Ecosystem: Audio streams, tool risk annotations, secure session handling.
Alibaba Cloud Native
We publish cloud-native tech news, curate in-depth content, host regular events and live streams, and share Alibaba product and user case studies. Join us to explore and share the cloud-native insights you need.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
