Example Next.js MCP Server
Description
# Example Next.js MCP Server **Uses `@vercel/mcp-adapter`** ## Usage This sample app uses the [Vercel MCP Adapter](https://www.npmjs.com/package/@vercel/mcp-adapter) that allows you to drop in an MCP server on a group of routes in any Next.js project. Update…
About
# Example Next.js MCP Server **Uses `@vercel/mcp-adapter`** ## Usage This sample app uses the [Vercel MCP Adapter](https://www.npmjs.com/package/@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…
Details
- Author
- npstorey
- Downloads
- 328
- Categories
- Cloud Service
Jump to
- Integrates MCP server into Next.js routes via @vercel/mcp-adapter
- Supports SSE transport (requires Redis and Fluid compute)
- Deployable with Vercel’s Next.js MCP template
- Includes a sample client script for testing
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Example Next.js MCP ServerCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Update app/[transport]/route.ts with your tools, prompts, and resources following the MCP TypeScript SDK documentation. To test invocations, run node scripts/test-client.mjs <url> using the provided sample client. For SSE transport, ensure a Redis instance is attached and Fluid compute is enabled.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"example next.js mcp server": {
"opengov-mcp-server-vercel-nextjs": {
"command": "node",
"args": [
"scripts/test-client.mjs",
"https://mcp-for-next-js.vercel.app"
]
}
}
}
}
McpServers
{
"opengov-mcp-server-vercel-nextjs": {
"command": "node",
"args": [
"scripts/test-client.mjs",
"https://mcp-for-next-js.vercel.app"
]
}
}
Example Next.js MCP Server
Uses @vercel/mcp-adapter
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_URL
- Make sure you have Fluid compute enabled for efficient execution
- After enabling Fluid compute, open app/route.ts and adjust maxDuration to 800 if you using a Vercel Pro or Enterprise account
- Deploy the Next.js MCP template
Sample Client
script/test-client.mjs contains a sample client to try invocations.
node scripts/test-client.mjs https://mcp-for-next-js.vercel.app
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.

