Database MCP server

Databases

MCP Database Server is a new MCP Server which helps connect with Sqlite, SqlServer and Posgresql Databases.

Your AI app calls the Database MCP server, which does the databases work and sends the result back to the chat.

About Database

Database is a community MCP server from executeautomation, filed in our directory under databases. MCP Database Server is a new MCP Server which helps connect with Sqlite, SqlServer and Posgresql Databases.

At a glance

Publisher
executeautomation (community)
Runs
See the README for setup
Written in
TypeScript
License
MIT
GitHub stars
409

How to set up Database

  1. Follow the install steps in the Database README; it is written in TypeScript, so have that toolchain ready.
  2. Check the Database README for keys or settings; the registry lists none that Database requires.
  3. Add Database to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Database tools to confirm the connection.
  5. Run one read-only task with Database first, and keep your app asking before each tool call until the results look right.

Database compared with similar servers

  • Bagel by Extelligence-ai has fewer GitHub stars than Database (408 against 409); both are community servers, and both run locally.
  • Alchemy by runekaagaard has more GitHub stars than Database (420 against 409); both are community servers, and Alchemy runs as a remote server and Database runs on your own machine.
  • Mssql by RichardHan has fewer GitHub stars than Database (406 against 409); both are community servers, and both run locally.

Before you connect Database

  • Give Database its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Database tool call until you trust what it does with them.
  • Treat text that Database fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Database on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Database

How marketing and sales teams put Database to work, by company size. Pick the size closest to yours and start Database on one use case.

Small business

  • A small business with its own app can ask Database plain questions about customers and orders, without writing SQL.
  • Owners can use Database to pull a list of customers who haven't bought in 90 days and plan a win-back email.
  • Database runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Marketing analysts can connect Database to answer campaign questions from the warehouse directly, instead of waiting on the data team's queue.
  • Lifecycle teams can use Database to build audience lists from product data and check counts before a send.
  • Start Database on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprises should point Database at a read replica with a read-only role, so agents query freely without risk to production data.
  • Data teams can expose curated views through Database, so marketing gets self-serve answers without access to raw customer tables.
  • Database is a community server, so have security review the code and pin a version before Database touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Database README

From executeautomation/mcp-database-server on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

MCP Database Server

This MCP (Model Context Protocol) server provides database access capabilities to Claude, supporting SQLite, SQL Server, PostgreSQL, and MySQL databases.

Installation

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

Usage Options

There are two ways to use this MCP server with Claude:

  1. Direct usage: Install the package globally and use it directly
  2. Local development: Run from your local development environment
Direct Usage with NPM Package

The easiest way to use this MCP server is by installing it globally:

npm install -g @executeautomation/database-server

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

Local Development Setup

If you want to modify the code or run from your local environment:

  1. Clone and build the repository as shown in the Installation section
  2. Run the server using the commands in the Usage section below

Usage

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:

Prerequisites:

  • AWS credentials must be configured (the RDS Signer uses the default credential provider chain)
  • Configure using one of these methods:
    • aws configure (uses default profile)
    • AWS_PROFILE=myprofile environment variable
    • AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables
    • IAM roles (if running on EC2)
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

Direct Usage 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 the following tools that Claude can 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

For practical examples of how to use these tools with Claude, see Usage Examples.

Additional Documentation

Development

To run the server in development mode:

npm run dev

To watch for changes during development:

npm run watch

Requirements

  • Node.js 18+
  • For SQL Server connectivity: SQL Server 2012 or later
  • For PostgreSQL connectivity: PostgreSQL 9.5 or later

License

MIT

Questions about Database

What is the Database MCP server?

MCP Database Server is a new MCP Server which helps connect with Sqlite, SqlServer and Posgresql Databases. Database is maintained by executeautomation on GitHub at executeautomation/mcp-database-server, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Database MCP server?

Database doesn't publish a one-line install in the MCP registry, so follow the setup steps in its README on GitHub (executeautomation/mcp-database-server). Like most servers, Database ends with a command or URL you paste into your AI app's MCP config.

Does Database need an API key?

The registry lists no required keys for Database. Check the Database README for optional settings, and expect a remote server to ask you to sign in the first time you connect.

Is Database an official MCP server?

No. Database is a community server maintained by executeautomation. Community servers can be excellent; read the code and the open issues before you give Database access to company data.

What license is Database under?

Database is released under the MIT license, according to its GitHub repository. The license covers the code of Database; the service it connects to has its own terms.