dbmcp
MCP server by haymon-ai Verified · haymon.ai
Database MCP connects AI assistants to MySQL, MariaDB, PostgreSQL and SQLite. It ships as a single binary with schema discovery, query and read-only tools. It is for developers who want assistants to explore and query their databases.
Install dbmcp
Built from the published package, never by AI.
claude mcp add dbmcp -- docker run -i --rm ghcr.io/haymon-ai/dbmcp:0.15.2Run in your terminal. Add --scope user to use it in every project.
{
"mcpServers": {
"dbmcp": {
"args": [
"run",
"-i",
"--rm",
"ghcr.io/haymon-ai/dbmcp:0.15.2"
],
"command": "docker"
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
{
"mcpServers": {
"dbmcp": {
"args": [
"run",
"-i",
"--rm",
"ghcr.io/haymon-ai/dbmcp:0.15.2"
],
"command": "docker"
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
{
"servers": {
"dbmcp": {
"args": [
"run",
"-i",
"--rm",
"ghcr.io/haymon-ai/dbmcp:0.15.2"
],
"command": "docker"
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
codex mcp add dbmcp -- docker run -i --rm ghcr.io/haymon-ai/dbmcp:0.15.2{
"mcpServers": {
"dbmcp": {
"args": [
"run",
"-i",
"--rm",
"ghcr.io/haymon-ai/dbmcp:0.15.2"
],
"command": "docker"
}
}
}Add to ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (this project).
gemini mcp add dbmcp docker run -i --rm ghcr.io/haymon-ai/dbmcp:0.15.2Gemini CLI was replaced by Antigravity CLI in June 2026 and remains only for enterprise licences and paid API keys.
MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the dbmcp block.
About
Database MCP (dbmcp) is a single-binary MCP server for SQL databases. It connects an AI assistant to MySQL, MariaDB, PostgreSQL or SQLite. The server exposes schema discovery tools, data access tools for reading and writing, and an explain tool. The binary is about 7 MB and needs no Python, Node or Docker.
It runs over stdio for clients such as Claude Desktop and Cursor, or over HTTP for remote or multi-client use. Read-only mode is on by default and hides the write tools. An optional SSH tunnel reaches MySQL, MariaDB and PostgreSQL through a bastion host. It suits developers who want an assistant to explore and query their own databases.
Written from the project's README and checked against it.
Tools it gives your assistant
listDatabasesLists accessible databases, paginated with a cursor. Not available for SQLite.listTablesLists tables in a database, with a brief or detailed response shape.listViewsLists views on MySQL/MariaDB, PostgreSQL and SQLite, with optional detailed metadata.listTriggersLists user-defined triggers on tables, excluding internal constraint triggers.listFunctionsLists user-defined SQL functions on MySQL/MariaDB and PostgreSQL.listProceduresLists stored procedures in the database.listMaterializedViewsLists materialized views in the database.readQueryRuns read queries against the connected database.writeQueryRuns write queries. Hidden when read-only mode is on.explainQueryExplains how a query will run against the database.
What you need
- A MySQL, MariaDB, PostgreSQL or SQLite database
- macOS, Linux, WSL or Windows for the install scripts
Try asking
- List all tables in my mydb database and summarize their columns
- Show the triggers and functions defined in my PostgreSQL public schema
- Explain the query plan for this SELECT statement on my database
Good to know
- Read-only mode is on by default and hides the write tools.
- Listing databases is not available for SQLite.
- Binding a non-loopback address requires DBMCP_HTTP_AUTH_TOKEN to be set.
- The SSH tunnel works only with MySQL, MariaDB and PostgreSQL.
Security check
C- Downloads a script from the internet and runs itIn
README.md:curl -fsSL https://dbmcp.haymon.ai/install.sh | bash
Checked automatically: README.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to dbmcp
All alternatives →Connects Supabase projects to AI assistants such as Cursor, Claude and Windsurf over the Model Context Protocol. It lets assistants manage tables, fetch config and query data in a Supabase project.
ArcadeDB MCP Server is the built-in Model Context Protocol server of the ArcadeDB multi-model database. It lets AI assistants and LLMs work with ArcadeDB's graph, document, time-series, vector and other data models. It suits people who already run ArcadeDB and want assistant access to it.
Connects MCP clients such as Claude Desktop, Cursor and VS Code to PostgreSQL, MySQL, MariaDB, SQL Server, Oracle, ClickHouse and SQLite. It exposes two tools by default, with read-only mode and query timeouts available as guardrails.
MCP Toolbox for Databases is an open source MCP server that connects AI agents, IDEs and applications to enterprise databases. It provides prebuilt tools for exploring schemas and running queries, plus a framework for custom tools. It is aimed at developers building agents that need database access.
Connects AI agents, IDEs and applications to enterprise databases through the Model Context Protocol. Offers prebuilt database tools for MCP clients and a framework for building custom tools for production agents.
MongoDB MCP Server lets AI assistants interact with MongoDB databases and MongoDB Atlas. It is an official server from mongodb-js, run locally with npx or Docker. It works with self-managed deployments and Atlas clusters.
Compare with Supabase, ArcadeDB MCP Server or DBHub
dbmcp: common questions
Does Database MCP need Python, Node or Docker?
No. The source describes it as a single binary with zero runtime dependencies, and says no Python, Node or Docker is needed.
Can the assistant change data with this server?
Read-only mode is on by default through DBMCP_DB_READ_ONLY=true, and it hides writeQuery, createDatabase, dropDatabase and dropTable. The setting controls whether write tools are available.
Can I use the HTTP transport with a token?
Yes. Start the server with DBMCP_HTTP_AUTH_TOKEN set, then send it as a bearer token from the MCP client. A token is required when binding a non-loopback address.
How do I install dbmcp?
In Claude Code run claude mcp add dbmcp -- docker run -i --rm ghcr.io/haymon-ai/dbmcp:0.15.2. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.
Is dbmcp the official server?
dbmcp is published by haymon.ai from its verified domain in the official MCP Registry.
Is dbmcp free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is dbmcp safe to use?
It scores 82 of 100. Grades: maintenance A, licence A, quality C. Security check: grade C (downloads a script from the internet and runs it). Review the code before you install. How grades work.
What are alternatives to dbmcp?
Similar MCP servers: Supabase, ArcadeDB MCP Server, DBHub, MCP Toolbox for Databases.
Does dbmcp work with ChatGPT?
Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.
