Skip to content
PluginStats

mcp-handler weekly downloads statistics

By vercel-labs (8 listings) · npm · MCP servers

Framework-agnostic HTTP adapter for Model Context Protocol servers

View on npm Fresh · Dec 6, 2026

mcp-handler has 1,789,142 recorded weekly downloads on npm, a decrease of 13.8% over the past 30 days, ranking #235 of 3,247 tracked listings.

Weekly downloads
1,789,142
Official API · Dec 5, 2026
7-day growth
+2.7%
+46.5K weekly downloads
30-day growth
-13.8%
-285.7K weekly downloads
90-day growth
+102%
+901.9K weekly downloads
Rank
#235
▼ 7 in 7 days

About mcp-handler

mcp-handler

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

Built on MCP SDK v2, it serves the 2026-07-28 MCP specification natively while transparently falling back to stateless Streamable HTTP for 2025-era clients — one handler, both protocol generations.

<p> <a href="https://vercel.com/labs#labs-products"><img alt="Vercel Labs Product" src="https://img.shields.io/badge/LABS-PRODUCT-0a0a0a.svg?style=for-the-badge&amp;logo=Vercel&amp;labelColor=000000" height="28"></a> <a href="https://www.npmjs.com/package/mcp-handler"><img alt="npm version: mcp-handler" src="https://img.shields.io/npm/v/mcp-handler.svg?style=for-the-badge&amp;labelColor=000000" height="28"></a> <a href="https://www.npmjs.com/package/mcp-handler"><img alt="License: Apache-2.0" src="https://img.shields.io/npm/l/mcp-handler.svg?style=for-the-badge&amp;labelColor=000000" height="28"></a> <a href="https://www.npmjs.com/package/mcp-handler"><img alt="npm downloads per month: mcp-handler" src="https://img.shields.io/npm/dm/mcp-handler.svg?style=for-the-badge&amp;labelColor=000000&amp;label=npm%20downloads" height="28"></a> </p>

Installation

npm install mcp-handler@^2 @modelcontextprotocol/server@^2 zod@^4

Note: mcp-handler 2.x requires the MCP SDK v2 packages (@modelcontextprotocol/server ^2.0.0), zod ^4.2.0, and Node.js 20+. If you're on @modelcontextprotocol/sdk 1.x, use mcp-handler 1.x.

Framework Compatibility

createMcpHandler returns a Web-standard request handler, so the package is not tied to Vercel or any particular framework. It can be mounted in:

  • Next.js Route Handlers
  • Nuxt/Nitro server handlers using fromWebHandler
  • SvelteKit server routes
  • Hono routes using c.req.raw
  • Other frameworks that expose Fetch-compatible Request and Response APIs

Frameworks based on Node.js IncomingMessage and ServerResponse, such as Express, require a Web Request adapter or the official MCP framework middleware.

Quick Start (Next.js)

// app/api/mcp/route.ts
import { createMcpHandler } from "mcp-handler";
import { z } from "zod";

const handler = createMcpHandler((server) => {
  server.registerTool(
    "roll_dice",
    {
      title: "Roll Dice",
      description: "Roll a dice with a specified number of sides.",
      inputSchema: z.object({
        sides: z.number().int().min(2),
      }),
    },
    async ({ sides }) => {
      const value = 1 + Math.floor(Math.random() * sides);
      return {
        content: [{ type: "text", text: `🎲 You rolled a ${value}!` }],
      };
    },
  );
});

export { handler as GET, handler as POST };

/api/mcp is a convention, not a required path. mcp-handler does not inspect the request pathname, so you can place this handler at any framework route and give clients that route's complete URL.

Connecting Clients

If your client supports Streamable HTTP, connect directly:

{
  "remote-example": {
    "url": "http://localhost:3000/api/mcp"
  }
}

For stdio-only clients, use mcp-remote:

{
  "remote-example": {
    "command": "npx",
    "args": ["-y", "mcp-remote", "http://localhost:3000/api/mcp"]
  }
}

