Universal database MCP server supporting multiple database types including PostgreSQL, Redshift, CockroachDB, MySQL, RDS MySQL, Microsoft SQL Server
If you already use Database, the database mcp server is the piece that lets your assistant work with it directly. Universal database MCP server supporting multiple database types including PostgreSQL, Redshift, CockroachDB, MySQL, RDS MySQL, Microsoft SQL Server, BigQuery.
A server that helps people access and query data in databases using the Legion Query Runner with integration of the Model Context Protocol (MCP) Python SDK.
The Model Context Protocol (MCP) is a specification for maintaining context in AI applications. This server uses the MCP Python SDK to:
The toolset is worth reading before you wire it up, because it tells you what the integration is really for:
execute_query — Execute a SQL query and return results as a markdown tableexecute_query_json — Execute a SQL query and return results as JSONget_table_columns — Get column names for a specific tableget_table_types — Get column types for a specific tableget_query_history — Get the recent query historylist_databases — List all available database connectionsget_database_info — Get detailed information about a database including schemafind_table — Find which database contains a specific tabledescribe_table — Get detailed description of a table including column names and typesget_table_sample — Get a sample of data from a tableResources — The Resources tool exposed by this serverTools — All database-specific tools (like execute_query, get_table_columns, etc.) require a db_id parameter to specify which database to useConfiguration is passed through the environment: DB_TYPE, DB_CONFIG, DB_CONFIGS. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.
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.
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's toolset — execute_query, execute_query_json, get_table_columns and 11 more — is a fair guide to whether it matches your workflow.
This entry was verified against Database's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.
| Tool | What it does |
|---|---|
| execute_query | Execute a SQL query and return results as a markdown table |
| execute_query_json | Execute a SQL query and return results as JSON |
| get_table_columns | Get column names for a specific table |
| get_table_types | Get column types for a specific table |
| get_query_history | Get the recent query history |
| list_databases | List all available database connections |
| get_database_info | Get detailed information about a database including schema |
| find_table | Find which database contains a specific table |
| describe_table | Get detailed description of a table including column names and types |
| get_table_sample | Get a sample of data from a table |
| Resources | The Resources tool exposed by this server. |
| Tools | All database-specific tools (like execute_query, get_table_columns, etc.) require a db_id parameter to specify which database to use. |
| Prompts | The Prompts tool exposed by this server. |
| Testing | The Testing tool exposed by this server. |
REPLACE DB_TYPE and DB_CONFIG with your connection info.
{
"mcpServers": {
"database-mcp": {
"command": "uvx",
"args": [
"database-mcp"
],
"env": {
"DB_TYPE": "pg",
"DB_CONFIG": "{\"host\":\"localhost\",\"port\":5432,\"user\":\"user\",\"password\":\"pw\",\"dbname\":\"dbname\"}"
},
"disabled": true,
"autoApprove": []
}
}
}Configuration as documented by the project. Restart the client after saving.
| Variable | Description | Required |
|---|---|---|
| DB_TYPE | Configuration value read at startup. | Optional |
| DB_CONFIG | Configuration value read at startup. | Optional |
| DB_CONFIGS | Configuration value read at startup. | Optional |
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.