WS

worldnine/scrapbox-cosense-mcp

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

55 stars 19 forks Качество 86 Тренд 20MIT

worldnine/scrapbox-cosense-mcp - это MCP-серверный кандидат, импортированный из https://github.com/worldnine/scrapbox-cosense-mcp.

Обзор

worldnine/scrapbox-cosense-mcp - это MCP-серверный кандидат, импортированный из https://github.com/worldnine/scrapbox-cosense-mcp.

Обзор (машинный перевод)

Японский / Japanese

Обзор

MCP-сервер для Cosense (ранее Scrapbox).

Обсуждение Auth Required [скрыто] [скрыто] [скрыто] [скрыто] [скрыто] | get_page | Получить содержимое страницы, метаданные и ссылки | Для частных проектов | | [[Т1]] | Просмотреть страницы с сортировкой и пагинацией (макс 1000) | Для частных проектов | | search_pages | Полнотекстовый поиск с выделением ключевых слов (максимум 100 результатов) | Для частных проектов. create_page Создайте страницу с корпусом Markdown/Scrapbox get_page_url | Создать прямой URL для страницы | insert_lines | Вставить текст после указанной строки на странице | Да | edit_lines | Заменить линию (линии) точного матча, включая многолинейный блок (первый матч или все с matchAll) | Да. delete_lines | Удалить линию (линии) точного матча, включая многолинейный блок (первый матч или все с matchAll) | Да. | delete_page | Удалить страницу — opt-in, см. ниже | Да | | rewrite_page | Заменить весь контент страницы — opt-in, см. | get_smart_context | Получить страницу и связанные с ней страницы (1-hop/2-hop) в оптимизированном для ИИ формате | Да |

Эта страница переведена автоматически. Технические детали смотрите в оригинале.

README

Показан фрагмент оригинального README. Открыть оригинал.

scrapbox-cosense-mcp

日本語ドキュメント / Japanese

Overview

MCP server for Cosense (formerly Scrapbox).

Tool Description Auth Required
get_page Get page content, metadata, and links For private projects
list_pages Browse pages with sorting and pagination (max 1000) For private projects
search_pages Full-text search with keyword highlighting (max 100 results) For private projects
create_page Create a page with a Markdown/Scrapbox body Yes
get_page_url Generate direct URL for a page No
insert_lines Insert text after a specified line in a page Yes
edit_lines Replace exact-match line(s), including a multi-line block (first match, or all with matchAll) Yes
delete_lines Delete exact-match line(s), including a multi-line block (first match, or all with matchAll) Yes
delete_page Delete a page — opt-in, see below Yes
rewrite_page Replace a page’s entire content — opt-in, see below Yes
get_smart_context Get a page and its linked pages (1-hop/2-hop) in AI-optimized format Yes

create_page, insert_lines, edit_lines, and rewrite_page support a format parameter ("markdown" or "scrapbox") to control content conversion.

edit_lines replaces only the first matching line by default. Set matchAll: true to replace every occurrence. The default is deliberately conservative: a line such as a bullet marker or a blank line can repeat many times in a page, and replacing all of them at once is rarely what the caller intended.

targetLineText may contain newlines to match a contiguous block of lines. The block is replaced as a whole, so n lines can become m lines (for example, collapsing several lines into one). Block matches with matchAll: true are non-overlapping.

delete_lines uses the same exact-match (and block) semantics but removes the matched lines instead of replacing them. It refuses to delete the title line (the first line), because that would rename or remove the page itself — use delete_page for that.

delete_page and rewrite_page are opt-in

delete_page and rewrite_page are not registered unless COSENSE_ENABLE_DELETE=true is set. Without it neither tool appears in the tool list at all, so an agent cannot call them even by mistake. This server is often added to a shared MCP configuration, so whole-page destruction is exposed only to those who deliberately turn it on.

The reasoning: insert_lines, edit_lines, and delete_lines all require an exact match, which is only possible if the caller has actually read the page — they can only destroy lines they already know. delete_page and rewrite_page act on the entire page regardless of whether the caller has read it, so they get a separate opt-in gate.

delete_page removes the whole page. There is no undo. Two further guards are built in:

Открыть полный README на GitHub

Установка

npx -y scrapbox-cosense-mcp
Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "cosense-notes": { "command": "npx", "args": ["-y", "scrapbox-cosense-mcp"], "env": { "COSENSE_PROJECT_NAME": "notes", "COSENSE_MCP_PAT": "your-personal-access-token", "COSENSE_TOOL_SUFFIX": "notes", "COSENSE_ENABLE_DELETE": "true" } }, "cosense-archive": { "command": "npx", "args": ["-y", "scrapbox-cosense-mcp"], "env": { "COSENSE_PROJECT_NAME": "archive", "COSENSE_MCP_PAT": "your-personal-access-token", "COSENSE_TOOL_SUFFIX": "archive" } } } }