cosense-mcp-server
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.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@cosense-mcp-server search for pages about API documentation"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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: MCP Tool
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
{
"mcpServers": {
"cosense-mcp-server": {
"command": "pnpm",
"args": ["-s", "dlx", "@yosider/cosense-mcp-server"],
"env": {
"COSENSE_PROJECT_NAME": "your_project_name",
"COSENSE_SID": "your_sid"
}
}
}
}Using yarn
{
"mcpServers": {
"cosense-mcp-server": {
"command": "yarn",
"args": ["dlx", "-q", "@yosider/cosense-mcp-server"],
"env": {
"COSENSE_PROJECT_NAME": "your_project_name",
"COSENSE_SID": "your_sid"
}
}
}
}Using npx
This package depends on JSR-hosted packages. npx requires adding the JSR registry to ~/.npmrc first.
Step 1: Add JSR registry to ~/.npmrc
Linux/macOS:
echo "@jsr:registry=https://npm.jsr.io" >> ~/.npmrcWindows (PowerShell):
echo "@jsr:registry=https://npm.jsr.io" >> $env:USERPROFILE\\.npmrcStep 2: Add configuration
{
"mcpServers": {
"cosense-mcp-server": {
"command": "npx",
"args": ["-y", "@yosider/cosense-mcp-server"],
"env": {
"COSENSE_PROJECT_NAME": "your_project_name",
"COSENSE_SID": "your_sid"
}
}
}
}Development
Running from Source
If you prefer to run the server from a local copy of this repository, build it first:
git clone https://github.com/yosider/cosense-mcp-server.git
cd cosense-mcp-server
pnpm install
pnpm run buildThen configure your MCP client to use the local build:
{
"mcpServers": {
"cosense-mcp-server": {
"command": "node",
"args": ["/path/to/cosense-mcp-server/build/index.js"],
"env": {
"COSENSE_PROJECT_NAME": "your_project_name",
"COSENSE_SID": "your_sid"
}
}
}
}Debugging
Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector, which is available as a package script:
pnpm run inspectThe Inspector will provide a URL to access debugging tools in your browser.
Acknowledgments
This project is forked from funwarioisii/cosense-mcp-server.
Available Tools
4 toolsget_pageB
Get a page with the specified title from the Cosense project.
Inputs: title (required).
insert_linesA
Insert lines after the specified target line in a Cosense page. If the target line is not found, append to the end of the page.
Inputs: title (required), targetLineText (required), text (required).
list_pagesC
List Cosense pages in the project.
Inputs: no named parameters.
search_pagesB
Search for pages containing the specified query string in the Cosense project.
Inputs: query (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a distinct purpose: get_page retrieves a specific page, insert_lines modifies page content, list_pages enumerates pages, and search_pages queries by text. No functional overlap.
All tool names follow a consistent verb_noun pattern with underscores (get_page, insert_lines, list_pages, search_pages), making them predictable and easy to understand.
With 4 tools, the set is concise but covers essential operations for a Cosense server: reading, writing, listing, and searching. It is slightly minimal but appropriate for the domain.
The tools cover basic CRUD-like operations (get, insert, list, search) but lack delete or create functionality for pages explicitly. Insert_lines may create content but not a new page. Some gaps exist.
Maintenance
Related MCP Connectors
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
MCP server for progressive tool usage at any scale (see https://klavis.ai)
MCP server for generating rough-draft project plans from natural-language prompts.
Related MCP Servers
- FlicenseBqualityDmaintenanceAn MCP server that allows Claude to access pages from Cosense projects, supporting both public and private projects with optional SID authentication.21-
- AlicenseDqualityDmaintenanceA server built on mcp-framework that enables integration with Claude Desktop through the Model Context Protocol.11MIT
- AlicenseAqualityDmaintenanceAn MCP server that bridges Claude Desktop and Claude Code by letting Desktop read and interact with Claude Code Remote Control sessions, enabling cross-agent coordination.64MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that allows Claude Desktop to remotely control Claude Code instances for executing commands and managing files.MIT