loading…
Search for a command to run...
loading…
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 sta
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).
A read-only bridge that lets Claude Code see what you're doing in Cursor — in real time and across sessions.
platform: windows license: MIT
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.
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.
Cursor's chat data lives locally in a SQLite KV store (%APPDATA%\Cursor\User\globalStorage\state.vscdb), but with two annoying constraints:
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.
┌──────────────────────────────────────────────────────────────────┐
│ 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.
schtasks and the Windows Cursor path)pythonw.exe available (silent runner for the scheduled task)PATH (claude --version should work)The installer checks all of these and fails fast with actionable errors if something is missing.
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, runs scripts/install.ps1, and reports the result.
Restart Claude Desktop (full quit from the system tray) to load the MCP server.
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:
pythonw.exe, claude CLI, Cursor SQLite path)server.py and poller.py to ~/.claude/mcp/cursor-chats/mcp package via pip if missingcursor-chats MCP registration, then adds it (default scope: local)ClaudeCursorChatPoller scheduled task (every 5 min, silent via pythonw.exe)Re-running is safe: every step uses force-overwrite semantics. State files (active_snapshot.json, journal.ndjson) are preserved.
| 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. |
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."
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_chat to 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 with get_chat.
mode=ro,immutable=1). Even a buggy script cannot modify Cursor's data.~/.claude/, protected by Windows ACLs at the user-profile level. Nothing is uploaded.local means the bridge is only active in the project where you ran the installer. Use -Scope user to make it global.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.
schtasks, ~/Library/Application Support/Cursor/... path on macOS) but not implemented yet.cursorDiskKV or changes the composer JSON shape between versions, the scripts may need a one-line patch. Check poller.log if the journal stops growing.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)
Pull requests welcome — especially for:
MIT — do whatever you want, no warranty. See LICENSE.
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.
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"cursor-chats-bridge": {
"command": "npx",
"args": []
}
}
}