Skip to main content
Glama
MCP Database Manager

MCP Database Manager

by meimingqi222

MCP Database Manager

An MCP server that enables LLM agents to perform CRUD operations across multiple databases.

Features

  • Multi-Database Support

  • Permission Management (Read-only by default)

  • SQLAlchemy Integration

  • list_connections redacts passwords from connection URLs in its output

Related MCP server: Universal Database MCP Server

Database Support

This MCP server supports multiple databases. You can enable specific database drivers using installation extras:

Extra

Database

Drivers Installed

postgres

PostgreSQL

psycopg2-binary

mysql

MySQL

pymysql, cryptography

mssql

SQL Server

pymssql

all

All of the above

All drivers

Configuration

The configuration file is located at:

  • ~/.mcp-database-manager/config.yaml (on all platforms)

Example config.yaml:

connections:
  - name: "main_db"
    url: "sqlite:///./main.db"
    readonly: true

Cursor Configuration

To use this MCP server in Cursor, add the following to your MCP settings (Settings > Features > MCP):

Use this if you have the source code locally and want to test changes immediately.

{
  "mcpServers": {
    "database-manager": {
      "command": "uv",
      "args": [
        "run",
        "--extra",
        "all",
        "mcp-database-manager"
      ],
      "cwd": "/absolute/path/to/mcp-database-manager"
    }
  }
}

Note: Replace /absolute/path/to/mcp-database-manager with the actual path to your project directory.

Option 2: Using PyPI (Published version)

Use this to run the stable version published on PyPI without cloning the repository.

{
  "mcpServers": {
    "database-manager": {
      "command": "uvx",
      "args": [
        "--from",
        "mcp-database-manager[all]",
        "mcp-database-manager"
      ]
    }
  }
}

Troubleshooting

If you see "Module not found" errors, ensure you are using uv run which handles the virtual environment automatically.

Available Tools

4 tools
get_schemaA

获取数据库 schema(Markdown)。默认返回所有表的摘要;传入 table_names 时返回这些表的列详情。

Inputs: connection_name (required), table_names.

list_connectionsA

List configured database connections and their permission (readonly). Passwords are redacted from URLs in the output. Returns: JSON array of connection configs.

Inputs: include_urls (required).

read_sqlA

执行只读 SQL 查询(例如 SELECT/SHOW/PRAGMA)。 Returns: JSON array of rows.

Inputs: connection_name (required), query (required).

write_sqlA

执行写入 SQL(INSERT/UPDATE/DELETE/DDL)。 仅当连接 readonly=false 时允许。 Returns: JSON {status, rows_affected}.

Inputs: connection_name (required), query (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.3/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool has a clearly distinct purpose: schema retrieval, connection listing, read-only queries, and write queries. There is no overlap or ambiguity.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern with lowercase and underscores: get_schema, list_connections, read_sql, write_sql. The pattern is predictable and easy to understand.

    Tool Count5/5

    With 4 tools covering essential database operations (schema inspection, connection management, read queries, write queries), the count is well-scoped for the server's purpose.

    Completeness4/5

    The tool set covers core database interactions: schema inspection, read/write operations, and connection management. Minor gaps like transaction control or query analysis tools might be missing, but the set is largely complete for basic usage.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables LLM agents to perform complete database operations on SQLite databases, including creating tables, executing queries, and managing data through CRUD operations with schema inspection capabilities.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to safely explore and query databases across SQLite, PostgreSQL, MySQL, and MSSQL, with schema introspection, natural language queries, and data profiling.
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables LLMs to safely explore, query, diagnose, and modify relational databases through a unified set of schema introspection, SQL execution, and administration tools. Supports multiple database backends with AST-level read-only guards, automatic LIMIT injection, and explicit opt-in write permissions for DML and DDL.
      6
      58 PyPI
      1
      Apache 2.0