33rd of 5 in MCP servers and chat-host apps
mcp-for-next.js
Stateless MCP server route for a Next.js App Router app
Live demo ↗
(opens in a new tab)Website ↗
(opens in a new tab)Repository on GitHub ↗
(opens in a new tab)
- Stars
- 373
- License
- MIT
- Last commit
- Jul 2026
- Language
- JavaScript
Overview
Next.js App Router project where app/mcp/route.ts hosts a stateless MCP server through mcp-handler 2 and the MCP TypeScript SDK v2, serving the 2026-07-28 protocol natively with a compatibility layer for 2025-era Streamable HTTP clients. Includes a sample client script that lists tools and calls echo. For teams adding an MCP endpoint to an existing Next.js app on Vercel; no auth is wired.
Who it is for: Next.js teams exposing tools to MCP clients
Strengths
- Stateless Streamable HTTP; no Redis or session store required
- Current 2026-07-28 protocol plus 2025 Streamable HTTP compatibility
- Sample client script for smoke-testing the endpoint
Weaknesses
- No auth; remote MCP clients will need OAuth added
- Deprecated HTTP+SSE transport is not supported
- Only an echo tool; the README is a few lines
- No tests or Docker
What it needs
- JavaScript, MCP TypeScript SDK v2, mcp-handler 2
Also in MCP servers and chat-host apps
See all 5| Rank | Project | Score |
|---|---|---|
| 1 | mcp-typescript-templateExpress and Effect template for a stateless remote MCP server | 60 out of 100 |
| 2 | template-mcp-serverPython FastMCP server template with OAuth, OpenShift manifests and CI | 47 out of 100 |
| #4 | openai-apps-sdk-examplesExample MCP servers and widgets for ChatGPT apps on the Apps SDK | 33 out of 100 |
| #5 | mcp-forgeGo MCP server template with OAuth discovery and JWT validation | 24 out of 100 |