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

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
Also in MCP servers and chat-host apps
RankProjectScore
1mcp-typescript-templateExpress and Effect template for a stateless remote MCP server58 stars, MIT60 out of 100
2template-mcp-serverPython FastMCP server template with OAuth, OpenShift manifests and CI66 stars, Apache-2.047 out of 100
#4openai-apps-sdk-examplesExample MCP servers and widgets for ChatGPT apps on the Apps SDK2.4k stars, MIT33 out of 100
#5mcp-forgeGo MCP server template with OAuth discovery and JWT validation98 stars, Apache-2.024 out of 100