CClaude Code Catalog
All Skills

Streamable HTTP Migrator

WorkflowIntermediate

Reviews endpoint design, session headers, origin validation, and reconnect behavior for compliance.

Trigger/mcp-transport-migrate
Frequencyone-time

Backend Developer? Run /mcp-transport-migrate to get a step-by-step migration plan for your SSE endpoints

DevOps Engineer? Validate transport compliance after infrastructure changes

Streamable HTTPMCPMigrationSSE

How It Works

/mcp-transport-migrate [server-dir] run
Phase 1: analyze current transport
endpoint-scan
Map existing HTTP+SSE endpoints
session-headers
Check Mcp-Session-Id handling
origin-check
Validate Origin header verification
reconnect
Audit reconnection behavior
Generate migration diff + rollback plan
Streamable HTTP compliant server + test results

Skill Code

# Streamable HTTP Migrator Skill ## Trigger: /mcp-transport-migrate [server-directory] When invoked: 1. Scan current transport implementation: - Identify HTTP+SSE endpoint patterns - Map event stream connections - Check session management approach - Document current reconnection logic 2. Generate migration plan: ### Endpoint Changes | Before (HTTP+SSE) | After (Streamable HTTP) | |-------------------|------------------------| | POST /message + GET /sse | POST /mcp (single endpoint) | | SSE event stream | Response body streaming | | Custom session cookies | Mcp-Session-Id header | ### Required Code Changes ```typescript // Before: separate SSE endpoint app.get('/sse', (req, res) => { res.setHeader('Content-Type', 'text/event-stream'); // ... SSE logic }); // After: single Streamable HTTP endpoint app.post('/mcp', (req, res) => { const sessionId = req.headers['mcp-session-id']; // Validate Origin header if (!isValidOrigin(req.headers.origin)) { return res.status(403).json({ error: 'Invalid origin' }); } // Stream response using chunked transfer res.setHeader('Content-Type', 'application/json'); // ... handle request with optional streaming }); ``` 3. Security checklist: - [ ] Origin header validation on all requests - [ ] Mcp-Session-Id header generation and validation - [ ] DNS rebinding protection - [ ] Proper CORS configuration - [ ] Session cleanup on DELETE /mcp 4. Output: migration diff + rollback script + test suite

Copy and paste into your CLAUDE.md to start using immediately.

How Streamable HTTP Migrator Works

Streamable HTTP Migrator scans your existing HTTP+SSE endpoints, analyzes session headers, Origin validation, and reconnection logic, then generates a migration diff and rollback plan to transition to the single POST /mcp endpoint-based Streamable HTTP model.

When to Use Streamable HTTP Migrator

Most useful when transitioning legacy HTTP+SSE MCP servers to the current Streamable HTTP transport spec, or when validating transport compliance after infrastructure changes.

Key Strengths

  • Automated HTTP+SSE to Streamable HTTP migration
  • Origin header validation + DNS rebinding protection checks
  • Mcp-Session-Id based session management auto-applied
  • Rollback script included for safe transitions

Same Category

Workflow View All

Popular in Other Categories