Skip to main content
Glama

Scrapbox Cosense MCP Server

by worldnine

scrapbox-cosense-mcp

English | Japanese

English

MCP server for cosense/scrapbox .

Features

  • get_page
    • Get page content from cosense/Scrapbox
      • Input: Page title
      • Output: Page content, metadata, links, and editor information
  • list_pages
    • Get a list of pages in the project (max 1000 pages)
      • Output: List of page titles in the project
  • search_pages
    • Full-text search across all pages in the project (max 100 pages)
      • Supports basic search, AND search, OR search, and NOT search
      • Output: List of page titles in search results
  • create_pages
    • Generate page URLs
      • Input: Page title and optional body text
      • Output: URL that can be opened in a browser

Development

Install dependencies:

npm install

Build the server:

npm run build

Auto-rebuild during development:

npm run watch

Installation

git clone https://github.com/worldnine/scrapbox-cosense-mcp.git cd scrapbox-cosense-mcp npm install npm run build

To use with Claude Desktop, add the server configuration as follows:

For MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json For Windows: %APPDATA%/Claude/claude_desktop_config.json

{ "mcpServers": { "scrapbox-cosense-mcp": { "command": "npx", "args": ["github:worldnine/scrapbox-cosense-mcp"], "env": { "COSENSE_PROJECT_NAME": "your_project_name", "COSENSE_SID": "your_sid", // Required for private projects "COSENSE_PAGE_LIMIT": "25", // Optional (default: 100) "COSENSE_SORT_METHOD": "created", // Optional (default: "updated") "SERVICE_LABEL": "scrapbox(cosense)" // Optional (default: "cosense(scrapbox)") } } } }

Environment Variables

This server uses the following environment variables:

Required Environment Variables
  • COSENSE_PROJECT_NAME : Project name
  • COSENSE_SID : Session ID for Scrapbox/Cosense authentication (required for private projects)
Optional Environment Variables
  • API_DOMAIN : API domain (default: "scrapbox.io")
  • SERVICE_LABEL : Service identifier (default: "cosense (scrapbox)")
  • COSENSE_PAGE_LIMIT : Initial page fetch limit (1-1000, default: 100)
  • COSENSE_SORT_METHOD : Initial page fetch order (updated/created/accessed/linked/views/title, default: updated)
Environment Variable Behavior
  • COSENSE_PROJECT_NAME : Required environment variable. Server will exit with an error if not set.
  • COSENSE_SID : Required for accessing private projects. If not set, only public projects are accessible.
  • API_DOMAIN :
    • Use "scrapbox.io" if not set
    • While unverified with domains other than "scrapbox.io" in the author's environment, this option exists in case some environments require "cosen.se"
  • COSENSE_PAGE_LIMIT :
    • Uses 100 if not set
    • Uses 100 if value is invalid (non-numeric or out of range)
    • Valid range: 1-1000
  • COSENSE_SORT_METHOD :
    • Uses 'updated' if not set
    • Uses 'updated' if value is invalid
    • Does not affect list_pages tool behavior (only used for initial resource fetch)

Debugging

Since MCP servers communicate via stdio, debugging can be challenging. Using MCP Inspector is recommended. You can run it with:

npm run inspector

The Inspector provides a URL to access debugging tools in the browser.

Japanese

This is an MCP server for cosense/scrapbox .

function

  • get_page
    • Get page content from cosense/Scrapbox
      • Input: Page title
      • Output: Page content, metadata, links, editor info
  • list_pages
    • Get a list of pages in a project (up to 1000)
      • Output: A list of page titles in the project
  • search_pages
    • Full-text search across all pages in a project (up to 100 results)
      • Supports basic search, AND search, OR search, and NOT search
      • Output: List of page titles in search results
  • create_pages
    • Generate URL for the page
      • Input: Page title and optional body text
      • Output: A URL that can be opened in a browser

Development method

Install dependencies:

npm install

Build the server:

npm run build

Automatic rebuild during development:

npm run watch

How to install

git clone https://github.com/worldnine/scrapbox-cosense-mcp.git cd scrapbox-cosense-mcp npm install npm run build

To use it with Claude Desktop, add the following server config:

For MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json For Windows: %APPDATA%/Claude/claude_desktop_config.json

{ "mcpServers": { "scrapbox-cosense-mcp": { "command": "npx", "args": ["github:worldnine/scrapbox-cosense-mcp"], "env": { "COSENSE_PROJECT_NAME": "your_project_name", "COSENSE_SID": "your_sid", // プライベートプロジェクトの場合は必須 "COSENSE_PAGE_LIMIT": "25", // オ��ション(デフォルト: 100) "COSENSE_SORT_METHOD": "created", // オプション(デフォルト: "updated") "SERVICE_LABEL": "scrapbox(cosense)" // オプション(デフォルト: "cosense(scrapbox)") } } } }

environmental variables

This server uses the following environment variables:

Required Environment Variables

  • COSENSE_PROJECT_NAME : Project name
  • COSENSE_SID : Scrapbox/Cosense authentication session ID (required for private projects)

Optional Environment Variables

  • API_DOMAIN : API domain (default: "scrapbox.io")
  • SERVICE_LABEL : Service identification name (default: "cosense (scrapbox)")
  • COSENSE_PAGE_LIMIT : Number of pages to initially retrieve (1-1000, default: 100)
  • COSENSE_SORT_METHOD : Page order at initial retrieval (updated/created/accessed/linked/views/title, default: updated)

Behavior of environment variables

  • COSENSE_PROJECT_NAME : This is a required environment variable, if not set the server will exit with an error on startup.
  • COSENSE_SID : Required for accessing private projects. If not set, only public projects can be accessed.
  • API_DOMAIN :
    • If not set, "scrapbox.io" will be used.
    • In the author's environment, values other than "scrapbox.io" have not been verified, but there may be environments in which it will not work unless it is "cosen.se", so this is an option just in case.
  • COSENSE_PAGE_LIMIT :
    • If not set, use 100
    • For invalid values (non-numeric or out of range) use 100
    • Valid range: 1-1000
  • COSENSE_SORT_METHOD :
    • If not set, 'updated' is used.
    • For invalid values use 'updated'
    • Does not affect the operation of the list_pages tool (used only when obtaining initial resources)

How to debug

MCP servers can be difficult to debug because they communicate over stdio. We recommend using MCP Inspector , which can be run with the following command:

npm run inspector

Inspector provides a URL to access the debugging tools in your browser.

Install Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

This server facilitates interaction with cosense/Scrapbox projects, enabling users to retrieve, list, search, and create pages while supporting various query operations and secure access to private projects.

  1. English
    1. Features
    2. Development
    3. Installation
    4. Environment Variables
    5. Debugging
  2. Japanese
    1. function
      1. Development method
        1. How to install
          1. environmental variables
            1. Required Environment Variables
            2. Optional Environment Variables
            3. Behavior of environment variables
            4. How to debug

          Related MCP Servers

          • -
            security
            F
            license
            -
            quality
            The cosense-mcp-server facilitates the integration with Claude Desktop by serving as a middleware command pipeline server, allowing for interaction with projects in cosense.
            Last updated -
            7
            3
            TypeScript
            • Apple
          • -
            security
            F
            license
            -
            quality
            This server provides an interface for performing basic file system operations such as navigation, reading, writing, and file analysis, allowing users to manage directories and files efficiently.
            Last updated -
            3
            Python
          • A
            security
            A
            license
            A
            quality
            This server provides a privacy-focused meta search capability by integrating multiple search engines without tracking or user profiling, supporting various categories and languages for filtered searches.
            Last updated -
            1
            80
            15
            JavaScript
            MIT License
          • -
            security
            F
            license
            -
            quality
            An MCP server that allows Claude to access pages from Cosense projects, supporting both public and private projects with optional SID authentication.
            Last updated -
            JavaScript
            • Apple

          View all related MCP servers

          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