Connect htmlbook
to your agent.
htmlbook is built on MCP. Add it once, and Claude Code, Cursor, Codex, or any MCP client publishes the HTML it writes straight to your shelf — no copy-paste, no deploy step.
Get your API key
Sign in and copy your workspace key. Keep it secret — it grants publish access to your library.
hb_live_REPLACE_WITH_YOUR_KEYworkspace keyAdd the server
One command. Run it in any project — it works everywhere your agent writes HTML.
claude mcp add --transport http htmlbook https://htmlbook.io/api/mcp# then run `claude` and approve the htmlbook loginclaude mcp add --transport http htmlbook https://htmlbook.io/api/mcp \ --header "Authorization: Bearer hb_live_REPLACE_WITH_YOUR_KEY"{ "mcpServers": { "htmlbook": { "type": "http", "url": "https://htmlbook.io/api/mcp", "headers": { "Authorization": "Bearer ${HTMLBOOK_API_KEY}" } } }}verify → claude mcp list should show htmlbook ✓ connected
Use it
Just ask. Your agent calls publish when it’s done — and hands you back a live URL.
Big document? Push the file.
The publish tool takes the HTML inline — handy, but for a large doc your agent re-emits the whole file as tokens (and it lingers in context). Have it write the file, then push the file from the shell — the bytes skip the model entirely:
curl -s -X POST "https://htmlbook.io/api/docs?project=PROJECT&slug=SLUG" \ -H "Authorization: Bearer $HTMLBOOK_API_KEY" \ --data-binary @doc.html # or @doc.md — .md kept as source + rendered to a viewsmall docs → just use publish (it takes markdown too). set HTMLBOOK_API_KEY to the same key.
The tools your agent gets
Eight verbs. Capture is one call; the rest let your agent (and you) actually manage a library.
htmlbook.publishCreate or update a doc from HTML or markdown (new snapshot if it exists).capturehtmlbook.guideThe authoring contract — hb-doc classes, tokens, components — for any agent, no skill needed.capturehtmlbook.listBrowse your library, optionally filtered by project.managehtmlbook.getFetch a doc — metadata + current HTML (meta_only to skip the body).managehtmlbook.organizeSet title/tags/path, move to another project, or rename.managehtmlbook.restoreRoll a doc back to a previous snapshot.recoverhtmlbook.set_accessMake a doc public or private.sharehtmlbook.deleteMove a doc to the trash (soft delete).manageNot connecting?
- Restart the client. Cursor, Codex, and Claude Desktop only read the config on launch. Quit and reopen.
- 401 / unauthorized. The key is wrong or missing. Re-add with the Authorization header, or run the browser login.
- Check the status. In Claude Code: claude mcp list — and claude mcp get htmlbook for details.
- Behind a proxy / headless. Use a static API key (Bearer) instead of OAuth — see the “Any MCP client” tab.
Give your agent a shelf.
Free to start. Every HTML file your AI writes — captured, organized, readable anywhere.