@vurb/vercel
v3.7.7
Published
Vercel adapter for Vurb. Deploy your MCP server as a Next.js App Router route handler or standalone Vercel Function — Edge Runtime or Node.js, stateless JSON-RPC, zero config.
Downloads
266
Maintainers
Readme
Vercel adapter for Vurb.ts. Deploy your MCP server as a Next.js App Router route handler or standalone Vercel Function — Edge Runtime or Node.js, stateless JSON-RPC, zero config.
Quick Start (Next.js App Router)
// app/api/mcp/route.ts
import { createVercelHandler } from '@vurb/vercel';
import { registry } from '@/server/registry';
const handler = createVercelHandler(registry, {
contextFactory: () => ({
db: prisma,
role: 'ADMIN',
}),
});
export const POST = handler;Features
| Feature | Description |
|---------|-------------|
| App Router Native | Works as a Next.js route handler (app/api/mcp/route.ts) |
| Edge Runtime | Deploy to Vercel Edge Functions for global low-latency |
| Node.js Runtime | Full Node.js support for Prisma, file system, etc. |
| Stateless JSON-RPC | Each request is a standalone invocation |
| Zero Config | vercel deploy and it works |
Edge Runtime
// app/api/mcp/route.ts
export const runtime = 'edge';
const handler = createVercelHandler(registry, {
contextFactory: () => ({
kv: process.env.KV_REST_API_URL,
}),
});
export const POST = handler;Installation
npm install @vurb/vercelPeer Dependencies
| Package | Version |
|---------|---------|
| vurb | ^2.0.0 |
| @modelcontextprotocol/sdk | ^1.12.0 |
Requirements
- Next.js 14+ (App Router) or standalone Vercel Functions
- Vurb.ts ≥ 2.0.0 (peer dependency)
