Browse the blog

Deploy a FrontMCP server to Vercel

  • frontmcp
  • mcp
  • vercel
  • deployment

Maintained guide. How checks work.

FrontMCP's Vercel build produces a Node.js function in Vercel's Build Output API format. This guide shows the build and deployment path, endpoint checks, and state decisions to make before production. The function runs in its configured region; a global delivery network does not make it an edge-runtime function.

The Vercel reference owns the generated files and configuration. These instructions replace the older build flag and legacy KV provisioning steps.

Prerequisites

Start with a working project, Node.js 24+ for development, and the Vercel CLI authenticated to your project. Keep FrontMCP companion packages compatible and run the server's tests first. The local example download provides a starting project with explicit fixture limits.

Deployment steps

From your project directory:

npx frontmcp build --target vercel
npx vercel deploy --prebuilt

The build writes dist/vercel/ and .vercel/output/. Inspect .vercel/output/functions/index.func/.vc-config.json: the maintained target uses nodejs24.x and a Node handler. Existing vercel.json settings are not automatically replaced; check them when upgrading.

Preview and production environments need their own secrets and public issuer settings. Configure production values in Vercel, rebuild if configuration is embedded in the artifact, and deploy to production after preview checks pass:

npx vercel deploy --prebuilt --prod

Verify the deployed endpoint

Replace the hostname with your deployment. MCP 2026-07-28 needs no initialize handshake:

curl --fail-with-body https://your-project.vercel.app/mcp \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -H 'MCP-Protocol-Version: 2026-07-28' \
  -H 'MCP-Method: tools/list' \
  --data '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{"_meta":{"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}'

For protected endpoints, first confirm this unauthenticated request is refused. Then authenticate through the configured flow, inspect tool names and make a harmless call. Keep tokens out of shared shell history. /healthz checks process health; it does not prove authentication, tool execution or widget rendering.

Decide what state must survive

MCP 2026-07-28 is stateless at the protocol layer. Earlier revisions may require shared sessions across invocations using Mcp-Session-Id. Application records, job progress and OAuth state remain separate persistence decisions. See protocol versions and shared storage.

Vercel KV is no longer available for new provisioning. Use a supported Marketplace Redis integration such as Upstash and select the FrontMCP storage configuration it supports. The legacy @vercel/kv integration can remain relevant to existing projects; its presence in the SDK is not a provisioning instruction. Vercel's Redis guidance.

Duration, cost and background work

Function duration depends on runtime and Fluid Compute settings. Configure it through supported Vercel configuration rather than an undocumented FrontMCP flag. Check current duration limits and pricing for your project. Model latency, APIs, cold starts and persistence affect cost and response time.

Do not rely on work continuing after a function responds. Choose durable jobs or a long-running deployment when needed. The deployment overview covers runtime constraints. Record preview deploy-and-call results for your actual project; no hosted deployment or latency measurement is asserted here.

Report a docs issue. Site usage and privacy.