Connects AI assistants to MySQL, MariaDB, PostgreSQL, and SQLite for schema discovery and SQL operations.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent — or use 1-click editor setup below.
💡 Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by Dbmcp.
tablesCallable MCP tool function
schemaCallable MCP tool function
kindCallable MCP tool function
ownerCallable MCP tool function
commentCallable MCP tool function
viewsCallable MCP tool function
The dbmcp MCP server gives MCP-compatible AI clients access to SQL database structure and operations. It supports MySQL, MariaDB, PostgreSQL, and SQLite from one executable, without requiring Python, Node.js, or Docker at runtime.
Its schema tools can enumerate databases, tables, views, triggers, functions, procedures, and materialized views where the selected backend supports them. Table and view discovery can return brief names or more detailed metadata. Table details may include columns, constraints, indexes, and triggers; backend-specific view metadata can include definitions, ownership, security settings, and related options.
The server also provides data and database-management tools, including read queries, write queries, database creation, database removal, table removal, and query explanation. Read-only mode hides write-oriented tools and is enabled by default.
The dbmcp MCP server runs with either a stdio or http subcommand. In stdio mode, an MCP client starts and manages the process. In HTTP mode, the process runs separately and clients connect to its MCP endpoint, such as /mcp.
Configuration follows a predictable order: command-line flags override environment variables, which override built-in defaults. The database backend must be selected as mysql, mariadb, postgres, or sqlite. Host, port, user, password, database name, connection limits, query timeouts, pagination size, and logging can then be configured as needed.
Schema-listing responses support cursor-based pagination. Table and view searches can use case-insensitive patterns with % and _ wildcards on backends that support those options. SQLite uses a file path as the database name and does not provide every database-oriented operation; for example, database listing is unavailable there.
Installers are provided for macOS, Linux, WSL, Windows PowerShell, and Windows CMD. The project also documents Docker, Cargo, and other installation methods. A client can configure the executable in .mcp.json and pass settings through an env block, or the server can be started with command-line flags.
A minimal stdio setup selects the backend and database credentials, then runs dbmcp stdio. For HTTP, start dbmcp http, choose a bind host and port, and configure the client with an HTTP server entry. The HTTP configuration uses allowed-origin and allowed-host controls; its defaults restrict access to local addresses.
Important environment variables include DB_BACKEND, DB_HOST, DB_PORT, DB_USER, DB_PASSWORD, and DB_NAME. TLS settings are available for supported database connections through options for SSL, CA certificates, client certificates, client keys, and certificate verification. The default connection pool size is five, the default query timeout is 30 seconds, and the default maximum page size is 100 items.
The dbmcp MCP server exposes capabilities in several groups:
explainQuery.Exact availability varies by database backend. SQLite has no separate database parameter for applicable tools, and its view listing returns only the brief form. PostgreSQL view details are documented for the public schema in the supplied material, while MySQL and MariaDB expose their own view metadata fields.
Running dbmcp without a subcommand prints usage information and exits unsuccessfully; use stdio, http, or version. The default read-only setting blocks write queries, so write access must be enabled deliberately when required.
Database credentials and connection settings are supplied by the client or command line; the material does not describe an authentication layer for the HTTP endpoint beyond origin and host restrictions. The server is licensed under MIT. Backend-specific tool availability and metadata shape should be checked before building workflows that depend on a particular object type or response field.
Factual signals from GitHub, npm, and our automated checks — not a rating.
No reviews yet — be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/dbmcp)<a href="https://allmcps.com/mcp/dbmcp"><img src="https://allmcps.com/api/badge/dbmcp?style=directory" alt="Dbmcp on AllMCPs" /></a>