apple-notes-mcp CLAUDE.md

apple-notes-mcp CLAUDE.md is an instructions file for coding agents 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

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/disco-trooper/apple-notes-mcp/claude-md
Clone the repo
git clone --depth 1 https://github.com/disco-trooper/apple-notes-mcp

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.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.svg" alt="Measured on agentmods" 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. Scan, not verified.
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 $0.01062 $0.01062
Opus 5 $0.00531 $0.00531
Sonnet 5 $0.00212 $0.00212
Haiku 4.5 $0.00106 $0.00106

Measured 5d ago against content hash e7862ffffa0d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 5d 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. 5d 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 6mo ago), licensed MIT. It adds 1,062 tokens to every session, about $0.0053 per session on Opus 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.