Skip to content
This repository was archived by the owner on Dec 12, 2025. It is now read-only.

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

@modelfetch/vercel

npm version npm license docs

Deploy MCP servers to Vercel.

Installation

npm install @modelfetch/vercel

Usage

Next.js App Router

import handle from "@modelfetch/vercel";
import server from "./server"; // Import your McpServer

const handler = handle(server);

// Export as Next.js App Router API route handlers
export const GET = handler;
export const POST = handler;
export const DELETE = handler;

Use Node.js or Fluid Compute

import handle from "@modelfetch/vercel";
import server from "./server"; // Import your McpServer

const handler = handle(server);

// Export as Next.js App Router API route handlers
export const GET = handler;
export const POST = handler;
export const DELETE = handler;

// Use Node.js or Fluid Compute (default)
export const runtime = "nodejs";

Use Edge Runtime

import handle from "@modelfetch/vercel";
import server from "./server"; // Import your McpServer

const handler = handle(server);

// Export as Next.js App Router API route handlers
export const GET = handler;
export const POST = handler;
export const DELETE = handler;

// Use Edge runtime
export const runtime = "edge";

API Reference

handle(server)

Creates a Vercel-compatible Next.js App Router API route handler from an McpServer instance