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 IDE
Use the provided installation script to install all dependencies:
python install.py
This script will install:
- Basic MCP server and dependencies
- 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.
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
query_table
- Query a specific table in a project's databaserefresh_databases
- Refresh the list of database paths
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.
- 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
Like this? Try Cursor Journal to create DevLogs directly from Cursor chat history!
MIT