Connecting to your server
stdio, Streamable HTTP, preview host, and MCP client setup.
Transports
| Mode | Command | Use case |
|---|---|---|
| stdio | pnpm dev | Claude Desktop, VS Code, Cursor |
| HTTP | bitmcp dev --http | Streamable HTTP while developing |
| HTTP | pnpm start | Production (bitmcp start always uses HTTP) |
Environment variables:
MCP_TRANSPORT—stdioorhttpMCP_PORT— listen port for HTTPMCP_HOST— bind addressMCP_PATH— HTTP path (default/mcp)BITMCP_ROOT— project root when cwd differsBITMCP_STATE_KEY— required in production HTTP for MRTRrequestState
Default production URL
bitmcp start listens on http://127.0.0.1:3000/mcp by default.
Preview host
pnpm preview starts a local Apps host (default port 8787). It renders your View in a sandbox iframe and injects tool results. Use this to iterate on UI without waiting on a full MCP client.
stdio clients
Point your MCP client at the dev command:
{
"command": "pnpm",
"args": ["dev"],
"cwd": "/path/to/my-app"
}HTTP clients
Connect to the Streamable HTTP endpoint your server exposes. Host and Origin guards apply on localhost.
UI vs text-only hosts
UI-capable hosts advertise text/html;profile=mcp-app. bitmcp strips View metadata when the client cannot render Apps. Text and MRTR still work.
See Hosts for capability behavior.