scrapbox-cosense-mcp: Instructions file for Claude Code

CLAUDE.md

scrapbox-cosense-mcp CLAUDE.md is an instructions file for Claude Code from worldnine/scrapbox-cosense-mcp. It costs 3,407 tokens per session, scanned A, original, MIT.

Repository instructions for a Cosense MCP server and command-line tool. Cosense, formerly known as Scrapbox, is a linked note-taking and knowledge-base service; the instructions describe its page, search, editing, and optional deletion tools.

In plain words
What is it for?
Use them when developing or debugging the Cosense integration, retrieving or searching pages, creating and editing notes, generating page URLs, or running its command-line and inspection tools.
Why use it?
They explain how to build, test, inspect, and safely operate the server. They also document exact-match editing behavior, authentication needs, limits, and available commands.

Instructions file for Claude Code

Written for Claude Code: Claude Code plugin machinery. Also seen: mentions .claude-plugin; mentions CLAUDE.md; mentions Claude Code.

This is worldnine/scrapbox-cosense-mcp's own configuration. It tells Claude Code how to work on scrapbox-cosense-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything scrapbox-cosense-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to worldnine/scrapbox-cosense-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/worldnine/scrapbox-cosense-mcp/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/worldnine/scrapbox-cosense-mcp

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for scrapbox-cosense-mcp CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/worldnine/scrapbox-cosense-mcp/claude-md/github.svg)](https://agentmods.dev/instructions/worldnine/scrapbox-cosense-mcp/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/worldnine/scrapbox-cosense-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/worldnine/scrapbox-cosense-mcp/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for scrapbox-cosense-mcp CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/worldnine/scrapbox-cosense-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/worldnine/scrapbox-cosense-mcp/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,407 This file is loaded in full into every session.
When invoked 3,407 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.03407 $0.03407
Opus 5.5 $0.01363 $0.01363
Sonnet 5.5 $0.00681 $0.00681
Haiku 4.5 $0.00341 $0.00341

Measured 13d ago against content hash 3c016ef00ce5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

scrapbox-cosense-mcp CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 13d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 129 lines

How it starts

The opening of the file, as written. The whole thing — 129 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md

MCP server for Cosense (Scrapbox). Also works as a CLI.

Commands

npm run build        # TypeScript → JavaScript (uses tsconfig.build.json)
npm run watch        # Auto-rebuild during development
npm run test         # Run Jest tests (no real API calls)
COSENSE_E2E=true npm run test  # Also run the E2E tests against the real Cosense API — sparingly, e.g. once before merging
npm run lint         # ESLint (console.log triggers warning)
npm run inspector    # Debug with MCP Inspector

Architecture

Tools (11, or 9 without COSENSE_ENABLE_DELETE)

Tool Description Auth
get_page Retrieve page content, metadata, and links -
list_pages List pages with sorting and pagination (max 1000) -
search_pages Keyword search (API limit: 100 results) -
create_page Create new page. Rejects if page already exists PAT/SID
get_page_url Generate URL from page title -
insert_lines Insert text after a target line (exact match). Appends to end if not found PAT/SID
edit_lines Replace target line(s) (exact match, multi-line block supported). Errors if not found. matchAll replaces every occurrence PAT/SID
delete_lines Delete target line(s) (exact match, multi-line block supported). Refuses to delete the title line. Errors if not found. matchAll deletes every occurrence PAT/SID
delete_page Delete a page. Registered only when COSENSE_ENABLE_DELETE=true. Errors if the page does not exist. dryRun previews PAT/SID
rewrite_page Replace a page's entire content. Registered only when COSENSE_ENABLE_DELETE=true. Errors if the page does not exist or content is empty. dryRun previews before/after PAT/SID
get_smart_context Get page + linked pages (1-hop/2-hop) in AI-optimized format PAT/SID

CLI

All tools are also available as CLI subcommands (get, list, search, create, url, insert, edit, delete-lines, delete, rewrite, context). delete and rewrite require COSENSE_ENABLE_DELETE=true and support --dry-run. Run scrapbox-cosense-mcp <command> --help for usage. Key flags:

Read the full file on GitHub · 129 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 13d ago Changed · +7 lines · +726 tokens per session 3c016ef00ce5
  2. 28d ago Changed · +3 lines · +328 tokens per session a7f1c0da1344
  3. 1mo ago Changed · +5 lines · +302 tokens per session faf70c050f41
  4. 1mo ago First seen · 114 lines · 2,051 tokens per session scan A 4913997c290a

Subscribe to this mod's changes

scrapbox-cosense-mcp CLAUDE.md is an instructions file published in the GitHub repository worldnine/scrapbox-cosense-mcp (54 stars, last pushed 10d ago), licensed MIT. It adds 3,407 tokens to every session, about $0.0136 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other instructions, from other repositories