Vercel
Deploy bitmcp on Vercel with a single server artifact.
bitmcp build emits dist/server.js, hashed View HTML under dist/ui/, and dist/manifest.json. The same server file runs on every platform.
Scaffold for Vercel
npx bitmcp create my-app --deploy vercelThat writes deploy: "vercel" and vercel.json with a rewrite from /mcp to /api/mcp.
Set environment variables
In the Vercel project:
- Set
BITMCP_STATE_KEY - Set
http.allowedHostsinbitmcp.config.tsto your deployment host - Set
MCP_URLwhen OAuth is enabled
Confirmations and ctx.ask mint requestState tokens that must verify on any replica. BITMCP_STATE_KEY is required in production.
Deploy
vercelbitmcp build writes gitignored api/mcp.js that re-exports dist/server.js. vercel runs pnpm build first.
bitmcp.config.ts
import { defineConfig } from "bitmcp";
export default defineConfig({
deploy: "vercel",
http: {
path: "/mcp",
allowedHosts: ["your-app.vercel.app"],
},
});When OAuth is enabled, set MCP_URL to your public MCP endpoint (for example https://your-app.vercel.app/mcp). See Supabase or other auth guides.
See also
Cloudflare and Node and custom deploy the same dist/server.js artifact.