Skip to main content

Cursor DB MCP Server

A Model Context Protocol (MCP) server for accessing Cursor IDE's SQLite databases. This server allows AI assistants to explore and interact with Cursor's project data, chat history, and composer information.

Cursor In Cursor GIF

Prerequisites

Cursor IDE

Installation

Easy Installation

Use the provided installation script to install all dependencies:

python install.py

This script will install:

  • Basic MCP server and dependencies

Using with Cursor IDE

  1. Open Cursor and navigate to Settings->Cursor Settings->MCP.
  2. Click: Add new MCP server
  3. Name: Cursor DB MCP; Type: Command
  4. Command: <fully qualified path to>uv run --with mcp[cli] mcp run <fully qualified path to>/cursor-db-mcp-server.py

Cursor DB MCP

Now you can ask questions about the database or retrieve info about historical chats.

DB structure

DB keys

Using with Claude Desktop

Installing MCP servers for Claude Desktop

Add this to your claude_desktop_config.json file

    "cursor-db-mcp": {
      "command": "<fully qualified path to >/uv",
      "args": [
        "run",
        "--with",
        "mcp[cli]",
        "mcp",
        "run",
        "<fully qualified path to >/cursor-db-mcp-server.py"
      ]
    }

Cursor DB fuzzy search

Available Resources

  • cursor://projects - List all available Cursor projects
  • cursor://projects/detailed - List projects with detailed information
  • cursor://projects/{project_name}/chat - Get chat data for a specific project
  • cursor://projects/{project_name}/composers - Get composer IDs for a specific project
  • cursor://composers/{composer_id} - Get data for a specific composer

Available Tools

  • query_table - Query a specific table in a project's database
  • refresh_databases - Refresh the list of database paths

How It Works

The server scans your Cursor installation directory to find project databases (state.vscdb files). It then exposes these databases through MCP resources and tools, allowing AI assistants to query and analyze the data.

Notes

  1. Cursor stores AI conversations in different places. Increasingly, chats are stored as "composerData" under globalStorage/state.vscdb. If you don't get results when asking about chats for recent projects, try asking for composers.
  2. This was written on a Mac. YMMV with other OS

Shameless Plug

Like this? Try Cursor Journal to create DevLogs directly from Cursor chat history!

License

MIT

Metadata

Release files for iflow-mcp_jbdamask_cursor-db-mcp 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for iflow-mcp_jbdamask_cursor-db-mcp 0.1.0
File Size Uploaded
iflow_mcp_jbdamask_cursor_db_mcp-0.1.0.tar.gz 12.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for iflow-mcp_jbdamask_cursor-db-mcp 0.1.0
File Interpreter ABI Platform
iflow_mcp_jbdamask_cursor_db_mcp-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 23.4 kB

Release files / iflow_mcp_jbdamask_cursor_db_mcp-0.1.0.tar.gz

Download URL iflow_mcp_jbdamask_cursor_db_mcp-0.1.0.tar.gz
Size 12.6 kB
Tags Source
SHA-256 checksum
How to use checksums
940dadb328c5117d171b88ca2b0e41ded198fe7ef1dfa9547535efefc8738d30
BLAKE2b-256 checksum
How to use checksums
c8249aa263cee135836b52d7148926269edc9cff32f4c71300b7014f81276221
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / iflow_mcp_jbdamask_cursor_db_mcp-0.1.0-py3-none-any.whl

Download URL iflow_mcp_jbdamask_cursor_db_mcp-0.1.0-py3-none-any.whl
Size 10.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
322dd204449ede67d0884751f470042265aa35a93d366667d3e893f89326a08f
BLAKE2b-256 checksum
How to use checksums
e71c245bfaeb26610cfcaf747b0d011a6c12a8fc74188c97e7f4eff5301a8384
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page