Skip to content

[FEATURE] Support Model Context Protocol (MCP) to Integrate with Cursor, Claude Code and Other AI Assistants #246

Description

@kaya-abdullah

Is your feature request related to a problem?

As AI coding assistants like Cursor, Claude Code, Gemini CLI, and OpenAI Codex become part of developers' daily workflows, databases remain disconnected from these tools.

Today, developers typically need to:

  • Switch between their AI assistant and a database client
  • Manually copy and execute SQL queries
  • Inspect schemas separately
  • Provide database context manually to the AI

This fragmented workflow slows development, increases context switching, and reduces the effectiveness of AI-assisted database development.


Describe the solution you'd like

Implement native support for the Model Context Protocol (MCP) so LibreDB Studio can expose databases, schemas, metadata, and query execution capabilities to MCP-compatible AI assistants.

The MCP server should allow AI clients to:

  • Discover available database connections
  • Browse schemas, tables, columns, indexes, and relationships
  • Generate SQL using live schema information
  • Execute SQL with configurable permissions
  • Explain execution plans
  • Return structured query results
  • Support multiple database engines through a unified interface

Compatible clients may include:

  • Cursor
  • Claude Code
  • Gemini CLI
  • OpenAI Codex
  • Any future MCP-compatible client

Describe alternatives you've considered

Current alternatives include:

  • Copying SQL manually between the AI assistant and LibreDB Studio
  • Exporting database schemas
  • Using third-party MCP servers
  • Writing custom integration scripts

These approaches duplicate existing functionality, require additional setup, and cannot leverage LibreDB Studio's existing connection management, permissions, metadata, and AI capabilities.

Native MCP support would provide a significantly better developer experience.


Use Case

A developer is working inside Cursor.

Instead of switching to LibreDB Studio:

  1. The AI discovers an available PostgreSQL connection through MCP.
  2. It reads the database schema.
  3. It generates an optimized SQL query.
  4. It asks for confirmation.
  5. LibreDB Studio executes the query.
  6. Results are returned directly to the AI assistant.

The developer stays inside their coding environment throughout the entire workflow.


Additional Context

The Model Context Protocol is rapidly becoming the standard integration layer between AI assistants and developer tools.

Adding MCP support would position LibreDB Studio as an AI-native database workspace and enable seamless integration with the growing MCP ecosystem.

Potential future capabilities include:

  • Read-only mode
  • Role-based execution policies
  • Approval workflows
  • Query history
  • Shared contexts
  • Team-aware database access

Implementation Notes (Optional)

Possible architecture:

  • Embedded MCP Server
  • STDIO transport
  • HTTP/SSE transport (optional)
  • Authentication using existing LibreDB Studio credentials or API tokens
  • Permission-aware execution layer
  • Read-only and read-write execution modes

Possible exposed tools/resources:

  • List databases
  • List schemas
  • List tables
  • Describe table
  • Execute query
  • Explain query
  • List indexes
  • List functions
  • Get ER diagram
  • Provide schema context for AI

Related Issues

None.

Metadata

Metadata

Assignees

Labels

aiArtificial intelligenceenhancementNew feature or requestgood first issueGood for newcomersloop:needs-infoMaintainer-loop task blocked on human-reviewed clarification

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions