Cursor DB MCP Server

by jbdamask

Integrations

  • Provides access to Cursor IDE's SQLite databases, allowing for querying and analyzing data stored in state.vscdb files

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

  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

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

-
security - not tested
F
license - not found
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

A Model Context Protocol server that enables AI assistants to explore and interact with Cursor IDE's SQLite databases, providing access to project data, chat history, and composer information.

  1. Prerequisites
    1. Installation
      1. Easy Installation
    2. Using with Cursor IDE
      1. Using with Claude Desktop
    3. Available Resources
      1. Available Tools
        1. How It Works
          1. Notes
            1. Shameless Plug
              1. License

                Related MCP Servers

                • A
                  security
                  A
                  license
                  A
                  quality
                  A Model Context Protocol server that integrates with Linear, enabling AI assistants to create, update, search, and comment on issues for project management and issue tracking.
                  Last updated -
                  5
                  6
                  Python
                  Apache 2.0
                • A
                  security
                  F
                  license
                  A
                  quality
                  A starter template for building Model Context Protocol servers that can be integrated with Cursor or Claude Desktop, allowing developers to create custom tools and extensions for AI assistants.
                  Last updated -
                  1
                  6
                  9
                  TypeScript
                  • Apple
                • -
                  security
                  A
                  license
                  -
                  quality
                  A Model Context Protocol server implementation that enables AI assistants to execute SQL queries and interact with SQLite databases through a structured interface.
                  Last updated -
                  6
                  TypeScript
                  MIT License
                • A
                  security
                  A
                  license
                  A
                  quality
                  A Model Context Protocol server that enables AI assistants like Claude to interact with Outline document services, supporting document searching, reading, creation, editing, and comment management.
                  Last updated -
                  25
                  1
                  Python
                  MIT License

                View all related MCP servers

                ID: jl8t4c5oxo