AI NewsDev toolsAnnouncement

Pensieve, a Mac MCP server, cuts Claude Code's tool calls 43 percent

Pensieve is a free MIT-licensed Mac app and MCP server that indexes files, git repos and agent sessions. In the author's benchmark on four real repos, Claude Code used 43 percent fewer tool calls and spent 18 percent less per lookup.

AI News

Editorial3 min read

LinkedInX
Pensieve search panel over a Mac desktop, showing one search across files, repos and agent sessions

Image: Pensieve

Why it mattersLocal semantic search over the whole codebase gives a coding agent the right file in one query, so the loop between asking and getting a usable answer costs less and leaves more context free.

A coding agent that greps and reads whole files spends most of its tokens before it starts answering, and a free Mac app is one attempt to cut that cost directly. Pensieve, released under an MIT licence by Ted Haley, is an on-device search index and an MCP server at the same time, so one local query returns the few passages that matter instead of several greps. In the author's benchmark with Claude Code, agents using it answered more questions correctly while making 43 percent fewer tool calls and spending 18 percent less per lookup.

Pensieve runs on Apple Silicon macOS 14 or later and is at version 0.5.9. A developer presses Control plus Shift for a Spotlight-style search panel, and a coding agent connected over MCP asks the same index and gets back ranked passages with the file and line.

What it indexes

The app watches folders chosen by the developer, every git repository including uncommitted edits and worktrees, and session logs from Claude Code, Codex and Qwen Code. It can also read an Obsidian vault and, if the developer agrees, Apple Notes. Everything is embedded and searched on the Mac. The documentation says the index never leaves the device, with one labelled exception: optional AI insights are written by Claude Code or Codex when the developer picks either as the backing model, and those requests are marked Cloud. A built-in Qwen 3.5 9B model, a local LM Studio server, or no model at all keep the whole flow local.

The benchmark the site publishes

The author ran Claude Sonnet in Claude Code against 72 held-out tasks across four repositories of 504, 1,783, 2,383 and 34,847 files. Each task was asked twice, once with Pensieve connected over MCP and once without, in one batch so the prompt cache would be the same for both. The results, as the Pensieve site states them: Claude Code with Pensieve found the right file in 131 of 144 runs against 123 of 144 with grep alone, used 2.0 tool calls per lookup instead of 3.4, spent $0.041 per lookup instead of $0.050, and finished in 8.6 seconds instead of 10.9. Token use was 16 percent lower. Per-repo cost savings ran from 6 to 28 percent, largest on the 34,847-file monorepo.

The site states the number carefully. These are tasks the author's own harness generated from the code, graded on which file was returned, so they are not an independent benchmark. The scripts live in bench/ under the same MIT licence, so a team can run them against its own code.

Getting agents to use it

The install command adds a short "search before you grep" block to the instructions files of Claude Code, Codex and Gemini CLI, plus a search skill and two hooks for Claude Code. With the block in place, the author reports the agent used Pensieve on all 144 runs of the latest benchmark. The same command connects Cursor, Windsurf, Claude Desktop and VS Code through MCP, and other agents can speak to the server over stdio or HTTP.

The trade is disk and energy for context quality. The index runs on the Mac that writes the code, so the laptop needs to be plugged in while a large repository is first indexed, and background indexing continues as new work lands. Each search then takes 0.1 to 0.2 seconds. The question for a team running coding agents daily is whether one fewer round of greps and whole-file reads is worth keeping the index up to date.

Source

Pensieve, TedHaley/pensieve on GitHub, discussed on Hacker News.

SourcePensieve

This item was written by an AI system from the linked source. Reveneau is responsible for what it publishes.

Share
LinkedInX
Start a project