Skip to main content
Glama
Next.js MCP Server

Next.js MCP Server

by sibalarya

Example Next.js MCP Server

This template uses mcp-handler 2 and the MCP TypeScript SDK v2 to add a stateless MCP server to a Next.js App Router application.

Usage

Update app/mcp/route.ts with your tools, prompts, and resources following the MCP TypeScript SDK v2 documentation.

Start the application and connect an MCP client to:

http://localhost:3000/mcp

Related MCP server: Example Next.js MCP Server

Protocol support

  • The current 2026-07-28 MCP protocol is served natively.

  • Stateless clients using 2025-era Streamable HTTP are supported by the compatibility layer.

  • The deprecated HTTP+SSE transport is not supported. Redis is not required.

Notes for running on Vercel

Sample Client

scripts/test-client.mjs connects over Streamable HTTP, lists the available tools, and calls echo.

pnpm test:client -- https://mcp-for-next-js.vercel.app

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables building a stateless MCP endpoint on top of Convex, allowing AI agents like Claude to discover and interact with Convex backend functions as tools, prompts, and resources.
      127 npm
      12
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables adding a stateless MCP server to a Next.js App Router application, supporting tools, prompts, and resources over Streamable HTTP and the current MCP protocol.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables exposing product capabilities to ChatGPT, Claude, and other MCP clients via a stateless Streamable HTTP endpoint with OAuth resource binding and structured-output helpers.
      MIT
    • A
      license
      Not graded
      quality
      F
      maintenance
      Enables developers to expose oRPC procedures as MCP tools, resources, and prompts while reusing existing validation, middleware, and business logic. Supports human-in-the-loop approval and fetch-handler integration for serving MCP clients.
      72 npm
      MIT