MCP Apps · 2026-07-28

The TypeScript framework for MCP Apps

A tool is a server function. A View is a hashed HTML resource. Confirmations use MRTR. State uses handles, not sessions.

npx create-bitmcp my-app

Features

The complete stack to ship an MCP App

File-based tools

tool.ts, view.tsx, and actions.ts live in one folder. No envelope wiring.

Official MCP Apps

Predeclared, content-hashed ui:// HTML. Cacheable and reviewable.

Works without UI

Every tool returns text. UI-capable hosts get the View.

Confirmations that travel

confirm() maps to MRTR. Terminal hosts can still accept.

Handles, not sessions

ctx.handle() and explicit args. Next replica, same call.

React Views

useApp() for result and callTool. Official Apps protocol underneath.

How to use

From init to deploy

1

Create

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

Write a tool and a View

Put server logic in tool.ts and UI in view.tsx.

export default defineTool({
  description: "Greet someone and show a small interactive card",
  input: z.object({ name: z.string() }),
  async execute({ name }) {
    return { name, message: `Hello, ${name}` };
  },
});
export default function HelloView() {
  const { result } = useApp();
  return <h1>{result.message}</h1>;
}
3

Develop

pnpm dev
pnpm preview
bitmcp dev --http

Use stdio for Claude and VS Code. Use preview for a local iframe host on port 8787. Add --http when you want Streamable HTTP while iterating.

4

Ship

pnpm build
pnpm start

bitmcp start serves Streamable HTTP on 127.0.0.1:3000/mcp. Scaffold with --deploy vercel or --deploy cloudflare, set BITMCP_STATE_KEY, then vercel or wrangler deploy.

Server function. Hashed View. Stateless core.

MIT · npm bitmcp · GitHub