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
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
- Open Cursor and navigate to Settings->Cursor Settings->MCP.
- Click: Add new MCP server
- Name: Cursor DB MCP; Type: Command
- Command: <fully qualified path to>uv run --with mcp[cli] mcp run <fully qualified path to>/cursor-db-mcp-server.py
Now you can ask questions about the database or retrieve info about historical chats.
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"
]
}
Available Resources
cursor://projects- List all available Cursor projectscursor://projects/detailed- List projects with detailed informationcursor://projects/{project_name}/chat- Get chat data for a specific projectcursor://projects/{project_name}/composers- Get composer IDs for a specific projectcursor://composers/{composer_id}- Get data for a specific composer
Available Tools
query_table- Query a specific table in a project's databaserefresh_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
- 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.
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
940dadb328c5117d171b88ca2b0e41ded198fe7ef1dfa9547535efefc8738d30
|
|
| MD5 |
44237f8511263ce772becbdc35e28f08
|
|
| BLAKE2b-256 |
c8249aa263cee135836b52d7148926269edc9cff32f4c71300b7014f81276221
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
322dd204449ede67d0884751f470042265aa35a93d366667d3e893f89326a08f
|
|
| MD5 |
2c1bfc5c464c3a0dc674ed28b8db6c30
|
|
| BLAKE2b-256 |
e71c245bfaeb26610cfcaf747b0d011a6c12a8fc74188c97e7f4eff5301a8384
|