Pensieve Docs
Docs menu

Docs

Connect your agent

This page tells you how to give your coding agents Pensieve as an MCP server, and what each add-on does.

One command for every agent

pensieve integrate recommended

This command finds the agents on your computer. An agent counts as installed when its settings folder exists. For each agent, the command adds:

Restart each agent that is open. To see what is available and what is installed, run pensieve integrate with no items.

Each agent

AgentMCP idMCP settings fileInstructions
Claude Codeclaude-mcp~/.claude.json (through claude mcp add --scope user)~/.claude/CLAUDE.md
Codexcodex-mcp~/.codex/config.toml~/.codex/AGENTS.md
Cursorcursor-mcp~/.cursor/mcp.jsonCopy into the agent's rules
Gemini CLIgemini-mcp~/.gemini/settings.json~/.gemini/GEMINI.md
Qwen Codeqwen-mcp~/.qwen/settings.json~/.qwen/QWEN.md
Windsurfwindsurf-mcp~/.codeium/windsurf/mcp_config.jsonCopy into the agent's rules
Claude Desktopclaude-desktop-mcp~/Library/Application Support/Claude/claude_desktop_config.jsonCopy into the agent's rules
VS Codevscode-mcp~/Library/Application Support/Code/User/mcp.jsonCopy into the agent's rules

Any other MCP client can use Pensieve too. It speaks stdio through pensieve mcp, and streamable HTTP at http://127.0.0.1:8765/mcp. pensieve mcp starts the backend if it is not running.

{"mcpServers": {"pensieve": {"command": "pensieve", "args": ["mcp"]}}}

Scopes

Each agent connection works in a scope: a part of the index. Every tool obeys the scope. Pensieve refuses an item outside it.

pensieve mcp --scope payments     # stdio, one named scope
pensieve mcp --all-tools          # also the tools that change Pensieve's settings

In a repo that Pensieve does not index, search tells the agent to use grep. It does not return code from your other repos.

Add-ons

Agents grep by habit, also with Pensieve connected. The add-ons make them use it. Install them from Settings → Agents → Agent add-ons, or with pensieve integrate.

IdWhat it doesRecommended
claude-mcp, codex-mcp, cursor-mcp, gemini-mcp, qwen-mcp, windsurf-mcp, claude-desktop-mcp, vscode-mcpPensieve as the agent's MCP server, for every project. In each settings file, Pensieve changes only its own entry.Yes
claude, codex, gemini, qwenThe instructions block in the agent's global instructions file. It tells the agent to call Pensieve search before Grep or Glob for each code lookup. It also tells the agent to call threads at the start of a session and at natural pauses, and to offer to close the thread closest to done.Yes
pensieve-searchA skill: query styles, when to use grep, similar code before new code, past sessions.Yes
pensieve-teammatesA skill: who knows an area, from git blame, and a draft question. It never sends a message.No
pensieve-planA skill: plans for new code list code to reuse, earlier attempts, people to ask and knowledge risks.No
pensieve-wrap-upA skill: gets the threads closest to done and does the steps that close them in git, GitHub and the tracker. It asks before a merge or a close.No
claude-hook, claude-repo-check, claude-prompt-search, claude-search-gateClaude Code hooks (see Claude Code). The search gate makes Claude search Pensieve before it greps.Yes

Skills go once into ~/.agents/skills, the user skills folder that many agents read. Claude Code reads only its own folder, so it gets a link in ~/.claude/skills. Pensieve makes no folder for an agent that is not installed.

pensieve integrate cursor-mcp codex                  # only these
pensieve integrate pensieve-teammates pensieve-plan  # the optional skills
pensieve integrate claude --remove                   # removes exactly what was added

Something wrong or missing? Tell us on GitHub.