MCP TypeScript SDK for database connections
Mcp dbs mcp server lets Claude, Cursor and other MCP clients work with MCP Dbs directly. MCP TypeScript SDK for database connections.
A Model Context Protocol (MCP) implementation for connecting to and working with various database systems.
Once connected, the assistant can call these 9 tools directly:
connect-database — Connect to a databasedisconnect-database — Disconnect from a databaseexecute-query — Execute a query and return resultsexecute-update — Execute a query without returning resultsNotes — The Notes tool exposed by this serverSQLite — The SQLite tool exposed by this serverPostgreSQL — The PostgreSQL tool exposed by this serverMongoDB — The MongoDB tool exposed by this serverTesting — The Testing tool exposed by this serverThe server is distributed via npm as mcp-dbs, so most clients can run it without a manual build step. Add it to your MCP client's configuration and restart the client to pick it up — the copy-paste configs for Claude Desktop, Claude Code and Cursor are on this page.
The server reads 8 environment variables: MCP_MONGODB_URI, MCP_MONGODB_DATABASE, MCP_SQLITE_FILENAME, MCP_SQLITE_CREATE_IF_NOT_EXISTS, MCP_POSTGRES_HOST, MCP_POSTGRES_PORT, MCP_POSTGRES_DATABASE, MCP_POSTGRES_USER. Keep credentials in your client's env block or a secrets manager rather than committing them.
Database servers turn schema archaeology and ad-hoc reporting into conversation, which is why they tend to be the second or third server people install. MCP Dbs sits in that group, and the shape of its toolset — connect-database, disconnect-database, execute-query among others — tells you what it is really for. Worth comparing against the other databases servers in this directory before you commit to one, since several overlap in scope but differ sharply in setup cost and permissions.
| Tool | What it does |
|---|---|
| connect-database | Connect to a database |
| disconnect-database | Disconnect from a database |
| execute-query | Execute a query and return results |
| execute-update | Execute a query without returning results |
| Notes | The Notes tool exposed by this server. |
| SQLite | The SQLite tool exposed by this server. |
| PostgreSQL | The PostgreSQL tool exposed by this server. |
| MongoDB | The MongoDB tool exposed by this server. |
| Testing | The Testing tool exposed by this server. |
{
"mcpServers": {
"dbs": {
"command": "npx",
"args": ["-y", "mcp-dbs"],
"env": {
"MCP_MONGODB_URI": "your-value",
"MCP_MONGODB_DATABASE": "your-value",
"MCP_SQLITE_FILENAME": "your-value",
"MCP_SQLITE_CREATE_IF_NOT_EXISTS": "your-value",
"MCP_POSTGRES_HOST": "your-value",
"MCP_POSTGRES_PORT": "your-value",
"MCP_POSTGRES_DATABASE": "your-value",
"MCP_POSTGRES_USER": "your-value"
}
}
}
}Add to claude_desktop_config.json, then restart Claude Desktop.
| Variable | Description | Required |
|---|---|---|
| MCP_MONGODB_URI | Configuration value read at startup. | Optional |
| MCP_MONGODB_DATABASE | Configuration value read at startup. | Optional |
| MCP_SQLITE_FILENAME | Configuration value read at startup. | Optional |
| MCP_SQLITE_CREATE_IF_NOT_EXISTS | Configuration value read at startup. | Optional |
| MCP_POSTGRES_HOST | Endpoint or connection string the server talks to. | Optional |
| MCP_POSTGRES_PORT | Configuration value read at startup. | Optional |
| MCP_POSTGRES_DATABASE | Configuration value read at startup. | Optional |
| MCP_POSTGRES_USER | 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.