mcp-handler

mcp-handler is a Vercel/Next.js (and Nuxt) adapter that lets you expose Model Context Protocol (MCP) servers over web transports such as Streamable HTTP and Server-Sent Events (SSE). It provides a createMcpHandler wrapper to register MCP tools with input schemas and handler functions, then exports Next.js route handlers for GET/POST.

Evaluated Mar 30, 2026 (22d ago)
Homepage ↗ Repo ↗ Ai Ml mcp nextjs nuxt sse streamable-http tool-calling typescript vercel
⚙ Agent Friendliness
52
/ 100
Can an agent use this?
🔒 Security
52
/ 100
Is it safe for agents?
⚡ Reliability
31
/ 100
Does it work consistently?

Score Breakdown

⚙ Agent Friendliness

MCP Quality
70
Documentation
60
Error Messages
0
Auth Simplicity
55
Rate Limits
15

🔒 Security

TLS Enforcement
70
Auth Strength
55
Scope Granularity
30
Dep. Hygiene
55
Secret Handling
50

README warns about a vulnerability in @modelcontextprotocol/sdk versions prior to 1.26.0, which is a positive signal. However, the provided content does not specify how authentication is enforced in the handler, what authorization primitives/scopes exist, how errors are serialized (possible info leakage), or how rate limits are configured. TLS enforcement is assumed via typical Next.js/Vercel HTTPS defaults, but not explicitly documented in the excerpt.

⚡ Reliability

Uptime/SLA
0
Version Stability
55
Breaking Changes
40
Error Recovery
30
AF Security Reliability

Best When

You want a lightweight way to host MCP tool endpoints inside a web framework (Next.js/Nuxt) and have clients connect via HTTP/SSE.

Avoid When

You cannot implement appropriate authentication/authorization and input constraints for tool execution, or you need a standalone MCP server binary/service with robust ops tooling.

Use Cases

  • Expose custom MCP tools from a Next.js API route
  • Connect desktop/IDE MCP clients (via Streamable HTTP or SSE) to an app-backed tool registry
  • Build tool-calling features with typed inputs using zod validation

Not For

  • A public, unauthenticated MCP endpoint for untrusted clients
  • Environments that require first-class enterprise features (contract testing, detailed SLAs) without additional infrastructure

Interface

REST API
Yes
GraphQL
No
gRPC
No
MCP Server
Yes
SDK
No
Webhooks
No

Authentication

Methods: OAuth and token verification (documented in docs/AUTHORIZATION.md)
OAuth: Yes Scopes: No

README indicates an Authorization doc exists, but the provided content does not include concrete auth method details, scope model, or required headers/query parameters.

Pricing

Free tier: No
Requires CC: No

No pricing information provided; appears to be an open-source npm package.

Agent Metadata

Pagination
none
Idempotent
False
Retry Guidance
Not documented

Known Gotchas

  • Tool handler side effects: idempotency is not documented, so retries could duplicate actions unless your tool logic is safe.
  • SSE resumability depends on optional Redis integration; without Redis behavior may differ under reconnects.
  • Authentication requirements are likely important for safe public deployment, but the provided README excerpt does not show enforcement details.

Alternatives

Full Evaluation Report

Comprehensive deep-dive: security analysis, reliability audit, agent experience review, cost modeling, competitive positioning, and improvement roadmap for mcp-handler.

AI-powered analysis · PDF + markdown · Delivered within 30 minutes

$99

Package Brief

Quick verdict, integration guide, cost projections, gotchas with workarounds, and alternatives comparison.

Delivered within 10 minutes

$3

Score Monitoring

Get alerted when this package's AF, security, or reliability scores change significantly. Stay ahead of regressions.

Continuous monitoring

$3/mo

Scores are editorial opinions as of 2026-03-30.

8642
Packages Evaluated
17761
Need Evaluation
586
Need Re-evaluation
Community Powered