
Cosense 的 MCP 服务器
概览
以下工具可用于与 Cosense 页面交互: - get_page:检索指定标题的页面 - list_pages:列出资源中的可用页面 - search_pages:搜索包含指定查询字符串的页面 - insert_lines:在页面指定行后插入文本 设置以下环境变量: - COSENSE_PROJECT_NAME — 你的 Cosense 项目名称。- COSENSE_SID — 用于认证的会话 Cookie。用于编写页面和阅读私密页面。请将其视为秘密。详情请参见 https://scrapbox.io/scrapboxlab/connect.sid。 请使用以下一键安装按钮之一: :点击按钮后,将配置中的your_project_name和your_sid替换为实际值。手动设置时,你也可以直接编辑 .vscode/mcp.json。 将以下配置之一添加到您的claude_desktop_config.json中: 该包依赖于 JSR 托管的包。
概述(AI 翻译)
一个 Cosense 的 MCP 服务器。
工具
以下工具可用于与 Cosense 页面交互:
get_page:检索指定标题的页面list_pages:列出资源中可用的页面search_pages:搜索包含指定查询字符串的页面insert_lines:在页面指定行后插入文本
安装
先决条件
设置以下环境变量:
COSENSE_PROJECT_NAME——你的Cosense项目名称。COSENSE_SID— 用于认证的会话Cookie。用于写入页面和读取私密页面。请将其视为秘密。详见https://scrapbox.io/scrapboxlab/connect.sid。
对于VS Code用户
请使用以下一键安装按钮之一:
注意:点击按钮后,将配置中的实际值替换为
your_project_name和your_sid。手动设置时,您也可以直接编辑.vscode/mcp.json。
给 Claude 桌面用户
在您的claude_desktop_config.json中添加以下配置之一:
使用 pnpm
用纱线
使用 NPX
该包依赖于 JSR 托管的包。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
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
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",
安装
npx -y @yosider/cosense-mcp-server配置
{
"mcpServers": {
"cosense-mcp-server": {
"command": "pnpm",
"args": ["-s", "dlx", "@yosider/cosense-mcp-server"],
"env": {
"COSENSE_PROJECT_NAME": "your_project_name",
"COSENSE_SID": "your_sid"
}
}
}
}