ExecuteAutomation Database Server MCP server

Enables direct interaction with SQLite and SQL Server databases through a modular adapter architecture for data analysis, database management, and business intelligence workflows without exposing raw credentials.
Back to servers
Setup instructions
Provider
ExecuteAutomation
Release date
Apr 13, 2025
Language
TypeScript
Stats
138 stars

The MCP Database Server provides a powerful way to give Claude access to various database systems including SQLite, SQL Server, PostgreSQL, and MySQL through the Model Context Protocol (MCP). This server acts as a bridge between Claude and your databases, allowing Claude to execute SQL queries and perform database operations.

Installation Options

You can use the MCP Database Server in two different ways:

Global Installation

The easiest way to get started is by installing the package globally:

npm install -g @executeautomation/database-server

This allows you to use the server without building it locally.

Local Development Setup

If you prefer to run the server from your local environment:

  1. Clone the repository:
git clone https://github.com/executeautomation/mcp-database-server.git
cd database-server
  1. Install dependencies:
npm install
  1. Build the project:
npm run build

Usage Instructions

SQLite Database

To use with an SQLite database:

node dist/src/index.js /path/to/your/database.db

SQL Server Database

To use with a SQL Server database:

node dist/src/index.js --sqlserver --server <server-name> --database <database-name> [--user <username> --password <password>]

Required parameters:

  • --server: SQL Server host name or IP address
  • --database: Name of the database

Optional parameters:

  • --user: Username for SQL Server authentication (if not provided, Windows Authentication will be used)
  • --password: Password for SQL Server authentication
  • --port: Port number (default: 1433)

PostgreSQL Database

To use with a PostgreSQL database:

node dist/src/index.js --postgresql --host <host-name> --database <database-name> [--user <username> --password <password>]

Required parameters:

  • --host: PostgreSQL host name or IP address
  • --database: Name of the database

Optional parameters:

  • --user: Username for PostgreSQL authentication
  • --password: Password for PostgreSQL authentication
  • --port: Port number (default: 5432)
  • --ssl: Enable SSL connection (true/false)
  • --connection-timeout: Connection timeout in milliseconds (default: 30000)

MySQL Database

Standard Authentication

To use with a MySQL database:

node dist/src/index.js --mysql --host <host-name> --database <database-name> --port <port> [--user <username> --password <password>]

Required parameters:

  • --host: MySQL host name or IP address
  • --database: Name of the database
  • --port: Port number (default: 3306)

Optional parameters:

  • --user: Username for MySQL authentication
  • --password: Password for MySQL authentication
  • --ssl: Enable SSL connection (true/false or object)
  • --connection-timeout: Connection timeout in milliseconds (default: 30000)

AWS IAM Authentication

For Amazon RDS MySQL instances with IAM database authentication:

node dist/src/index.js --mysql --aws-iam-auth --host <rds-endpoint> --database <database-name> --user <aws-username> --aws-region <region>

Required parameters:

  • --host: RDS endpoint hostname
  • --database: Name of the database
  • --aws-iam-auth: Enable AWS IAM authentication
  • --user: AWS IAM username (also the database user)
  • --aws-region: AWS region where RDS instance is located

Note: SSL is automatically enabled for AWS IAM authentication

Configuring Claude Desktop

Global Installation Configuration

If you installed the package globally, configure Claude Desktop with:

{
  "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"
      ]
    }
  }
}

Local Development Configuration

For local development, configure Claude Desktop to use your locally built version:

{
  "mcpServers": {
    "sqlite": {
      "command": "node",
      "args": [
        "/absolute/path/to/mcp-database-server/dist/src/index.js", 
        "/path/to/your/database.db"
      ]
    },
    "sqlserver": {
      "command": "node",
      "args": [
        "/absolute/path/to/mcp-database-server/dist/src/index.js",
        "--sqlserver",
        "--server", "your-server-name",
        "--database", "your-database-name",
        "--user", "your-username",
        "--password", "your-password"
      ]
    },
    "postgresql": {
      "command": "node",
      "args": [
        "/absolute/path/to/mcp-database-server/dist/src/index.js",
        "--postgresql",
        "--host", "your-host-name",
        "--database", "your-database-name",
        "--user", "your-username",
        "--password", "your-password"
      ]
    },
    "mysql": {
      "command": "node",
      "args": [
        "/absolute/path/to/mcp-database-server/dist/src/index.js",
        "--mysql",
        "--host", "your-host-name",
        "--database", "your-database-name",
        "--port", "3306",
        "--user", "your-username",
        "--password", "your-password"
      ]
    },
    "mysql-aws": {
      "command": "node",
      "args": [
        "/absolute/path/to/mcp-database-server/dist/src/index.js",
        "--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"
      ]
    }
  }
}

The Claude Desktop configuration file is typically located at:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

Available Database Tools

The MCP Database Server provides these tools for Claude to use:

Tool Description Required Parameters
read_query Execute SELECT queries to read data query: SQL SELECT statement
write_query Execute INSERT, UPDATE, or DELETE queries query: SQL modification statement
create_table Create new tables in the database query: CREATE TABLE statement
alter_table Modify existing table schema query: ALTER TABLE statement
drop_table Remove a table from the database table_name: Name of table
confirm: Safety flag (must be true)
list_tables Get a list of all tables None
describe_table View schema information for a table table_name: Name of table
export_query Export query results as CSV/JSON query: SQL SELECT statement
format: "csv" or "json"
append_insight Add a business insight to memo insight: Text of insight
list_insights List all business insights None

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "sqlite" '{"command":"npx","args":["-y","@executeautomation/database-server","/path/to/your/database.db"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "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"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "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"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later