← Back to directory
M

MCP Database Server

Community
MCP server that provides database access to Claude for SQLite, SQL Server, PostgreSQL, and MySQL
GitHub source repository ↗
★ 379 Stars Category · Database Popular Source revision d6afa4be08eb
57FMRS · C
Reliability
10/20
Security and permissions
8/20
Maintenance
12/20
Documentation
15/20
Setup experience
12/20

This server provides a rich set of database operation tools, covering multiple database types with flexible configuration. However, users need to be cautious with write operations and credential security.

Read the FMRS scoring method →

MCP Database Server is a Model Context Protocol (MCP) server that enables Claude to interact with various relational databases through a set of tools. It supports SQLite, SQL Server, PostgreSQL, and MySQL. The server provides capabilities for executing queries, managing table schemas, exporting data, and recording business insights.

Tools

read_query
Execute SELECT queries to read data
write_query
Execute INSERT, UPDATE, or DELETE queries
create_table
Create new tables in the database
alter_table
Modify existing table schema
drop_table
Remove a table from the database
list_tables
Get a list of all tables
describe_table
View schema information for a table
export_query
Export query results as CSV or JSON
append_insight
Add a business insight to memo
list_insights
List all business insights

Setup

  1. Install the npm package globally: npm install -g @executeautomation/database-server
  2. Add the corresponding MCP server configuration in the Claude Desktop configuration file, using the npx command to start.
claude_desktop_config.json
{
  "mcpServers": {
    "sqlite": {
      "command": "npx",
      "args": [
        "-y",
        "@executeautomation/database-server",
        "/path/to/your/database.db"
      ]
    },
    "sqlserver": {
      "command": "npx",
      "args": [
        "-y",
        "@executeautomation/database-server",
        "--sqlserver",
        "--server",
        "your-server-name",
        "--database",
        "your-database-name",
        "--user",
        "your-username",
        "--password",
        "your-password"
      ]
    },
    "postgresql": {
      "command": "npx",
      "args": [
        "-y",
        "@executeautomation/database-server",
        "--postgresql",
        "--host",
        "your-host-name",
        "--database",
        "your-database-name",
        "--user",
        "your-username",
        "--password",
        "your-password"
      ]
    },
    "mysql": {
      "command": "npx",
      "args": [
        "-y",
        "@executeautomation/database-server",
        "--mysql",
        "--host",
        "your-host-name",
        "--database",
        "your-database-name",
        "--port",
        "3306",
        "--user",
        "your-username",
        "--password",
        "your-password"
      ]
    },
    "mysql-aws": {
      "command": "npx",
      "args": [
        "-y",
        "@executeautomation/database-server",
        "--mysql",
        "--aws-iam-auth",
        "--host",
        "your-rds-endpoint.region.rds.amazonaws.com",
        "--database",
        "your-database-name",
        "--user",
        "your-aws-username",
        "--aws-region",
        "us-east-1"
      ]
    }
  }
}

Fit and risk

Best for

  • Developers who need to interact with multiple database types
  • Claude users who want to operate databases using natural language
  • Scenarios requiring quick data export or insight recording

Not for

  • Scenarios requiring complex transaction handling or fine-grained permission control
  • High-concurrency database access in production environments
  • Non-relational databases (e.g., MongoDB)

Required permissions

  • Requires database credentials (username, password)
  • May require network access to connect to remote databases
  • Requires file system access (for SQLite files)

Risks and side effects

  • Write operations may cause data loss or corruption; use with caution
  • Credentials may be recorded in configuration files; manage carefully
  • Open network ports may pose security risks

Troubleshooting

  1. Check that Node.js version is >= 18
  2. Ensure database connection parameters (host, port, database name) are correct
  3. For SQL Server, ensure server version >= 2012; for PostgreSQL, ensure version >= 9.5
  4. Check firewall or network settings to ensure access to the database port
  5. Check logs for more detailed error information

Use cases

Query data from local or remote SQLite databases using natural language
Perform write operations on SQL Server, PostgreSQL, or MySQL databases
Create and modify table schemas
Export data from the database to CSV or JSON formats
Record and retrieve business insights

Supported clients

Claude DesktopFull support