Protocol Support

  • 2026-07-28 (current): served natively — stateless, no sessions, per-request _meta envelope, server/discover.
  • 2025-era Streamable HTTP: served via the SDK's stateless legacy fallback from the same handler. GET/DELETE session operations answer 405 (serving is stateless).
  • HTTP+SSE transport (2024-11-05): removed in 2.x. Mount only the Streamable HTTP handler; unmounted /sse and /message paths are handled by your framework. Redis is no longer needed or used.
Authorization (CIMD era)

The 2026-07-28 spec deprecates Dynamic Client Registration (DCR) in favor of Client ID Metadata Documents (CIMD), where the OAuth client identifies itself with an HTTPS URL that serves its metadata. CIMD support is advertised and implemented by your authorization server (client_id_metadata_document_supported in its RFC 8414 metadata); this package keeps your MCP server's resource-server surface up to date:

  • withMcpAuth verifies bearer tokens and answers 401/403 with RFC 9728-compliant WWW-Authenticate challenges pointing at your protected resource metadata.
  • protectedResourceHandler serves the RFC 9728 Protected Resource Metadata document listing your authorization servers.

See Authorization for wiring details.

Migrating from 1.x

  • Install @modelcontextprotocol/server (v2) and zod@^4; remove @modelcontextprotocol/sdk and redis.
  • inputSchema/argsSchema take a full Standard Schema (e.g. z.object({ ... })) instead of a raw zod shape.
  • Variadic server.tool(...) / .prompt(...) / .resource(...) are removed — use registerTool / registerPrompt / registerResource.
  • In handler callbacks, extra.authInfo is now ctx.http?.authInfo.
  • createMcpHandler(initialize, serverOptions, config) is now createMcpHandler(initialize, options) — one options object combining the SDK's server options with serverInfo, verboseLogs, and onEvent.
  • Route and transport config options from 1.x (basePath, streamableHttpEndpoint, sseEndpoint, sseMessageEndpoint, disableSse, redisUrl, maxDuration, and sessionIdGenerator) are removed. Mount the handler at the desired route instead.

Documentation…

Description from the npm listing.

  • mcp
  • vercel
  • next.js
  • ai

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

mcp-handler weekly downloads on npm, last 90 days: 1,789,142 weekly downloads as of Dec 5, 2026, +102% over 90 days.mcp-handlerWeekly downloads on npm · Last 90 days1,789,142downloads / week+102% over 90 days0500K1M1.5M2M2.5MSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
mcp-handler weekly downloads on npm, last 90 days: 1,789,142 weekly downloads as of Dec 5, 2026, +102% over 90 days.

7/30/90-day growth

mcp-handler weekly downloads growth on npm: +2.7% over 7 days, -13.8% over 30 days, +102% over 90 days.mcp-handlerWeekly downloads growth on npm1,789,142downloads / week now7-day growth+46,548 weekly downloads+2.7%30-day growth-285,697 weekly downloads-13.8%90-day growth+901,949 weekly downloads+102%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
mcp-handler weekly downloads growth on npm: +2.7% over 7 days, -13.8% over 30 days, +102% over 90 days.

Ranking history

mcp-handler npm ranking history: currently #235 (by weekly downloads).mcp-handlernpm ranking · by weekly downloads · Last 90 days#235current rank#60#80#100#120#140#160#180#200#220#240Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 17, 2026 – Dec 6, 2026 · 45 observations · Updated Dec 5, 2026pluginstats.com
mcp-handler npm ranking history: currently #235 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,083 shown · page 12, #15 (overall #235)
All npm: every listing in weekly downloads order

Listing placement

MCP servers468 listings · 24 pages · page 1, #20 (overall #20)
MCP servers: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (592)
Recent weekly downloads observations for mcp-handler
Date (UTC)Weekly downloadsChange vs. previous
1,789,142-144.5K
1,933,654+97.9K
1,835,755+86.7K
1,749,080+52.4K
1,696,714+24K
1,672,756-33.1K
1,705,842-36.8K
1,742,594-34.6K
1,777,232-107.1K
1,884,341-111.7K
1,995,998-70.1K
2,066,084-44.4K
2,110,494-23.5K
2,133,988—

Similar npm MCP servers plugins

All 20 mcp-handler alternatives

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/mcp-handler. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.