cursor-chats-bridge
Read-only bridge between Claude Code and Cursor on Windows. Exposes Cursor's local chat database via 7 MCP tools, plus a 5-min background poller. The server starts and responds to introspection in a container, but tool calls require a Windows host with Cursor installed (the container is for directory checks only).
README
cursor-chats-bridge
A read-only bridge that lets Claude Code see what you're doing in Cursor — in real time and across sessions.
If you use Claude Code and Cursor in parallel — for example: agent-driven edits in Cursor while planning/auditing with Claude — this skill plugs Cursor's local chat database into Claude as an MCP server, plus journals new messages every 5 minutes so Claude can answer questions like "what was Cursor doing this morning?" even when Claude wasn't running.
Read-only by design. Never modifies Cursor's data.
What you get
Once installed, Claude Code gains seven tools (all prefixed mcp__cursor-chats__):
| Tool | What it does |
|---|---|
list_workspaces |
List every Cursor workspace seen across your chat history, with hash IDs and paths. |
list_chats |
List Cursor chats, optionally filtered by workspace ID, path substring, or auto via Claude's cwd. |
get_chat |
Fetch the messages of a specific chat (by composer UUID). |
get_active_chat |
Convenience: fetch the live messages of the currently-open Cursor chat for a workspace. |
search_chats |
Substring search across chat names, subtitles, and message text. |
get_journal |
Read the append-only journal of new messages captured by the background poller. |
get_journal_summary |
Aggregate stats over a time window: messages by role, conversations touched, recent text snippets. |
Plus a Windows scheduled task ClaudeCursorChatPoller that runs every 5 minutes, detects new messages in each workspace's active chat, and appends them to a JSON-lines journal under ~/.claude/mcp/cursor-chats/journal.ndjson.
Why it exists
Cursor's chat data lives locally in a SQLite KV store (%APPDATA%\Cursor\User\globalStorage\state.vscdb), but with two annoying constraints:
- Only the currently-open chat per workspace keeps its messages stored locally — older chats are archived to Cursor's cloud, leaving only metadata.
- There's no public API.
So a live MCP query alone isn't enough: if you ask "what did Cursor do this morning?" at 3 PM, the relevant messages may already be archived. The poller solves that by capturing messages as they appear, with workspace tagging so different Claude projects can filter cleanly.
Architecture
┌──────────────────────────────────────────────────────────────────┐
│ Windows Task Scheduler >> pythonw poller.py >> /5 min, 24/7│
└──────────────────────────────────────────────────────────────────┘
│
▼ (read mode=ro,immutable=1)
┌──────────────────────────────────┐
│ Cursor SQLite globalStorage │ ← live, written by Cursor
│ state.vscdb / cursorDiskKV │
└──────────────────┬───────────────┘
│
▼ (append-only)
┌──────────────────────────────────┐
│ ~/.claude/mcp/cursor-chats/ │
│ ├─ active_snapshot.json │
│ ├─ journal.ndjson │
│ └─ poller.log (errors) │
└──────────────────┬───────────────┘
│
▼ (on-demand)
┌──────────────────────────────────┐
│ MCP server (server.py) │
│ exposes 7 tools │
└──────────────────┬───────────────┘
│
▼
Claude Code
For deeper internals (SQLite key patterns, workspace identification, edge cases), see references/architecture.md.
Requirements
- Windows 10 / 11 (Linux/macOS not yet supported — uses
schtasksand the Windows Cursor path) - Python 3.10+ with
pythonw.exeavailable (silent runner for the scheduled task) - Claude Code CLI on
PATH(claude --versionshould work) - Cursor installed and opened at least once (the SQLite is created on first run)
The installer checks all of these and fails fast with actionable errors if something is missing.
Install
As a Claude Code skill (recommended)
-
Drop the folder into your Claude Code skills directory:
~/.claude/skills/cursor-chats-bridge/On Windows:
C:\Users\<you>\.claude\skills\cursor-chats-bridge\. -
Restart Claude Code (or just open a new session).
-
Ask Claude something like "install the cursor-chats bridge" or "set up the Claude-Cursor connection" — the skill description is tuned to trigger on those phrasings.
-
Claude reads
SKILL.md, runsscripts/install.ps1, and reports the result. -
Restart Claude Desktop (full quit from the system tray) to load the MCP server.
Manual install (no Claude needed)
If you'd rather skip the agentic step:
powershell -ExecutionPolicy Bypass -File "C:\Users\<you>\.claude\skills\cursor-chats-bridge\scripts\install.ps1"
The script:
- Verifies prerequisites (Python,
pythonw.exe,claudeCLI, Cursor SQLite path) - Copies
server.pyandpoller.pyto~/.claude/mcp/cursor-chats/ - Installs the Python
mcppackage via pip if missing - Removes any prior
cursor-chatsMCP registration, then adds it (default scope:local) - Creates / updates the
ClaudeCursorChatPollerscheduled task (every 5 min, silent viapythonw.exe) - Runs the poller once to seed the snapshot/journal
Re-running is safe: every step uses force-overwrite semantics. State files (active_snapshot.json, journal.ndjson) are preserved.
Installer flags
| Flag | Effect |
|---|---|
-Quiet |
Suppress progress output. |
-NoTask |
Skip creating the scheduled task (one-shot use / debugging). |
-Scope local|user|project |
MCP registration scope. Default local (current project only). Use user for global. Don't use project — that would write to .mcp.json which is intended to be committed. |
Verify
After install + Claude restart:
claude mcp list
schtasks /Query /TN ClaudeCursorChatPoller /FO LIST
Both should show entries; the claude mcp list line should report ✓ Connected for cursor-chats.
In a Claude session, you can then ask:
"List my Cursor workspaces." "What's the latest message from my Cursor agent?" "Summarize what I did with Cursor this morning."
How Claude uses it (typical patterns)
The MCP doesn't poll on its own — Claude calls the tools when it makes sense. The background poller (separate process) handles continuous capture, so journal queries answer "what happened while you weren't looking" without keeping a live conversation open.
Examples:
-
Pickup — "continue what I was doing with Cursor" → Claude calls
get_active_chatto fetch the live conversation, summarizes, asks where to take over. -
Recap — "recap of my Cursor activity since 9 AM" → Claude calls
get_journal_summary(window_minutes=N)and walks you through what changed. -
Cross-check — "is what Cursor is suggesting consistent with our plan?" → Claude reads the latest Cursor messages, compares to its own context, flags discrepancies.
-
Search — "where did I discuss the SQL backfill with Cursor?" → Claude calls
search_chats("backfill"), then drills into a hit withget_chat.
Privacy & security
- Read-only by SQLite enforcement (
mode=ro,immutable=1). Even a buggy script cannot modify Cursor's data. - All data stays local. The journal and snapshots are under
~/.claude/, protected by Windows ACLs at the user-profile level. Nothing is uploaded. - Credentials caveat. Your Cursor chats may contain pasted API keys, passwords, etc. The journal stores message text verbatim. If that's a concern, be selective about what you paste into Cursor, or filter the journal post-hoc.
- MCP scope. Default
localmeans the bridge is only active in the project where you ran the installer. Use-Scope userto make it global.
Uninstall
powershell -ExecutionPolicy Bypass -File "<skill-dir>\scripts\uninstall.ps1"
Removes the scheduled task, unregisters the MCP from Claude, and deletes ~/.claude/mcp/cursor-chats/ by default. Pass -KeepData to preserve active_snapshot.json and journal.ndjson.
Limits & known issues
- Windows only. macOS/Linux variants are doable (cron instead of
schtasks,~/Library/Application Support/Cursor/...path on macOS) but not implemented yet. - Cursor schema dependency. The bridge reads undocumented Cursor internals. If Cursor renames
cursorDiskKVor changes the composer JSON shape between versions, the scripts may need a one-line patch. Checkpoller.logif the journal stops growing. - Active chat only. Older / archived chats give metadata only. Live messages exist only for the currently-open chat per workspace.
- No backfill. The poller skips historical messages on first sight of a workspace (would otherwise flood the journal). Only future messages are captured.
- Cursor must be open for new messages to land in the SQLite. If Cursor is closed, the poller still runs cleanly but writes no new entries.
Project layout
cursor-chats-bridge/
├── SKILL.md # YAML frontmatter + Claude-facing instructions
├── README.md # this file
├── scripts/
│ ├── server.py # MCP server (Python, ~300 lines)
│ ├── poller.py # Background poller (Python, ~180 lines)
│ ├── install.ps1 # Idempotent installer
│ └── uninstall.ps1 # Clean removal
└── references/
└── architecture.md # Deep technical doc (SQLite layout, edge cases)
Contributing
Pull requests welcome — especially for:
- macOS / Linux support (cron + Library/Application Support paths)
- Schema-resilience: helpers to detect Cursor version changes early
- Optional journal rotation / compression
- Better triggering of the skill on non-French queries
License
MIT — do whatever you want, no warranty. See LICENSE.
Disclaimer
This is a third-party tool, not affiliated with Anthropic or Cursor. It reads Cursor's local data through unofficial means and may break with future Cursor versions. Use at your own discretion, especially on machines where you handle sensitive data.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.