Skip to main content

A Model Context Protocol (MCP) server for accessing Cursor IDE's SQLite databases

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iflow_mcp_jbdamask_cursor_db_mcp-0.1.0.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file iflow_mcp_jbdamask_cursor_db_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: iflow_mcp_jbdamask_cursor_db_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using 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}

File hashes

Hashes for iflow_mcp_jbdamask_cursor_db_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 940dadb328c5117d171b88ca2b0e41ded198fe7ef1dfa9547535efefc8738d30
MD5 44237f8511263ce772becbdc35e28f08
BLAKE2b-256 c8249aa263cee135836b52d7148926269edc9cff32f4c71300b7014f81276221

See more details on using hashes here.

File details

Details for the file iflow_mcp_jbdamask_cursor_db_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: iflow_mcp_jbdamask_cursor_db_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.8 kB
  • Tags: Python 3
  • Uploaded using 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}

File hashes

Hashes for iflow_mcp_jbdamask_cursor_db_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 322dd204449ede67d0884751f470042265aa35a93d366667d3e893f89326a08f
MD5 2c1bfc5c464c3a0dc674ed28b8db6c30
BLAKE2b-256 e71c245bfaeb26610cfcaf747b0d011a6c12a8fc74188c97e7f4eff5301a8384

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page