# mcp-handler

> Hosts MCP servers inside Next.js, Nuxt, SvelteKit, Hono, and other Fetch-based JavaScript apps with one Web-standard request handler.

## Facts

- **Provider:** [Vercel](https://vercel.com)
- **Homepage:** https://github.com/vercel-labs/mcp-handler
- **Official:** Yes (Vercel)
- **Verified:** Verified: link and access path checked, Nov 2026
- **Last checked:** 2026-11-28
- **Endpoint health:** Live (`ok`) · checked 2026-11-28T20:19:19Z
- **Access methods:** api
- **Auth:** None (`none`)
- **Categories:** Infrastructure & Ops (`infrastructure`), Code & DevTools (`code-devtools`)
- **Tags:** mcp-server-framework, nextjs, typescript, streamable-http, mcp-auth, vercel, open-source
- **Streaming:** No · **Push notifications:** No

## Use it now

### API
- **Auth:** None needed
- **Docs:** https://github.com/vercel-labs/mcp-handler#quick-start-nextjs

## Try this first

Ask your coding agent:

- Use mcp-handler to turn an MCP server definition: ‹what you need›
- Use mcp-handler to verify bearer tokens: ‹what you need›

## Limitations

- no MCP server

## Skills (5)

- **Create MCP Handler** (`create-mcp-handler`): Turns an MCP server definition with registered tools, prompts, and resources into a Web-standard Request-to-Response handler.
- **Serve Both Protocol Eras** (`serve-both-protocol-eras`): Serves the 2026-07-28 MCP specification natively and falls back to stateless Streamable HTTP for 2025-era clients.
- **Verify Bearer Tokens** (`verify-bearer-tokens`): Verifies bearer tokens with withMcpAuth and answers 401 or 403 with RFC 9728 WWW-Authenticate challenges.
- **Serve Resource Metadata** (`serve-resource-metadata`): Serves the RFC 9728 Protected Resource Metadata document that lists your MCP server's authorization servers.
- **Trace MCP Messages** (`trace-mcp-messages`): Emits one OpenTelemetry span per MCP message, which Vercel's MCP observability reads to show server activity.

## Alternatives

- [MCP TypeScript SDK](https://agentswitchboard.dev/agents/mcp-typescript-sdk.md) (`mcp-typescript-sdk`): Both offer API. In common: streamable http, protocol, typescript.
- [MCP Python SDK](https://agentswitchboard.dev/agents/mcp-python-sdk.md) (`mcp-python-sdk`): Both offer API. In common: streamable http, framework.
- [Scalekit](https://agentswitchboard.dev/agents/scalekit.md) (`scalekit`): Both offer API. In common: serve, auth, tokens.
- [OpenMetadata](https://agentswitchboard.dev/agents/openmetadata.md) (`openmetadata`): Both offer API. In common: metadata, trace.
- [msgboard](https://agentswitchboard.dev/agents/msgboard.md) (`msgboard`): Both offer API. In common: auth, messages.

All 8 alternatives: https://agentswitchboard.dev/agents/mcp-handler/alternatives · Compare side by side: https://agentswitchboard.dev/compare?a=mcp-handler&b=mcp-typescript-sdk&c=mcp-python-sdk

## For agents

- Listing JSON: https://agentswitchboard.dev/api/agents/mcp-handler
- Alternatives JSON: https://agentswitchboard.dev/api/agents/mcp-handler/alternatives
- MCP server (organic, no auth): https://agentswitchboard.dev/api/mcp
- Site guide: https://agentswitchboard.dev/llms.txt · Full index: https://agentswitchboard.dev/llms-full.txt
- Canonical HTML page: https://agentswitchboard.dev/agents/mcp-handler
