Provides integration with Next.js, allowing the MCP server to be embedded within any Next.js project by updating route handlers.
Integrates with Redis for supporting Server-Sent Events (SSE) transport when deployed on Vercel.
Leverages TypeScript SDK for defining tools, prompts, and resources for the MCP server implementation.
Enables deployment on Vercel's platform with specific optimizations like Fluid compute for efficient execution and support for longer running functions.
Example Next.js MCP Server
Uses
Usage
This sample app uses the Vercel MCP Adapter that allows you to drop in an MCP server on a group of routes in any Next.js project.
Update app/[transport]/route.ts with your tools, prompts, and resources following the MCP TypeScript SDK documentation.
Notes for running on Vercel
To use the SSE transport, requires a Redis attached to the project under
process.env.REDIS_URLMake sure you have Fluid compute enabled for efficient execution
After enabling Fluid compute, open
app/route.tsand adjustmaxDurationto 800 if you using a Vercel Pro or Enterprise account
Sample Client
script/test-client.mjs contains a sample client to try invocations.
This server cannot be installed