The server depends on packages hosted on JSR registry (@cosense/std and @cosense/types) and requires configuration to access these dependencies.
Provides tools to interact with Cosense pages, which are part of the Scrapbox ecosystem. Features include retrieving pages, listing available pages, searching pages, and inserting text into pages.
Cosense MCP Server
A MCP server for Cosense.
Tools
The following tools are available for interacting with Cosense pages:
get_page: Retrieves a page with the specified titlelist_pages: Lists available pages in the resourcessearch_pages: Searches for pages containing the specified query stringinsert_lines: Inserts text after a specified line in a page
Related MCP server: Cosense MCP Server
Installation
Prerequisites
Set the following environment variables:
COSENSE_PROJECT_NAME— your Cosense project name.COSENSE_SID— session cookie used for authentication. Required for writing pages and reading private pages. Treat this like a secret. See https://scrapbox.io/scrapboxlab/connect.sid for more details.
For VS Code Users
Use one of these one-click installation buttons:
Note: After clicking the button, replace
your_project_nameandyour_sidwith your actual values in the configuration. For manual setup, you can also edit.vscode/mcp.jsondirectly.
For Claude Desktop Users
Add one of the following configurations to your claude_desktop_config.json:
Using pnpm
Using yarn
Using npx
This package depends on JSR-hosted packages. npx requires adding the JSR registry to ~/.npmrc first.
Step 1: Add JSR registry to
Linux/macOS:
Windows (PowerShell):
Step 2: Add configuration
Development
Running from Source
If you prefer to run the server from a local copy of this repository, build it first:
Then configure your MCP client to use the local build:
Debugging
Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector, which is available as a package script:
The Inspector will provide a URL to access debugging tools in your browser.
Acknowledgments
This project is forked from funwarioisii/cosense-mcp-server.