Caotang

Free · open source · no account

A writing studio for novels, scripts and story worlds.

Caotang gives you the structure long-form writers know, a binder, a corkboard and a codex, plus an AI agent that plans first and asks before it changes your book. It runs in your browser, and your manuscript stays on your machine.

Nothing to install, nothing to sign up for. A desktop browser window at least 960 px wide works best.

  1. 1Ask “Draft the scene where Mara finds the letter.”
  2. 2Plan The agent proposes its steps. You approve or change them.
  3. 3Preview The draft appears in the scene, waiting for you.
  4. 4Restore Every turn leaves a checkpoint you can roll back.

What it is

Everything a long manuscript needs, in one place. If you have used Scrivener, you will feel at home.

Binder and corkboard

Chapters and scenes you drag into order, a research section that is never compiled, index cards, statuses, labels, word goals and a sprint timer.

Codex

Characters, places, objects, lore and subplots, with aliases. Caotang lists every document a name appears in, and a quick scan flags continuity slips.

Screenplays

Scenes in Fountain, with script, source and page views. Import .fountain or Final Draft .fdx, and export them again.

Branching dialogue

Ink stories with an outline, a branch graph and line ids, for games and interactive fiction.

Storyboards

Shot cards with pictures, an animatic total, script coverage, and prompt packs for video models.

Compile

Word (.docx), EPUB, Markdown and plain text, for the whole book or one part, with saved recipes.

An agent that asks first

The agent works through the app's own commands, the same ones you use. Plans and drafts wait for your approval, small changes apply at once, and each turn that changes the project leaves a checkpoint you can restore.

Your key, your provider

Bring a key for Anthropic, OpenAI, Google, xAI, Mistral, DeepSeek, OpenRouter or any OpenAI-compatible endpoint, and pay that provider directly. No key yet? A built-in demo provider lets you try the agent without one.

Where your work lives

Caotang is a web page with no server behind it. That surprises people, so here is what it means.

Your projects are saved in your browser

When you open caotang.app, the page loads once, then everything happens on your computer. Your projects are kept in this browser's own storage for this site. Nothing is uploaded, and there is no Caotang account or server that could see your book.

So it stays with this browser

  • Another browser, another computer or a private window will not see your projects.
  • Clearing this site's data, or a cleanup tool that does it for you, removes them.
  • Caotang asks the browser to keep its storage, and shows a banner if the browser has not promised to.

Keep a copy you own

  • Export bundle saves the whole project as one .caotang file you can import into any copy of Caotang.
  • Save to folder (Chrome or Edge) writes the project as plain files, Markdown scenes and all, into a folder you choose, and saves back to it.

The only thing that leaves your machine is what you ask for: when the agent works, the parts of the project it needs go to the provider you chose. Your API key is sealed in this browser and never written into a project file. No analytics.

Get started

  1. Open Caotang

    caotang.app/app in a desktop browser. Chrome or Edge if you want folder saves.

  2. Create a project

    Give it a title, add chapters and scenes in the binder, and start writing. Scenes save as you type.

  3. Add a provider, if you like

    In Settings › Providers, pick a preset, choose a model and paste your key. Or skip it and write on your own.

  4. Keep a copy

    Save to a folder, or export a bundle now and then. Your writing should never live in one place only.

Prefer your own copy? Caotang is static files: build it from the repository and host it anywhere. The user guide walks through every screen.

For AI tools: an MCP server for your manuscript

Caotang speaks the Model Context Protocol in both directions.

Caotang as an MCP server

Let Claude, an IDE agent or any MCP host read a Caotang project folder: the overview, the binder, scenes, notes, the codex, continuity findings and dialogue tables. It is read-only by default. With writes allowed, tools such as binder.restructure, codex.write, doc.import and export.compile ask you to confirm each call in the host first.

Runs over stdio, or over HTTP on 127.0.0.1 with a bearer token, and packs as an .mcpb bundle. The server makes no network connections of its own.

node caotang-mcp.mjs serve \
  --project ~/Writing/my-novel --stdio

Build it from the repository with pnpm --filter @caotang/mcp-server build. Full reference: MCP server README.

Caotang as an MCP client

Connect your own MCP servers in Settings › MCP & tools, off until you turn it on. You review each server's tools before use, and any call that is not a trusted read waits for your approval.

Reading this as an agent?

A plain-text summary with links lives at caotang.app/llms.txt.

Who makes it

Caotang is an independent open-source project by The Caotang Authors, released under the MIT License. There are no accounts, no subscriptions, no credit meters, no analytics and no Caotang server. It was built with AI coding agents under its owner's direction, and every design decision a person made is recorded in the open in decisions.md.

Found a bug or have an idea? Open an issue, or read how to contribute. Security reports go through private disclosure.