CLI

bitmcp dev, start, preview, and build commands.

The bitmcp CLI ships with the bitmcp package.

Commands

CommandDescription
bitmcp devVite watch for Views plus the MCP server. stdio by default
bitmcp startProduction Streamable HTTP from dist/server.js
bitmcp previewLocal App Bridge host with iframe
bitmcp buildHashed inlined View HTML plus dist/server.js. Writes api/mcp.js when deploy is "vercel"

Flags

FlagApplies toDescription
--httpdevUse Streamable HTTP instead of stdio
--stdiodevForce stdio (the default)
--port Ndev, start, previewListen port

Typical scripts

{
  "scripts": {
    "dev": "bitmcp dev",
    "start": "bitmcp start --http",
    "preview": "bitmcp preview",
    "build": "bitmcp build"
  }
}

Environment

VariableDescription
BITMCP_ROOTProject root
BITMCP_STATE_KEYState signing key
MCP_TRANSPORTstdio or http
MCP_PORTHTTP port
MCP_HOSTHTTP bind address
MCP_PATHHTTP path

Usage string

bitmcp <dev|start|preview|build> [--http] [--stdio] [--port N]