This MCP server enables seamless integration between Claude and Scrapbox/Cosense, allowing you to access, search, and create content in your knowledge base directly from the AI interface.
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 to your Claude config file:
For MacOS:
~/Library/Application\ Support/Claude/claude_desktop_config.json
For Windows:
%APPDATA%/Claude/claude_desktop_config.json
Basic configuration example:
{
"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",
"COSENSE_SORT_METHOD": "created",
"SERVICE_LABEL": "scrapbox(cosense)"
}
}
}
}
COSENSE_PROJECT_NAME
: Your Scrapbox project nameCOSENSE_SID
: Session ID for authentication (required for private projects)API_DOMAIN
: API domain (default: "scrapbox.io")SERVICE_LABEL
: Service identifier in tool descriptionsCOSENSE_PAGE_LIMIT
: Initial page fetch limit (1-1000, default: 100)COSENSE_SORT_METHOD
: Initial sort order (updated/created/accessed/linked/views/title)COSENSE_TOOL_SUFFIX
: Tool name suffix for multiple server instancesCOSENSE_CONVERT_NUMBERED_LISTS
: Convert numbered lists to bullet lists (true/false)For private Scrapbox projects, you'll need the connect.sid
cookie:
connect.sid
cookie:
instead of %3A
) as your COSENSE_SID
Example format:
s:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Once configured, you can use these tools in Claude:
Please get the content of page "Meeting Notes" using get_page.
Please list the 10 most recently updated pages using list_pages.
Please search for pages containing "JavaScript tutorial" using search_pages.
Please create a new page titled "Today's Learning" using create_page.
Please get the URL for page "Project Plan" using get_page_url.
Please insert "New task: Complete documentation" after the line "# Tasks" in page "Project Status" using insert_lines.
All tools support an optional projectName
parameter:
Please get the content of page "Design Guidelines" from project "help-ja" using get_page.
For multiple private projects with different credentials, use separate server instances:
{
"mcpServers": {
"main-scrapbox": {
"command": "npx",
"args": ["github:worldnine/scrapbox-cosense-mcp"],
"env": {
"COSENSE_PROJECT_NAME": "main-project",
"COSENSE_SID": "s:main_sid_here...",
"COSENSE_TOOL_SUFFIX": "main",
"SERVICE_LABEL": "Main Scrapbox"
}
},
"team-cosense": {
"command": "npx",
"args": ["github:worldnine/scrapbox-cosense-mcp"],
"env": {
"COSENSE_PROJECT_NAME": "team-workspace",
"COSENSE_SID": "s:team_sid_here...",
"COSENSE_TOOL_SUFFIX": "team",
"SERVICE_LABEL": "Team Cosense"
}
}
}
}
This creates tools with suffixes (like get_page_main
and get_page_team
), allowing Claude to work with multiple projects.
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "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","COSENSE_SORT_METHOD":"created","SERVICE_LABEL":"scrapbox(cosense)"}}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"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",
"COSENSE_SORT_METHOD": "created",
"SERVICE_LABEL": "scrapbox(cosense)"
}
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"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",
"COSENSE_SORT_METHOD": "created",
"SERVICE_LABEL": "scrapbox(cosense)"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect