cursor-chats-bridge

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).

Category
Visit Server

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.

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.


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:

  1. Only the currently-open chat per workspace keeps its messages stored locally — older chats are archived to Cursor's cloud, leaving only metadata.
  2. 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 schtasks and the Windows Cursor path)
  • Python 3.10+ with pythonw.exe available (silent runner for the scheduled task)
  • Claude Code CLI on PATH (claude --version should 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)

  1. Drop the folder into your Claude Code skills directory:

    ~/.claude/skills/cursor-chats-bridge/
    

    On Windows: C:\Users\<you>\.claude\skills\cursor-chats-bridge\.

  2. Restart Claude Code (or just open a new session).

  3. 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.

  4. Claude reads SKILL.md, runs scripts/install.ps1, and reports the result.

  5. 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:

  1. Verifies prerequisites (Python, pythonw.exe, claude CLI, Cursor SQLite path)
  2. Copies server.py and poller.py to ~/.claude/mcp/cursor-chats/
  3. Installs the Python mcp package via pip if missing
  4. Removes any prior cursor-chats MCP registration, then adds it (default scope: local)
  5. Creates / updates the ClaudeCursorChatPoller scheduled task (every 5 min, silent via pythonw.exe)
  6. 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_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.

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 local means the bridge is only active in the project where you ran the installer. Use -Scope user to 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 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.
  • 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

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Exa Search

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.

Official
Featured