Most wiki servers only offer read and replace-the-page, which makes an assistant's small correction into a rewrite you have to review in full. Editing by exact line match keeps the diff the size of the change. The other decision worth noticing is that delete_page and rewrite_page do not appear in the tool list at all by default — the model cannot call what it cannot see — and when you do enable them, a dry run tells you the line counts before anything is touched.
An MCP server for Cosense, formerly Scrapbox. Reading is straightforward; the interesting part is writing, which works line by line through the WebSocket API so an assistant can change one paragraph without re-sending the page and losing everything else on it.
- get_page — content, metadata and links for one page; get_page_url builds a direct link without any authentication
- list_pages — browse with sorting and pagination, up to 1000 pages
- search_pages — full-text search with keyword highlighting, up to 100 results
- create_page — a new page from Markdown or Scrapbox body
- insert_lines, edit_lines and delete_lines — targeted edits by exact line match, singly or across a multi-line block, and matchAll when every occurrence should change
- get_smart_context — a page together with the pages it links to, one or two hops out, formatted for an assistant to read
- delete_page and rewrite_page, which replace or empty a whole page — not registered at all unless you opt in, and offering a dry run that reports what would change before it changes
- The same binary runs as a standalone CLI, with a compact output mode meant for agents
- COSENSE_TOOL_SUFFIX renames the tools per instance, so two projects can be connected at once without a name clash
COSENSE_PROJECT_NAME for the project you are pointing at. Public projects need nothing more to read, and get_page_url never needs credentials. Private projects and every write need COSENSE_SID — the connect.sid session cookie copied from a logged-in browser, in its decoded form; treat it as a password, and expect to replace it when it expires. Destructive tools stay unregistered until COSENSE_ENABLE_DELETE is set. Install as a desktop extension from GitHub Releases, as a Claude Code plugin, or from source.
One command plus a key — npx -y scrapbox-cosense-mcp, then supply credentials
