Scrapbox Cosense MCP Server
The Scrapbox Cosense MCP Server allows you to interact with Scrapbox/Cosense projects programmatically with these key capabilities:
Get Pages: Retrieve page content, metadata, links, and editor information by title
List Pages: View pages with flexible sorting options (updated, created, accessed, linked, views, title), pagination support, and the ability to exclude pinned pages
Search Pages: Perform full-text searches using basic keywords, AND search, NOT exclusions, and exact phrase queries (up to 100 results)
Create Pages: Generate new pages with a title and optional markdown body text, which opens in your browser
Provides access to Scrapbox/Cosense pages, allowing retrieval of page content, metadata, links, and editor information, listing pages in a project, full-text search across pages, and generating page URLs.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Scrapbox Cosense MCP Serversearch for pages about JavaScript tutorials"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
scrapbox-cosense-mcp
Overview
MCP server for Cosense (formerly Scrapbox).
Tool | Description | Auth Required |
| Get page content, metadata, and links | For private projects |
| Browse pages with sorting and pagination (max 1000) | For private projects |
| Full-text search with keyword highlighting (max 100 results) | For private projects |
| Create a page via WebSocket API with Markdown/Scrapbox body | Yes |
| Generate direct URL for a page | No |
| Insert text after a specified line in a page | Yes |
| Replace an exact-match line (first match, or all with | Yes |
| Delete a page by emptying every line — opt-in, see below | Yes |
| Get a page and its linked pages (1-hop/2-hop) in AI-optimized format | Yes |
create_page, insert_lines, and edit_lines support a format parameter ("markdown" or "scrapbox") to control content conversion.
edit_lines replaces only the first matching line by default. Set matchAll: true to replace every occurrence. The default is deliberately conservative: a line such as a bullet marker or a blank line can repeat many times in a page, and replacing all of them at once is rarely what the caller intended.
delete_page is opt-in
delete_page is not registered unless COSENSE_ENABLE_DELETE=true is set. Without it the tool does not appear in the tool list at all, so an agent cannot call it even by mistake. This server is often added to a shared MCP configuration, so deletion is exposed only to those who deliberately turn it on.
Deleting a page empties every one of its lines, and Cosense removes a page once all of its lines are empty. There is no undo. Two further guards are built in:
The page must already exist. A missing page returns an error rather than a silent success. (The REST API returns a title line even for a page that was never created, so the check looks at
persistent, the same waycreate_pagedoes.)dryRun: truereports how many lines would be removed and shows the first five of them, without touching the page.
When you run several instances of this server for different projects, set the variable on each instance that should be allowed to delete:
{
"mcpServers": {
"cosense-notes": {
"command": "npx",
"args": ["-y", "scrapbox-cosense-mcp"],
"env": {
"COSENSE_PROJECT_NAME": "notes",
"COSENSE_SID": "s:your-session-id",
"COSENSE_TOOL_SUFFIX": "notes",
"COSENSE_ENABLE_DELETE": "true"
}
},
"cosense-archive": {
"command": "npx",
"args": ["-y", "scrapbox-cosense-mcp"],
"env": {
"COSENSE_PROJECT_NAME": "archive",
"COSENSE_SID": "s:your-session-id",
"COSENSE_TOOL_SUFFIX": "archive"
}
}
}
}Here the notes instance exposes delete_page_notes, while the archive instance exposes no deletion tool at all.
Note that insert_lines and edit_lines behave differently when the target line is absent. insert_lines appends to the end of the page, because "add this text somewhere" still has a reasonable outcome. edit_lines returns an error and leaves the page untouched, because "replace this specific line" has no meaningful fallback — appending the replacement would silently produce a page the caller never asked for.
Related MCP server: Backlog MCP Server
Quick Start
Desktop Extension (.mcpb) — Easiest
Download
scrapbox-cosense-mcp.mcpbfrom GitHub ReleasesDouble-click — Claude Desktop opens an install dialog
Enter your project name (and Session ID for private projects)
Claude Code Plugin
Add the marketplace:
/plugin marketplace add worldnine/scrapbox-cosense-mcpInstall the plugin:
/plugin install scrapbox-cosense@worldnine-scrapbox-cosense-mcpInstalls globally by default. Use
--scope projector--scope localfor other scopes.Set environment variables in your settings file:
{ "env": { "COSENSE_PROJECT_NAME": "your_project_name", "COSENSE_SID": "your_sid" } }File
Scope
~/.claude/settings.jsonAll projects (global)
.claude/settings.local.jsonThis project only (gitignored)
The plugin includes MCP server configuration and a /cosense skill for CLI operations.
Claude Code (Manual MCP Setup)
If you prefer manual configuration over the plugin:
claude mcp add scrapbox-cosense-mcp \
-e COSENSE_PROJECT_NAME=your_project \
-e COSENSE_SID=your_sid \
-- npx -y scrapbox-cosense-mcpClaude Desktop / Other MCP Clients
Add to your config file:
Client | Config File |
Claude Desktop (macOS) |
|
Claude Desktop (Windows) |
|
Cursor |
|
Windsurf |
|
{
"mcpServers": {
"scrapbox-cosense-mcp": {
"command": "npx",
"args": ["-y", "scrapbox-cosense-mcp"],
"env": {
"COSENSE_PROJECT_NAME": "your_project_name",
"COSENSE_SID": "your_sid"
}
}
}
}Build from Source
git clone https://github.com/worldnine/scrapbox-cosense-mcp.git
cd scrapbox-cosense-mcp
npm install && npm run buildConfiguration
Required
Variable | Description |
| Your Scrapbox/Cosense project name |
| Session ID ( |
Optional
Variable | Default | Description |
|
| API domain |
|
| Display name in tool descriptions |
|
| Initial page fetch limit (1–1000) |
|
| Initial sort: updated, created, accessed, linked, views, title |
| — | Tool name suffix for multiple instances (e.g. |
|
| Convert numbered lists to bullet lists in Markdown conversion |
|
| Exclude pinned pages from initial resource list |
|
| Register the |
CLI Usage
The same binary also works as a standalone CLI:
scrapbox-cosense-mcp get "Page Title"
scrapbox-cosense-mcp search "keyword"
scrapbox-cosense-mcp list --sort=updated --limit=20
scrapbox-cosense-mcp create "New Page" --body="Markdown content"
scrapbox-cosense-mcp insert "Page" --after="target line" --text="new text"
scrapbox-cosense-mcp edit "Page" --target="old line" --text="new text"
scrapbox-cosense-mcp delete "Page" --dry-run # needs COSENSE_ENABLE_DELETE=true
scrapbox-cosense-mcp url "Page Title"Flag | Description |
| Token-efficient compact output (recommended for AI agents) |
| Override project name |
| Output as JSON |
| Show help (supports |
Multiple Projects
All tools accept an optional projectName parameter to target a different project from a single server. For multiple private projects with different credentials, run separate server instances with COSENSE_TOOL_SUFFIX.
See docs/multiple-projects.md for detailed configuration examples.
Development
Command | Description |
| Build (TypeScript → JavaScript) |
| Auto-rebuild during development |
| Run test suite |
| Run ESLint |
| Debug with MCP Inspector |
Contributing
Create a feature branch from
mainAdd tests for your changes
Run
npm run lint && npm testCreate a pull request — CI runs automatically
License
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceA server that connects to the Notion API and exposes functionality through Claude's Machine Context Protocol, enabling search, retrieval, querying, and creation of Notion pages and databases.2,228MIT
- -license-quality-maintenanceA Model Context Protocol server that enables AI agents to interact with Backlog API for managing projects, issues, wikis, Git repositories, and other Backlog features.
- Flicense-qualityDmaintenanceAn MCP server for Wiki.js projects that enables full-text search, page retrieval, and page management capabilities. It allows LLMs to interact with wiki content through specialized tools for searching, listing, and creating pages.
- Alicense-qualityBmaintenanceMCP server for Cosense (formerly Scrapbox) that enables page creation, editing, deletion, and searching with WebSocket-based operations. Extends the original server with page-deletion and line-editing tools.9MIT
Related MCP Connectors
Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.
MCP server for AgentDocs (agentdocs.eu): read, search, write, comment on & share Markdown docs.
MCP-native open-source Notion alternative: read & write pages, databases and kanban boards.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/worldnine/scrapbox-cosense-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server