Back to Home
vercel icon

mcp-handler

Verified Safe

by vercel

Overview

Provides a Vercel adapter for the Model Context Protocol (MCP), enabling real-time communication between applications and AI models through Next.js or Nuxt.

Installation

Run Command
npm run dev

Environment Variables

  • REDIS_URL
  • KV_URL

Security Notes

The code correctly handles proxy headers (X-Forwarded-Host, X-Forwarded-Proto, Forwarded) to prevent URL spoofing and ensure accurate public-facing URLs. It implements Bearer token authentication following MCP Authorization Specification, including checks for required tokens, scopes, and token expiration, and returns appropriate WWW-Authenticate headers. Explicit CORS headers are set for OAuth metadata endpoints. For Server-Sent Events (SSE), it integrates with Redis for messaging, relying on secure external configuration of the Redis URL via environment variables. Comprehensive cleanup logic for SSE connections helps prevent resource leaks and potential denial-of-service issues. No instances of 'eval', code obfuscation, hardcoded secrets, or overtly malicious patterns were identified. Security heavily depends on the secure configuration of its host environment (e.g., Next.js/Nuxt) and Redis.

Similar Servers

Stats

Interest Score98
Security Score8
Cost ClassLow
Stars541
Forks71
Last Update2026-01-09

Tags

AIAPI AdapterVercelNext.jsReal-time