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 installThe scaffold includes:
my-app/
bitmcp.config.ts
package.json
src/tools/hello/
tool.ts
view.tsx
actions.tsScripts
| Script | Command | Purpose |
|---|---|---|
| dev | pnpm dev | Watch compiler and server. stdio by default |
| preview | pnpm preview | Local Apps host with sandbox iframe |
| build | pnpm build | Build server bundle and hashed Views |
| start | pnpm start | Production 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.