MCPDB - Database Access

Provides secure access to multiple databases via MCP, enabling natural language SQL queries from Claude Desktop.
  • blade

0

GitHub Stars

blade

Language

7 months ago

First Indexed

3 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "jantuitman-mcpdb": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "http://localhost:8000/mcp"
      ]
    }
  }
}

MCPDB is a PHP-based MCP server that lets Claude Desktop securely access and query multiple databases through a web management interface. You can configure MySQL, PostgreSQL, SQLite, and SQL Server connections, then run SQL queries directly from conversations using natural language or explicit commands.

How to use

After you configure your database connections, you connect Claude Desktop to this MCP server and start sending natural language prompts or SQL commands. You can list available connections, execute SQL on a specific connection, and inspect table structures or results directly within your conversations.

How to install

Prerequisites: you need Docker and Docker Compose (for Laravel Sail), Node.js and npm (for frontend assets), and the Claude Desktop application.

Step 1: Clone and set up the project.

git clone <repository-url>
cd mcpdb

Step 2: Start the Laravel application.

# Copy environment file
cp .env.example .env

# Start Docker containers
./vendor/bin/sail up -d

# Install PHP dependencies
./vendor/bin/sail composer install

# Install Node.js dependencies and build assets
./vendor/bin/sail npm install
./vendor/bin/sail npm run dev

# Run database migrations
./vendor/bin/sail artisan migrate

Step 3: Configure database connections.

Open http://localhost:8000 in your browser and add connections for your databases. Provide a unique name, driver (mysql, pgsql, sqlite, or sqlsrv), host, port, database, username, and password. Test the connection and ensure it is Active.

Step 4: Configure Claude Desktop to talk to the MCP server.

{
  "mcpServers": {
    "mcpdb": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "http://localhost:8000/mcp"
      ]
    }
  }
}

Step 5: Install mcp-remote (if not already installed).

npm install -g mcp-remote

Step 6: Restart Claude Desktop so the new MCP configuration becomes active.

Additional configuration and notes

Security considerations: database passwords are stored in the application database. Only active connections are exposed to the MCP server. SQL queries are executed with the permissions of the configured database user. Consider using read-only users for additional security. The MCP server runs on localhost by default.

Troubleshooting tips: if the MCP server is not connecting, ensure the Laravel server is running and check the health endpoint at http://localhost:8000/health. Verify the Claude Desktop configuration syntax and review Claude Desktop logs if issues persist.

Developer notes: the project includes a web interface for managing connections and an MCP server implementation that exposes endpoints to list connections and execute SQL on the selected connection.

Security and troubleshooting

  • Only active connections are exposed to the MCP server. - SQL queries run with the permissions of the configured database user. - For heightened security, use dedicated read-only accounts where appropriate. - The MCP server is designed to run on localhost by default and should be protected by your network firewall when exposed.

Common issues to check if you encounter problems: - Docker services are up and healthy. - The set of connections you created in the web interface is active. - Claude Desktop is using the correct MCP URL and command as configured. - Claude Desktop logs contain clues about misconfigurations or network issues.

Available tools

list_connections

Lists all active database connections available to the MCP server.

execute_sql

Executes SQL queries on the specified database connection using the configured permissions.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
MCPDB - Database Access MCP Server - jantuitman/mcpdb | VeilStrat