MCP Database Server
Provides connectivity to MySQL databases for executing queries, managing table structures, and exporting data.
Enables interaction with PostgreSQL databases for data querying, schema management, and database operations.
Enables direct interaction with SQLite databases for querying data, managing tables, and performing database operations.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Database Serverwhat are the top 10 customers by total sales last month?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Database Server
This MCP (Model Context Protocol) server provides database access capabilities to Claude, supporting SQLite, SQL Server, PostgreSQL, and MySQL databases.
Installation
Clone the repository:
git clone https://github.com/executeautomation/database-server.git
cd database-serverInstall dependencies:
npm installBuild the project:
npm run buildRelated MCP server: MCP Database Server
Usage Options
There are two ways to use this MCP server with Claude:
Direct usage: Install the package globally and use it directly
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-serverThis 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:
Clone and build the repository as shown in the Installation section
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.dbSQL 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
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)
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"
]
}
}
}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"
]
}
}
}The Claude Desktop configuration file is typically located at:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.jsonLinux:
~/.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 |
| Execute SELECT queries to read data |
|
| Execute INSERT, UPDATE, or DELETE queries |
|
| Create new tables in the database |
|
| Modify existing table schema |
|
| Remove a table from the database |
|
| Get a list of all tables | None |
| View schema information for a table |
|
| Export query results as CSV/JSON |
|
| Add a business insight to memo |
|
| List all business insights | None |
For practical examples of how to use these tools with Claude, see Usage Examples.
Additional Documentation
SQL Server Setup Guide: Details on connecting to SQL Server databases
PostgreSQL Setup Guide: Details on connecting to PostgreSQL databases
Usage Examples: Example queries and commands to use with Claude
Development
To run the server in development mode:
npm run devTo watch for changes during development:
npm run watchRequirements
Node.js 18+
For SQL Server connectivity: SQL Server 2012 or later
For PostgreSQL connectivity: PostgreSQL 9.5 or later
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Query 40 databases from Claude, ChatGPT, or Cursor — on any device. Read-only, encrypted, audited.
Ask data questions in natural language. Get SQL, insights, and charts from your databases.
Query your Postgres from ChatGPT or Claude without exposing the database or handing over credentials. Run npx boltschema connect next to your database and it dials out over HTTPS — no inbound firewall rule, no open port, works with localhost and VPC-private databases. Read-only is enforced by a SQL guard, a Postgres READ ONLY transaction, and a scoped role generated for you.
- dataOAuthco.thinair
PostgreSQL, MySQL, and SQL Server in one session. 26 read-only MCP tools for AI agents.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides Claude Desktop with secure access to multiple database connections, allowing users to query MySQL, PostgreSQL, SQLite, and SQL Server databases directly through natural language.-
- AlicenseNot gradedqualityDmaintenanceEnables Claude to connect to and interact with SQLite, SQL Server, PostgreSQL, and MySQL databases through natural language. Supports executing queries, managing tables, exporting data, and storing business insights with authentication options including AWS IAM.676 npmMIT
- AlicenseNot gradedqualityCmaintenanceProvides database access capabilities to Claude with support for both SQLite and SQL Server databases. It enables users to manage schemas, execute SQL queries, and export results through natural language interaction.676 npmMIT
- AlicenseNot gradedqualityFmaintenanceEnables connecting to any SQL database, exploring schemas, running queries, and visualizing results with interactive charts from Claude Desktop.MIT