Installation

Create a bitmcp app with create-bitmcp and run the dev server.

Create a project

npx create-bitmcp my-app
cd my-app
pnpm install

The scaffold includes:

my-app/
  bitmcp.config.ts
  package.json
  src/tools/hello/
    tool.ts
    view.tsx
    actions.ts

Scripts

ScriptCommandPurpose
devpnpm devWatch compiler and server. stdio by default
previewpnpm previewLocal Apps host with sandbox iframe
buildpnpm buildBuild server bundle and hashed Views
startpnpm startProduction Streamable HTTP

bitmcp.config.ts

import { defineConfig } from "bitmcp";

export default defineConfig({
  name: "bitmcp-app",
  version: "0.0.1",
});

Optional fields include deploy ("node" | "vercel" | "cloudflare"), cacheTtlMs, http.cors, http.allowedHosts, and http.path. Production HTTP requires BITMCP_STATE_KEY. Extra Vite options go under vite in bitmcp.config.ts. The CLI injects the bitmcp plugin automatically.

Pass --deploy vercel or --deploy cloudflare to create-bitmcp to write the matching platform config. See Deploy.

Next step

Read Project structure to learn how tools are discovered.