Database MCP MCP Server

A single-binary MCP server for MySQL, MariaDB, PostgreSQL, and SQLite

Local serverstdioPython

What is the Database MCP MCP server?

Database MCP MCP server exists for a simple reason — assistants are far more useful when they can act on Database MCP directly instead of describing what you should do. A single-binary MCP server for MySQL, MariaDB, PostgreSQL, and SQLite.

What you get

A single-binary MCP server for SQL databases. Connect your AI assistant to MySQL/MariaDB, PostgreSQL, or SQLite with zero runtime dependencies.

  • Multi-database — — MySQL/MariaDB, PostgreSQL, and SQLite from one binary
  • Single binary — — ~7 MB, no Python/Node/Docker needed
  • Multiple transports — — stdio (for Claude Desktop, Cursor) and HTTP (for remote/multi-client)
  • Two-layer config — — CLI flags > environment variables, with sensible defaults per backend

Setting it up

The server ships on npm as @modelcontextprotocol/inspector, so your MCP client can launch it on demand — there is no separate build step. Add the server block to your client's configuration, restart it, and the tools register themselves.

What the assistant can call

Once Database MCP is connected, these are the calls the assistant has available:

  • Subcommand — Description
  • stdio — Run in stdio mode
  • version — Print version information and exit
  • Flag — Env Variable
  • Subcommands — A subcommand is required — running dbmcp with no subcommand prints usage help and exits with a non-zero status
  • listDatabases — Lists accessible databases, paginated via cursor / nextCursor. See Cursor Pagination for
  • listTables — Lists tables in a database, paginated via cursor / nextCursor. See Cursor Pagination for
  • listViews — Lists views in a database, paginated via cursor / nextCursor. Available on MySQL/MariaDB, PostgreSQL (public schema), and SQLite. Parameters
  • listTriggers — Lists user-defined triggers on tables, paginated via cursor / nextCursor. Internal constraint and foreign-key triggers are excluded. Available on
  • listFunctions — Lists user-defined SQL functions, paginated via cursor / nextCursor. PostgreSQL excludes aggregates, window functions, and procedures; MySQL/MariaDB
  • listProcedures — Lists user-defined stored procedures, paginated via cursor / nextCursor. Available on MySQL/MariaDB and PostgreSQL (public schema, PostgreSQL 11+)
  • listMaterializedViews — Lists materialized views in the public schema, paginated via cursor / nextCursor. PostgreSQL only — not available for MySQL/MariaDB or SQLite

Configuration and credentials

You will need 7 environment variables: DB_BACKEND, DB_HOST, DB_PORT, DB_USER, DB_PASSWORD, DB_NAME, DB_SSL_KEY. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

Before you rely on it

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 14 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Database MCP.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the database mcp mcp server does with a few real requests.

Choosing this one

This sits in the database access group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Database MCP's toolset — Subcommand, stdio, version and 11 more — is a fair guide to whether it matches your workflow.

This entry was verified against Database MCP's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.

Available tools

ToolWhat it does
SubcommandDescription
stdioRun in stdio mode
versionPrint version information and exit
FlagEnv Variable
SubcommandsA subcommand is required — running dbmcp with no subcommand prints usage help and exits with a non-zero status.
listDatabasesLists accessible databases, paginated via cursor / nextCursor. See [Cursor Pagination](https://dbmcp.haymon.ai/docs/features#cursor-pagination) for iteration details. Not available for SQLite.
listTablesLists tables in a database, paginated via cursor / nextCursor. See [Cursor Pagination](https://dbmcp.haymon.ai/docs/features#cursor-pagination) for iteration details.
listViewsLists views in a database, paginated via cursor / nextCursor. Available on MySQL/MariaDB, PostgreSQL (public schema), and SQLite. Parameters: database (defaults to the active database; SQLite has no database parameter),
listTriggersLists user-defined triggers on tables, paginated via cursor / nextCursor. Internal constraint and foreign-key triggers are excluded. Available on MySQL/MariaDB, PostgreSQL (public schema), and SQLite. Parameters: databas
listFunctionsLists user-defined SQL functions, paginated via cursor / nextCursor. PostgreSQL excludes aggregates, window functions, and procedures; MySQL/MariaDB excludes loadable UDFs (mysql.func). Available on MySQL/MariaDB and Pos
listProceduresLists user-defined stored procedures, paginated via cursor / nextCursor. Available on MySQL/MariaDB and PostgreSQL (public schema, PostgreSQL 11+). Not available for SQLite. Parameters: database (defaults to the active d
listMaterializedViewsLists materialized views in the public schema, paginated via cursor / nextCursor. PostgreSQL only — not available for MySQL/MariaDB or SQLite. Parameters: database (defaults to the active database), cursor, search, detai
readQueryExecutes a read-only SQL query (SELECT, SHOW, DESCRIBE, USE, EXPLAIN). Always enforces SQL validation as defence-in-depth. Parameters: query, database, cursor. SELECT results paginate via cursor / nextCursor; SHOW, DESCR
writeQueryExecutes a write SQL query (INSERT, UPDATE, DELETE, CREATE, ALTER, DROP). Only available when read-only mode is disabled. Parameters: query, database.

How to install the Database MCP MCP server

```json
{
  "mcpServers": {
    "dbmcp": {
      "type": "http",
      "url": "http://127.0.0.1:9001/mcp"
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
DB_BACKENDConfiguration value read at startup.Optional
DB_HOSTEndpoint or connection string the server talks to.Optional
DB_PORTConfiguration value read at startup.Optional
DB_USERConfiguration value read at startup.Optional
DB_PASSWORDConfiguration value read at startup.Optional
DB_NAMEConfiguration value read at startup.Optional
DB_SSL_KEYCredential the server authenticates with.Yes

Example prompts to try

  • Use Database MCP to Subcommand.
  • Use Database MCP to stdio.
  • Use Database MCP to version.

Frequently asked questions

It connects Database MCP to MCP-compatible AI assistants such as Claude and Cursor, exposing 14 tools (Subcommand, stdio, version, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Database MCP directly.