Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

MCP Handler

MCP server by vercel-labs Verified · npm:mcp-handler

mcp-handler is a framework-agnostic HTTP adapter for hosting Model Context Protocol servers in JavaScript and TypeScript apps. It turns an MCP server definition into a Web-standard request handler for frameworks such as Next.js, Nuxt, SvelteKit and Hono.

  • Score 88
  • 715 stars
  • 1.8M a week
  • Updated

Install MCP Handler

Built from the published package, never by AI.

claude mcp add mcp-handler -- npx -y mcp-handler

Run in your terminal. Add --scope user to use it in every project.

Step-by-step: install MCP Handler in Claude Code

MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the mcp-handler block.

About

mcp-handler is a framework-agnostic HTTP adapter for hosting Model Context Protocol servers in JavaScript and TypeScript applications. It turns an MCP server definition into a Web-standard request handler that can be mounted in Next.js, Nuxt/Nitro, SvelteKit, Hono, and other Fetch-compatible frameworks.

It is built on MCP SDK v2 and serves the 2026-07-28 specification natively. It falls back to stateless Streamable HTTP for 2025-era clients, so one handler supports both protocol generations. It also includes withMcpAuth for bearer token checks and OpenTelemetry spans for each MCP message. It is aimed at developers who build MCP servers in Node.js 20+ applications.

Written from the project's README and checked against it.

What you need

  • Node.js 20+
  • @modelcontextprotocol/server ^2.0.0
  • zod ^4.2.0
  • A framework with Web-standard Request and Response APIs

Try asking

  • Help me mount an MCP server in my Next.js route handler
  • Add a registerTool definition with a zod input schema to my MCP server
  • Set up withMcpAuth to check bearer tokens on my MCP endpoint

Good to know

  • Frameworks based on Node.js IncomingMessage, such as Express, need a Web Request adapter or official middleware
  • HTTP+SSE transport from 2024-11-05 was removed in 2.x
  • GET and DELETE session operations answer 405 because serving is stateless
  • Requires mcp-handler 1.x for @modelcontextprotocol/sdk 1.x

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: README.md, package.json. This looks for known risky patterns and is not a full audit. How grades work

What you can do with it

  • Hosting an MCP server in Next.js
  • Serving MCP over Streamable HTTP
  • Adding bearer token checks to an MCP server

Alternatives to MCP Handler

All alternatives →

Compare with GitDiagram, mockserver or XcodeBuildMCP

MCP Handler: common questions

Does mcp-handler only work with Vercel?

No. The source says createMcpHandler returns a Web-standard request handler and is not tied to Vercel or any particular framework.

Which MCP specification versions does it support?

It serves the 2026-07-28 specification natively and uses stateless Streamable HTTP for 2025-era clients through the same handler.

Do I need Redis to run it?

No. The source says Redis is no longer needed or used in version 2.x.

How do I install MCP Handler?

In Claude Code run claude mcp add mcp-handler -- npx -y mcp-handler. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.

Is MCP Handler the official server?

MCP Handler is published by npm:mcp-handler from its verified domain in the official MCP Registry.

Is MCP Handler free?

The code is public, but no licence file was found, so check the repository before commercial use.

Is MCP Handler safe to use?

It scores 88 of 100. Grades: maintenance A, licence F, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to MCP Handler?

Similar MCP servers: GitDiagram, mockserver, XcodeBuildMCP, draw.io.

Does MCP Handler work with ChatGPT?

Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.

MCP Handler Install

Add to stack

Loading.