Integrations
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.
scrapbox-cosense-mcp
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
- Get page content from cosense/Scrapbox
list_pages
- Get a list of pages in the project (max 1000 pages)
- Output: List of page titles in the project
- Get a list of pages in the project (max 1000 pages)
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
- Full-text search across all pages in the project (max 100 pages)
create_pages
- Generate page URLs
- Input: Page title and optional body text
- Output: URL that can be opened in a browser
- Generate page URLs
Development
Install dependencies:
Build the server:
Auto-rebuild during development:
Installation
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
Environment Variables
This server uses the following environment variables:
Required Environment Variables
COSENSE_PROJECT_NAME
: Project nameCOSENSE_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:
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
- Get page content from cosense/Scrapbox
list_pages
- Get a list of pages in a project (up to 1000)
- Output: A list of page titles in the project
- Get a list of pages in a project (up to 1000)
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
- Full-text search across all pages in a project (up to 100 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
- Generate URL for the page
Development method
Install dependencies:
Build the server:
Automatic rebuild during development:
How to install
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
environmental variables
This server uses the following environment variables:
Required Environment Variables
COSENSE_PROJECT_NAME
: Project nameCOSENSE_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:
Inspector provides a URL to access the debugging tools in your browser.
You must be authenticated.
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
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.