apple-notes-mcp: Instructions file for Claude Code

CLAUDE.md

apple-notes-mcp CLAUDE.md is an instructions file for Claude Code from disco-trooper/apple-notes-mcp. It costs 1,062 tokens per session, scanned A, original, MIT.

A set of instructions for an MCP server that lets an AI assistant search, read, create, update, and manage Apple Notes using natural-language requests.

In plain words
What is it for?
Use it when developing, checking, or testing the Apple Notes MCP server.
Why use it?
It gives a coding agent the project layout, data flow, commands, and testing rules, including which test command to use.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Claude Code.

This is disco-trooper/apple-notes-mcp's own configuration. It tells Claude Code how to work on apple-notes-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 apple-notes-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to disco-trooper/apple-notes-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/disco-trooper/apple-notes-mcp/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/disco-trooper/apple-notes-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 apple-notes-mcp CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/disco-trooper/apple-notes-mcp/claude-md/github.svg)](https://agentmods.dev/instructions/disco-trooper/apple-notes-mcp/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/disco-trooper/apple-notes-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/disco-trooper/apple-notes-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 apple-notes-mcp CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/disco-trooper/apple-notes-mcp/claude-md"><img src="https://agentmods.dev/badge/instructions/disco-trooper/apple-notes-mcp/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,062 This file is loaded in full into every session.
When invoked 1,062 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.01062 $0.01062
Opus 5.5 $0.00425 $0.00425
Sonnet 5.5 $0.00212 $0.00212
Haiku 4.5 $0.00106 $0.00106

Measured 2mo ago against content hash e7862ffffa0d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

apple-notes-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 2mo 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 · 117 lines

How it starts

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

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

MCP server for Apple Notes with semantic search and CRUD operations. Claude searches, reads, creates, updates, and manages Apple Notes through natural language.

Commands

bun run start      # Start MCP server
bun run setup      # Interactive setup wizard
bun run dev        # Watch mode
bun run check      # Type check
bun run test       # Run tests (uses vitest, NOT bun test)
bun run test:watch # Watch mode for tests

Important: Always use bun run test (vitest), never bun test (Bun's test runner is incompatible).

Architecture

Data Flow

User Query → MCP Server → Search Module → Embeddings → LanceDB → Results
                ↓
           Apple Notes ← JXA (JavaScript for Automation)

Entry Point

  • src/index.ts - Main MCP server with stdio transport for Claude Code

Core Modules

Search Pipeline (src/search/)

  • index.ts - Legacy hybrid search using Reciprocal Rank Fusion (RRF)
  • indexer.ts - Full and incremental indexing with indexed_at timestamp tracking
  • chunk-indexer.ts - Chunk-based indexing for Parent Document Retriever pattern
  • chunk-search.ts - Chunk search with note deduplication (keeps best chunk per note)

Embedding Providers (src/embeddings/)

  • Auto-detection: checks OPENROUTER_API_KEY to choose provider
  • local.ts - HuggingFace Transformers with Xenova/multilingual-e5-small
  • openrouter.ts - Cloud API via OpenRouter

Vector Store (src/db/lancedb.ts)

  • Singleton LanceDBStore with FTS index on content
  • Storage path: ~/.apple-notes-mcp/data
  • Schema: NoteRecord with vector, content, indexed_at fields

Apple Notes Access (src/notes/)

  • read.ts - JXA queries via run-jxa
  • resolve.ts - Note title disambiguation logic
  • conversion.ts - HTML→Markdown via Turndown
  • crud.ts - Create, update, delete, move operations (respects READONLY_MODE)
  • tables.ts - Table HTML parsing and cell editing

Read the full file on GitHub · 117 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. 2mo ago First seen · 117 lines · 1,062 tokens per session scan A e7862ffffa0d

Subscribe to this mod's changes

apple-notes-mcp CLAUDE.md is an instructions file published in the GitHub repository disco-trooper/apple-notes-mcp (7 stars, last pushed 1mo ago), licensed MIT. It adds 1,062 tokens to every session, about $0.0042 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-31.

Related

apple-notes-mcp CLAUDE.md compared with instructions from other repositories

apple-notes-mcp CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
apple-notes-mcp CLAUDE.mddisco-trooper/apple-notes-mcpInstructions file71mo agoMITA1,062Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode