Example MCP Server built on Next.js
@MarkArmsrong
关于 Example MCP Server built on Next.js
MCP Server
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"mcp-for-nextjs": {
"command": "node",
"args": [
"scripts/test-client.mjs",
"https://mcp-for-next-js.vercel.app"
]
}
}
}工具
未检测到工具
工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。
概览
What is Example MCP Server built on Next.js?
This is a template for building Model Context Protocol (MCP) servers using Next.js, designed for serverless deployment on Vercel. It provides scaffolding for tools, prompts, and resources, with an SSE endpoint and Redis integration.
How to use Example MCP Server built on Next.js?
Update app/mcp.ts with your tools, prompts, and resources following the MCP TypeScript SDK documentation. Deploy on Vercel with a Redis instance attached via process.env.REDIS_URL and Fluid compute enabled. A sample client script (scripts/test-client.mjs) is included for testing invocations.
Key features of Example MCP Server built on Next.js
- Built on Next.js for serverless deployment on Vercel
- Includes an SSE route for MCP communication
- Requires Redis for state persistence
- Supports custom tools, prompts, and resources via MCP SDK
- Sample client script for testing invocations
Use cases of Example MCP Server built on Next.js
- Deploying a production MCP server on Vercel
- Building custom MCP tools with Next.js serverless functions
- Integrating Redis-backed MCP resources
- Prototyping MCP interactions with the included test client
FAQ from Example MCP Server built on Next.js
What runtime or dependencies are required?
Requires a Redis instance attached under process.env.REDIS_URL and Vercel Fluid compute enabled for efficient execution.
How do I deploy this server?
Deploy using the Next.js MCP template on Vercel. After enabling Fluid compute, open app/sse/route.ts and adjust max duration to 800 seconds if using a Vercel Pro or Enterprise account.
Where does data live?
Tool state and resource data are stored in the attached Redis instance.
What transport does the server use?
It uses Server-Sent Events (SSE) via the /sse route.
Are there any known limits?
The SSE route has a max duration of 800 seconds on Pro/Enterprise accounts when Fluid compute is enabled.
其他 分类下的更多 MCP 服务器
MCP Registry
modelcontextprotocolA community driven registry service for Model Context Protocol (MCP) servers.
Awesome Mlops
visengerA curated list of references for MLOps
MaxKB
1Panel-dev🔥 MaxKB is an open-source platform for building enterprise-grade agents. 强大易用的开源企业级智能体平台。
Awesome Mcp Servers
punkpeyeA collection of MCP servers.
Unity MCP ✨
justinpbarnettUnity MCP acts as a bridge between AI assistants and your Unity Editor. Give your LLM tools to manage assets, control scenes, edit scripts, and automate tasks within Unity.
评论