@modelcontextprotocol/node weekly downloads statistics
By modelcontextprotocol (8 listings) · npm · MCP servers
Model Context Protocol implementation for TypeScript - Node.js middleware
@modelcontextprotocol/node has 2,059,121 recorded weekly downloads on npm, an increase of 26.3% over the past 30 days, ranking #163 of 2,391 tracked listings.
About @modelcontextprotocol/node
@modelcontextprotocol/node
Node.js adapters for the MCP TypeScript server SDK.
This package is a thin Node.js integration layer for @modelcontextprotocol/server. It provides a Streamable HTTP transport that works with Node’s IncomingMessage / ServerResponse.
For web‑standard runtimes (Cloudflare Workers, Deno, Bun, etc.), use WebStandardStreamableHTTPServerTransport from @modelcontextprotocol/server directly.
Install
npm install @modelcontextprotocol/server @modelcontextprotocol/node
Exports
NodeStreamableHTTPServerTransportStreamableHTTPServerTransportOptions(type alias forWebStandardStreamableHTTPServerTransportOptions)toNodeHandler(handler, opts?)— adapt a web-standard{ fetch }MCP handler to a Node(req, res, parsedBody?)handlerhostHeaderValidation(allowedHostnames)/localhostHostValidation()—Hostheader guards for hand-wirednode:httpserversoriginValidation(allowedOriginHostnames)/localhostOriginValidation()—Originheader guards for hand-wirednode:httpserversToNodeHandlerOptions,FetchLikeMcpHandler,NodeMcpRequestHandler(types fortoNodeHandler)toWebRequest(req, parsedBody?, opts?)— the NodeIncomingMessage→ web-standardRequestconversiontoNodeHandlerperforms internally, exported on its own (for example to feedisLegacyRequest()from a hand-wired(req, res)handler)ToWebRequestOptions(options type fortoWebRequest)NodeIncomingMessageLike,NodeServerResponseLike(structural Node request/response shapes)
Usage
Express + Streamable HTTP
import { createMcpExpressApp } from '@modelcontextprotocol/express';
import { NodeStreamableHTTPServerTransport } from '@modelcontextprotocol/node';
import { McpServer } from '@modelcontextprotocol/server';
const app = createMcpExpressApp();
app.post('/mcp', async (req, res) => {
// Stateless example: create a server and a transport per request.
const server = new McpServer({ name: 'my-server', version: '1.0.0' });
const transport = new NodeStreamableHTTPServerTransport({ sessionIdGenerator: undefined });
await server.connect(transport);
// If you use Express JSON parsing, pass the pre-parsed body to avoid re-reading the stream.
await transport.handleRequest(req, res, req.body);
});
Node.js http server
Plain node:http has no middleware chain, so bind loopback explicitly and
compose the Host/Origin guards in front of the transport — matching the
defaults the framework app factories (createMcpExpressApp,
createMcpHonoApp, createMcpFastifyApp) apply for you. The guards answer
rejected requests with 403 themselves and return false, so the handler
must not touch the request further.
import { createServer } from 'node:http';
import { localhostHostValidation, localhostOriginValidation, NodeStreamableHTTPServerTransport } from '@modelcontextprotocol/node';
import { McpServer } from '@modelcontextprotocol/server';
const validateHost = localhostHostValidation();
const validateOrigin = localhostOriginValidation();
createServer(async (req, res) => {
if (!validateHost(req, res) || !validateOrigin(req, res)) return;
const server = new McpServer({ name: 'my-server', version: '1.0.0' });
const transport = new NodeStreamableHTTPServerTransport({ sessionIdGenerator: undefined });
await server.connect(transport);
await transport.handleRequest(req, res);
}).listen(3000, '127.0.0.1');
Description from the npm listing.
- modelcontextprotocol
- mcp
- node.js
- middleware
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
7/30/90-day growth
Ranking history
Listing placement
Listing placement
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 (544)Similar npm MCP servers plugins
All 20 @modelcontextprotocol/node alternativesData 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/@modelcontextprotocol/node. First seen Oct 16, 2026; last successful collection Oct 21, 2026. See the methodology.