A single-binary MCP server for MySQL, MariaDB, PostgreSQL, and SQLite
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.
A single-binary MCP server for SQL databases. Connect your AI assistant to MySQL/MariaDB, PostgreSQL, or SQLite with zero runtime dependencies.
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.
Once Database MCP is connected, these are the calls the assistant has available:
Subcommand — Descriptionstdio — Run in stdio modeversion — Print version information and exitFlag — Env VariableSubcommands — A subcommand is required — running dbmcp with no subcommand prints usage help and exits with a non-zero statuslistDatabases — Lists accessible databases, paginated via cursor / nextCursor. See Cursor Pagination forlistTables — Lists tables in a database, paginated via cursor / nextCursor. See Cursor Pagination forlistViews — Lists views in a database, paginated via cursor / nextCursor. Available on MySQL/MariaDB, PostgreSQL (public schema), and SQLite. ParameterslistTriggers — Lists user-defined triggers on tables, paginated via cursor / nextCursor. Internal constraint and foreign-key triggers are excluded. Available onlistFunctions — Lists user-defined SQL functions, paginated via cursor / nextCursor. PostgreSQL excludes aggregates, window functions, and procedures; MySQL/MariaDBlistProcedures — 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 SQLiteYou 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.
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.
| Tool | What it does |
|---|---|
| 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](https://dbmcp.haymon.ai/docs/features#cursor-pagination) for iteration details. Not available for SQLite. |
| listTables | Lists tables in a database, paginated via cursor / nextCursor. See [Cursor Pagination](https://dbmcp.haymon.ai/docs/features#cursor-pagination) for iteration details. |
| listViews | Lists 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), |
| listTriggers | Lists 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 |
| listFunctions | Lists 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 |
| listProcedures | Lists 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 |
| listMaterializedViews | Lists 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 |
| readQuery | Executes 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 |
| writeQuery | Executes a write SQL query (INSERT, UPDATE, DELETE, CREATE, ALTER, DROP). Only available when read-only mode is disabled. Parameters: query, database. |
```json
{
"mcpServers": {
"dbmcp": {
"type": "http",
"url": "http://127.0.0.1:9001/mcp"
}
}
}Configuration as documented by the project. Restart the client after saving.
| Variable | Description | Required |
|---|---|---|
| DB_BACKEND | Configuration value read at startup. | Optional |
| DB_HOST | Endpoint or connection string the server talks to. | Optional |
| DB_PORT | Configuration value read at startup. | Optional |
| DB_USER | Configuration value read at startup. | Optional |
| DB_PASSWORD | Configuration value read at startup. | Optional |
| DB_NAME | Configuration value read at startup. | Optional |
| DB_SSL_KEY | Credential the server authenticates with. | Yes |
Read-only SQL access to Postgres — let your assistant inspect schemas and answer questions from real data.
Manage your whole Supabase project in conversation — database, auth, storage, Edge Functions and branches.
Query, modify and analyse local SQLite databases in conversation — the fastest way to chat with a data file.
Metabase ships its own MCP endpoint — search your BI content, build and run queries, and save questions and dashboards without leaving the chat.
Official MongoDB server covering data, schemas and Atlas management — from find queries to spinning up clusters.
Serverless Postgres with database branching — point your assistant at Neon and let it work on disposable copies.