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.
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.
- 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
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.
One command — npm install -g mcp-dbs
