Scrapbox Cosense MCP Server

Scrapbox Cosense MCP Server

这个服务器方便与 cosense/Scrapbox 项目进行交互,使用户能够检索、列出、搜索和创建页面,同时支持各种查询操作并安全访问私有项目。

Category
访问服务器

Tools

create_page

Create a new page in my-research-notes project on cosense (scrapbox) Creates a new page with the specified title and optional body text. The page will be opened in your default browser.

get_page

Get a page from my-research-notes project on cosense (scrapbox) Returns page content and its linked pages. Page content includes title and description in plain text format.

list_pages

List pages from my-research-notes project on cosense (scrapbox) with flexible sorting options. Available sorting methods: - updated: Sort by last update time - created: Sort by creation time - accessed: Sort by access time - linked: Sort by number of incoming links - views: Sort by view count - title: Sort by page title

search_pages

Search pages in my-research-notes project on cosense (scrapbox) Supports various search features: - Basic search: "keyword" - Multiple keywords: "word1 word2" (AND search) - Exclude words: "word1 -word2" - Exact phrase: "\"exact phrase\""

README

scrapbox-cosense-mcp

English | 日本語

English

MCP server for cosense/scrapbox.

<a href="https://glama.ai/mcp/servers/8huixkwpe2"><img width="380" height="200" src="https://glama.ai/mcp/servers/8huixkwpe2/badge" alt="Scrapbox Cosense Server MCP server" /></a>

Features

  • get_page
    • Get page content from cosense/Scrapbox
      • Input: Page title
      • Output: Page content, metadata, links, and editor information
  • list_pages
    • Get a list of pages in the project (max 1000 pages)
      • Output: List of page titles in the project
  • 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
  • create_pages
    • Generate page URLs
      • Input: Page title and optional body text
      • Output: URL that can be opened in a browser

Development

Install dependencies:

npm install

Build the server:

npm run build

Auto-rebuild during development:

npm run watch

Installation

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 as follows:

For MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json For Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "scrapbox-cosense-mcp": {
      "command": "npx",
      "args": ["github:worldnine/scrapbox-cosense-mcp"],
      "env": {
        "COSENSE_PROJECT_NAME": "your_project_name",
        "COSENSE_SID": "your_sid", // Required for private projects
        "COSENSE_PAGE_LIMIT": "25", // Optional (default: 100)
        "COSENSE_SORT_METHOD": "created", // Optional (default: "updated")
        "SERVICE_LABEL": "scrapbox(cosense)" // Optional (default: "cosense(scrapbox)")
      }
    }
  }
}

Environment Variables

This server uses the following environment variables:

Required Environment Variables

  • COSENSE_PROJECT_NAME: Project name
  • COSENSE_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:
    • Uses "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:

npm run inspector

The Inspector provides a URL to access debugging tools in the browser.

日本語

cosense/scrapbox 用のMCPサーバーです。

機能

  • get_page
    • cosense/Scrapboxからページコンテンツを取得
      • 入力: ページタイトル
      • 出力: ページコンテンツ、メタデータ、リンク、編集者の情報
  • list_pages
    • プロジェクト内のページ一覧を取得(最大1000件)
      • 出力: プロジェクト内のページタイトル一覧
  • search_pages
    • プロジェクト内のページ全体を対象とした全文検索(最大100件)
      • 基本検索、AND検索、OR検索、NOT検索をサポート
      • 出力: 検索結果のページタイトル一覧
  • create_pages
    • ページのURLを生成
      • 入力: ページタイトルとオプションの本文テキスト
      • 出力: ブラウザで開くことができるURL

開発方法

依存関係のインストール:

npm install

サーバーのビルド:

npm run build

開発時の自動リビルド:

npm run watch

インストール方法

git clone https://github.com/worldnine/scrapbox-cosense-mcp.git
cd scrapbox-cosense-mcp
npm install
npm run build

Claude Desktopで使用するには、以下のようにサーバー設定を追加してください:

MacOSの場合: ~/Library/Application\ Support/Claude/claude_desktop_config.json Windowsの場合: %APPDATA%/Claude/claude_desktop_config.json

{
  "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", // オプション(デフォルト: 100)
        "COSENSE_SORT_METHOD": "created", // オプション(デフォルト: "updated")
        "SERVICE_LABEL": "scrapbox(cosense)" // オプション(デフォルト: "cosense(scrapbox)")
      }
    }
  }
}

環境変数

このサーバーは以下の環境変数を使用します:

必須の環境変数

  • COSENSE_PROJECT_NAME: プロジェクト名
  • COSENSE_SID: Scrapbox/Cosenseの認証用セッションID(プライベートプロジェクトの場合は必須)

オプションの環境変数

  • API_DOMAIN: APIドメイン(デフォルト: "scrapbox.io")
  • SERVICE_LABEL: サービスの識別名(デフォルト: "cosense (scrapbox)")
  • COSENSE_PAGE_LIMIT: 初期取得時のページ数(1-1000、デフォルト: 100)
  • COSENSE_SORT_METHOD: 初期取得時の取得ページ順(updated/created/accessed/linked/views/title、デフォルト: updated)

