connect-databaseLABSCO SUMMARY
One tool set across four engines, with the credentials kept out of the call.
Because connection details come from the environment and override whatever is passed in, the agent works with a connectionId and never handles a password. That also means each engine you want available has to be configured before the session starts — the tools do not prompt for it.
What it is
A database server that speaks to four engines behind the same interface. You open a named connection, then run queries or updates against it — SQL for the relational engines, aggregation pipelines or shell syntax for MongoDB.
What you get
- connect-database — open a connection under a connectionId you choose, with the type set to sqlite, postgres, mssql or mongodb
- disconnect-database — close a connection by its id
- execute-query — run a query that returns rows, with parameters supplied separately
- execute-update — run an INSERT, UPDATE or DELETE that returns no rows
- MongoDB queries accepted in several shapes: an aggregation pipeline, a collection-and-pipeline object, shell syntax, or a raw command
- Resources for schema browsing: database-schema, table-schema and tables-list
Requirements
Install globally from npm as mcp-dbs. It runs in SSE mode on port 3001 by default, or over stdio with --stdio; --port changes the port. Connection details come from environment variables per engine — MCP_SQLITE_FILENAME, the MCP_POSTGRES_* set, the MCP_MSSQL_* set, or MCP_MONGODB_URI and MCP_MONGODB_DATABASE — and these take precedence over anything passed to connect-database.
Setup effort
One command — npm install -g mcp-dbs
USE CASES
Querying whichever database the project uses
Open a connection by type and id, then run the query without changing tools.
Understanding a schema before writing SQL
Read the tables list and the schema for the table you are targeting.
Working a MongoDB collection
Send an aggregation pipeline, or the shell syntax you already had, against the named collection.
Applying a change
Run the insert or update with parameters and read back how many rows it touched.
Comparing two databases in one session
Open both under different connection ids and query them one after the other.
4 tools
Listed in project docs. Your client may show a different list.
disconnect-databaseexecute-queryexecute-updateBEFORE YOU INSTALL
What to know first
Tools you get
4 tools named in the project's documentation.
Requires
npm on PATH
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
Server setup
npm install -g mcp-dbsMCP Clients
Claude Desktop
{
"mcpServers": {
"mcp-dbs": {
"command": "node",
"args": [
"<YOUR_PATH_TO_MCP_DBS>/dist/cli.js",
"--stdio"
],
"env": {
"MCP_MONGODB_URI": "mongodb://localhost:27017",
"MCP_MONGODB_DATABASE": "<YOUR_MCP_MONGODB_DATABASE>"
}
}
}
}Here <YOUR_PATH_TO_MCP_DBS> is the package that npm install -g mcp-dbs put on your machine, not a checkout: run npm root -g and use the mcp-dbs folder inside the directory it prints.