scrapbox-cosense-mcp-editable

scrapbox-cosense-mcp-editable

MCP 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.

Category
Visit Server

README

scrapbox-cosense-mcp-editable

日本語ドキュメント / Japanese

Overview

MCP server for Cosense (formerly Scrapbox). Fork of worldnine/scrapbox-cosense-mcp that adds page-deletion and line-editing tools (delete_page, edit_lines).

Tool Description Auth Required
get_page Get page content, metadata, and links For private projects
list_pages Browse pages with sorting and pagination (max 1000) For private projects
search_pages Full-text search with keyword highlighting (max 100 results) For private projects
create_page Create a page via WebSocket API with Markdown/Scrapbox body Yes
get_page_url Generate direct URL for a page No
insert_lines Insert text after a specified line in a page Yes
edit_lines Replace an exact-match line (one or all occurrences) with new content Yes
delete_page Delete a page by emptying every line via WebSocket patch Yes
get_smart_context 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.

Note on delete_page: Cosense automatically removes a page once all of its lines are empty. This tool sends a WebSocket patch that returns an empty line array — there is no "undo".

Quick Start

Desktop Extension (.mcpb) — Easiest

  1. Download scrapbox-cosense-mcp-editable.mcpb from GitHub Releases
  2. Double-click — Claude Desktop opens an install dialog
  3. Enter your project name (and Session ID for private projects)

Claude Code Plugin

  1. Add the marketplace:
    /plugin marketplace add qurihara/scrapbox-cosense-mcp-editable
    
  2. Install the plugin:
    /plugin install scrapbox-cosense@worldnine-scrapbox-cosense-mcp
    
    Installs globally by default. Use --scope project or --scope local for other scopes.
  3. Set environment variables in your settings file:
    {
      "env": {
        "COSENSE_PROJECT_NAME": "your_project_name",
        "COSENSE_SID": "your_sid"
      }
    }
    
    File Scope
    ~/.claude/settings.json All projects (global)
    .claude/settings.local.json This 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-mcp

Claude Desktop / Other MCP Clients

Add to your config file:

Client Config File
Claude Desktop (macOS) ~/Library/Application Support/Claude/claude_desktop_config.json
Claude Desktop (Windows) %APPDATA%/Claude/claude_desktop_config.json
Cursor .cursor/mcp.json (project root)
Windsurf ~/.codeium/windsurf/mcp_config.json
{
  "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/qurihara/scrapbox-cosense-mcp-editable.git
cd scrapbox-cosense-mcp-editable
npm install && npm run build

Configuration

Required

Variable Description
COSENSE_PROJECT_NAME Your Scrapbox/Cosense project name
COSENSE_SID Session ID (connect.sid cookie) for private projects — How to get it

Optional

Variable Default Description
API_DOMAIN scrapbox.io API domain
SERVICE_LABEL cosense (scrapbox) Display name in tool descriptions
COSENSE_PAGE_LIMIT 100 Initial page fetch limit (1–1000)
COSENSE_SORT_METHOD updated Initial sort: updated, created, accessed, linked, views, title
COSENSE_TOOL_SUFFIX Tool name suffix for multiple instances (e.g. mainget_page_main)
COSENSE_CONVERT_NUMBERED_LISTS false Convert numbered lists to bullet lists in Markdown conversion
COSENSE_EXCLUDE_PINNED false Exclude pinned pages from initial resource list

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 url "Page Title"
Flag Description
--compact Token-efficient compact output (recommended for AI agents)
--project=NAME Override project name
--json Output as JSON
--help Show help (supports <command> --help for details)

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
npm run build Build (TypeScript → JavaScript)
npm run watch Auto-rebuild during development
npm test Run test suite
npm run lint Run ESLint
npm run inspector Debug with MCP Inspector

Contributing

  1. Create a feature branch from main
  2. Add tests for your changes
  3. Run npm run lint && npm test
  4. Create a pull request — CI runs automatically

License

MIT


MseeP.ai Security Assessment Badge <a href="https://glama.ai/mcp/servers/8huixkwpe2"><img width="380" height="200" src="https://glama.ai/mcp/servers/8huixkwpe2/badge" alt="Scrapbox Cosense Server MCP server" /></a>

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured