professorpalmer/cursor-buddy

Cursor plugin: copy archived chats out of the renderer DB into a local SQLite vault and search them over MCP.

2

stars

2

commits

Python

primary language

Aug 28, 2026

updated

README

Cursor Buddy

Cursor's Archive button hides chats. The rows stay in state.vscdb, and Cursor Helper (Renderer) keeps paying for them.

This is a Cursor plugin (not a standalone MCP dump): rules, skills, commands, logo, and an MCP server that searches a local SQLite vault. You ask “when did we talk about the memory leak?”; the agent pulls snippets. Ask for the whole transcript and it reads that chat into this conversation — not back into the renderer.

Query the archive. Do not load it back into the renderer.

Measured on one Mac, 28 Aug 2026, after export, before prune: renderer 1.97 GB RSS, state.vscdb 3.68 GB (233 archived + 79 active), vault 2.68 GB (232 chats, 13,577 searchable messages). Search is 1-10 ms. Your numbers will differ.

Query vs RAM

You wantPlugin surfaceWhat RAM it uses
Find the chatsMCP search_archive, /search-archiveVault SQLite. Renderer unchanged.
Read one chatMCP read_composerAgent context in this thread. Still not the renderer.
Shrink Cursor/export-archived, Quit (Cmd+Q), /prune-from-cursorDeletes vaulted archived rows from state.vscdb.

Nothing is copied back into Cursor's live DB. Sidebar Archive is not this.

This is not a second Portable LLM Wiki. The wiki is markdown pages, [[wikilinks]], and Karpathy ingest. Buddy is a dump-and-query archive of Cursor composers. It steals the wiki's retrieval habits (composer as page, skip hub chats, empty index stays empty), not the wiki product.

Install

Requires Python 3 on PATH (the MCP server is stdio Python shipped inside the plugin).

Local plugin (this is how Cursor loads it)

Cursor discovers Cursor Plugins from ~/.cursor/plugins/local when local plugin imports are allowed (docs).

git clone https://github.com/professorpalmer/cursor-buddy.git
mkdir -p ~/.cursor/plugins/local
rsync -a --delete --exclude .git cursor-buddy/ ~/.cursor/plugins/local/cursor-buddy/

Then Developer: Reload Window. Open Customize and confirm:

  • Plugin: Cursor Buddy
  • Rule: vault-not-live-db
  • Skill: archived-chats
  • Commands: /export-archived, /prune-from-cursor, /search-archive
  • MCP: cursor-buddy with list_composers, search_archive, read_composer

The bundled mcp.json uses python3 plus ${PLUGIN_ROOT}/bin/cursor-buddy (Agent Plugins spawn shape: interpolate PLUGIN_ROOT in args/cwd, never in command). If MCP connects with 0 tools, Cursor is still starting the server with cwd = home and not expanding ${PLUGIN_ROOT}. Set args[0] in ~/.cursor/plugins/local/cursor-buddy/mcp.json to that copy's absolute bin/cursor-buddy path and reload.

After install

# Safe while Cursor is open
python3 ~/.cursor/plugins/local/cursor-buddy/bin/cursor-buddy export

# Requires Cmd+Q first
python3 ~/.cursor/plugins/local/cursor-buddy/bin/cursor-buddy prune          # dry-run
python3 ~/.cursor/plugins/local/cursor-buddy/bin/cursor-buddy prune --apply

Vault path: ~/Library/Application Support/cursor-buddy/vault.sqlite. Active (unarchived) chats are never exported or pruned.

Marketplace listing (after review): cursor.com/marketplace/publish.

Components

KindPath
Manifest.cursor-plugin/plugin.json
MCPmcp.jsonbin/cursor-buddy mcp
Skillskills/archived-chats/
Rulerules/vault-not-live-db.mdc
Commandscommands/*.md
Hookshooks/hooks.json (export on workspace/session)
Logoassets/logo.svg

Automation

Archive in the sidebar still does not copy or delete anything. Buddy splits the job:

  1. Ingest (safe while Cursor is open). export copies newly archived chats into the vault. Plugin hooks run that on workspaceOpen, sessionStart, and sessionEnd. Unchanged chats are skipped.
  2. Prune (only after Cursor releases state.vscdb). Never from a hook that runs while the app is open. Install a LaunchAgent that prunes once the DB is idle:
python3 ~/.cursor/plugins/local/cursor-buddy/bin/cursor-buddy install-automation

If you archive a chat tonight, the next workspace open or agent session copies it. After you Quit (Cmd+Q), leave Cursor closed for a minute so prune-if-idle can delete those rows (VACUUM can take a bit on a large state.vscdb). Active chats are never touched.

Manual export/prune still works.

search_archive keeps distinctive tokens (length >= 3, stop list), requires every token to appear in the same composer (title or messages, not necessarily one bubble), and caps hits per composer so a 50k-bubble chat cannot fill the result. Stop-only queries return nothing. Tool bubbles with empty text are not indexed; composerData / plan blobs are not dumped into FTS.

License

MIT

Contributors

professorpalmer/cursor-buddy

Cursor plugin: copy archived chats out of the renderer DB into a local SQLite vault and search them over MCP.

2

stars

2

commits

Python

primary language

Aug 28, 2026

updated

README

Cursor Buddy

Cursor's Archive button hides chats. The rows stay in state.vscdb, and Cursor Helper (Renderer) keeps paying for them.

This is a Cursor plugin (not a standalone MCP dump): rules, skills, commands, logo, and an MCP server that searches a local SQLite vault. You ask “when did we talk about the memory leak?”; the agent pulls snippets. Ask for the whole transcript and it reads that chat into this conversation — not back into the renderer.

Query the archive. Do not load it back into the renderer.

Measured on one Mac, 28 Aug 2026, after export, before prune: renderer 1.97 GB RSS, state.vscdb 3.68 GB (233 archived + 79 active), vault 2.68 GB (232 chats, 13,577 searchable messages). Search is 1-10 ms. Your numbers will differ.

Query vs RAM

You wantPlugin surfaceWhat RAM it uses
Find the chatsMCP search_archive, /search-archiveVault SQLite. Renderer unchanged.
Read one chatMCP read_composerAgent context in this thread. Still not the renderer.
Shrink Cursor/export-archived, Quit (Cmd+Q), /prune-from-cursorDeletes vaulted archived rows from state.vscdb.

Nothing is copied back into Cursor's live DB. Sidebar Archive is not this.

This is not a second Portable LLM Wiki. The wiki is markdown pages, [[wikilinks]], and Karpathy ingest. Buddy is a dump-and-query archive of Cursor composers. It steals the wiki's retrieval habits (composer as page, skip hub chats, empty index stays empty), not the wiki product.

Install

Requires Python 3 on PATH (the MCP server is stdio Python shipped inside the plugin).

Local plugin (this is how Cursor loads it)

Cursor discovers Cursor Plugins from ~/.cursor/plugins/local when local plugin imports are allowed (docs).

git clone https://github.com/professorpalmer/cursor-buddy.git
mkdir -p ~/.cursor/plugins/local
rsync -a --delete --exclude .git cursor-buddy/ ~/.cursor/plugins/local/cursor-buddy/

Then Developer: Reload Window. Open Customize and confirm:

  • Plugin: Cursor Buddy
  • Rule: vault-not-live-db
  • Skill: archived-chats
  • Commands: /export-archived, /prune-from-cursor, /search-archive
  • MCP: cursor-buddy with list_composers, search_archive, read_composer

The bundled mcp.json uses python3 plus ${PLUGIN_ROOT}/bin/cursor-buddy (Agent Plugins spawn shape: interpolate PLUGIN_ROOT in args/cwd, never in command). If MCP connects with 0 tools, Cursor is still starting the server with cwd = home and not expanding ${PLUGIN_ROOT}. Set args[0] in ~/.cursor/plugins/local/cursor-buddy/mcp.json to that copy's absolute bin/cursor-buddy path and reload.

After install

# Safe while Cursor is open
python3 ~/.cursor/plugins/local/cursor-buddy/bin/cursor-buddy export

# Requires Cmd+Q first
python3 ~/.cursor/plugins/local/cursor-buddy/bin/cursor-buddy prune          # dry-run
python3 ~/.cursor/plugins/local/cursor-buddy/bin/cursor-buddy prune --apply

Vault path: ~/Library/Application Support/cursor-buddy/vault.sqlite. Active (unarchived) chats are never exported or pruned.

Marketplace listing (after review): cursor.com/marketplace/publish.

Components

KindPath
Manifest.cursor-plugin/plugin.json
MCPmcp.jsonbin/cursor-buddy mcp
Skillskills/archived-chats/
Rulerules/vault-not-live-db.mdc
Commandscommands/*.md
Hookshooks/hooks.json (export on workspace/session)
Logoassets/logo.svg

Automation

Archive in the sidebar still does not copy or delete anything. Buddy splits the job:

  1. Ingest (safe while Cursor is open). export copies newly archived chats into the vault. Plugin hooks run that on workspaceOpen, sessionStart, and sessionEnd. Unchanged chats are skipped.
  2. Prune (only after Cursor releases state.vscdb). Never from a hook that runs while the app is open. Install a LaunchAgent that prunes once the DB is idle:
python3 ~/.cursor/plugins/local/cursor-buddy/bin/cursor-buddy install-automation

If you archive a chat tonight, the next workspace open or agent session copies it. After you Quit (Cmd+Q), leave Cursor closed for a minute so prune-if-idle can delete those rows (VACUUM can take a bit on a large state.vscdb). Active chats are never touched.

Manual export/prune still works.

search_archive keeps distinctive tokens (length >= 3, stop list), requires every token to appear in the same composer (title or messages, not necessarily one bubble), and caps hits per composer so a 50k-bubble chat cannot fill the result. Stop-only queries return nothing. Tool bubbles with empty text are not indexed; composerData / plan blobs are not dumped into FTS.

License

MIT

Contributors

Languages

Python

100.0%