Provides tools for connecting to and querying MySQL databases, supporting data reads, writes, schema modifications, and exports.
Allows interaction with PostgreSQL databases, providing tools for running queries, managing tables, and exporting data.
Enables running SQL queries against SQLite databases, including table creation, modification, and data manipulation.
Click on "Install 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 Server list all tables in the production database
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.
You can also use deployed servers via HTTP endpoints. For instructions, see How to Test MCP Streamable HTTP Endpoints Using cURL.
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:
Install dependencies:
Build the project:
Related MCP server: MCPDB - Database Access MCP Server
Usage Options
How to Setup:
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:
SQL Server Database
To use with a SQL Server database:
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:
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:
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
Local Development Configuration
For local development, configure Claude Desktop to use your locally built version:
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:
To watch for changes during development:
Requirements
Node.js 18+
For SQL Server connectivity: SQL Server 2012 or later
For PostgreSQL connectivity: PostgreSQL 9.5 or later
License
MIT