環境変数の挙動について

  • COSENSE_PROJECT_NAME: 必須の環境変数です。未設定の場合、サーバーは起動時にエラーで終了します。
  • COSENSE_SID: プライベートプロジェクトへのアクセスに必要です。未設定の場合、パブリックプロジェクトのみアクセス可能です。
  • API_DOMAIN:
    • 未設定時は"scrapbox.io"を使用
    • 作者の環境では"scrapbox.io"以外の値は未検証ですが、"cosen.se"でないと動作しない環境が存在する可能性があるため念のためのオプションです。
  • COSENSE_PAGE_LIMIT:
    • 未設定時は100を使用
    • 無効な値(数値以外や範囲外)の場合は100を使用
    • 有効範囲: 1-1000
  • COSENSE_SORT_METHOD:
    • 未設定時は'updated'を使用
    • 無効な値の場合は'updated'を使用
    • list_pagesツールの動作には影響しません(初期リソース取得時のみ使用)

デバッグ方法

MCPサーバーはstdioを介して通信を行うため、デバッグが難しい場合があります。MCP Inspectorの使用を推奨します。以下のコマンドで実行できます:

npm run inspector

InspectorはブラウザでデバッグツールにアクセスするためのURLを提供します。


scrapbox-cosense-mcp

English | 日本語

中文

用于 cosense/scrapbox 的 MCP 服务器。

<a href="https://glama.ai/mcp/servers/8huixkwpe2"><img width="380" height="200" src="https://glama.ai/mcp/servers/8huixkwpe2/badge" alt="Scrapbox Cosense Server MCP server" /></a>

功能

  • get_page
    • 从 cosense/Scrapbox 获取页面内容
      • 输入:页面标题
      • 输出:页面内容、元数据、链接和编辑者信息
  • list_pages
    • 获取项目中的页面列表(最多 1000 页)
      • 输出:项目中的页面标题列表
  • search_pages
    • 在项目的全部页面中进行全文搜索(最多 100 页)
      • 支持基本搜索、AND 搜索、OR 搜索和 NOT 搜索
      • 输出:搜索结果中的页面标题列表
  • create_pages
    • 生成页面 URL
      • 输入:页面标题和可选的正文文本
      • 输出:可以在浏览器中打开的 URL

开发

安装依赖项:

npm install

构建服务器:

npm run build

开发期间自动重新构建:

npm run watch

安装

git clone https://github.com/worldnine/scrapbox-cosense-mcp.git
cd scrapbox-cosense-mcp
npm install
npm run build

要与 Claude Desktop 一起使用,请按如下方式添加服务器配置:

对于 MacOS:~/Library/Application\ Support/Claude/claude_desktop_config.json 对于 Windows:%APPDATA%/Claude/claude_desktop_config.json

{
  "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", // 可选(默认:100)
        "COSENSE_SORT_METHOD": "created", // 可选(默认:"updated")
        "SERVICE_LABEL": "scrapbox(cosense)" // 可选(默认:"cosense(scrapbox)")
      }
    }
  }
}

环境变量

此服务器使用以下环境变量:

必需的环境变量

  • COSENSE_PROJECT_NAME: 项目名称
  • COSENSE_SID: 用于 Scrapbox/Cosense 身份验证的会话 ID(私有项目必需)

可选的环境变量

  • API_DOMAIN: API 域名(默认:"scrapbox.io")
  • SERVICE_LABEL: 服务标识符(默认:"cosense (scrapbox)")
  • COSENSE_PAGE_LIMIT: 初始页面获取限制(1-1000,默认:100)
  • COSENSE_SORT_METHOD: 初始页面获取顺序(updated/created/accessed/linked/views/title,默认:updated)

环境变量行为

  • COSENSE_PROJECT_NAME: 必需的环境变量。如果未设置,服务器将退出并显示错误。
  • COSENSE_SID: 访问私有项目必需。如果未设置,则只能访问公共项目。
  • API_DOMAIN:
    • 如果未设置,则使用 "scrapbox.io"
    • 虽然作者的环境中尚未验证 "scrapbox.io" 以外的域名,但存在此选项是为了防止某些环境需要 "cosen.se"
  • COSENSE_PAGE_LIMIT:
    • 如果未设置,则使用 100
    • 如果值无效(非数字或超出范围),则使用 100
    • 有效范围:1-1000
  • COSENSE_SORT_METHOD:
    • 如果未设置,则使用 'updated'
    • 如果值无效,则使用 'updated'
    • 不影响 list_pages 工具的行为(仅用于初始资源获取)

调试

由于 MCP 服务器通过 stdio 进行通信,因此调试可能具有挑战性。建议使用 MCP Inspector。您可以使用以下命令运行它:

npm run inspector

Inspector 提供了一个 URL,用于访问浏览器中的调试工具。

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选