MCP Dbs MCP Server

MCP TypeScript SDK for database connections

Local serverstdio

What is the MCP Dbs MCP server?

Mcp dbs mcp server lets Claude, Cursor and other MCP clients work with MCP Dbs directly. MCP TypeScript SDK for database connections.

What MCP Dbs does

A Model Context Protocol (MCP) implementation for connecting to and working with various database systems.

Tools it exposes

Once connected, the assistant can call these 9 tools directly:

  • 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

Installing the mcp dbs mcp server

The 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.

Configuration

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.

Where it fits

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.

Practical notes

  • This server runs locally, so it operates with whatever access your machine and its credentials already have. Scope that deliberately rather than by default.
  • With 9 tools exposed, expect a noticeable bump in prompt size — disable it in projects that never use MCP Dbs.
  • Maintained by cuongtl1992.
  • MCP clients ask for confirmation before each tool call by default. Keep that on while you learn what the mcp dbs mcp server actually does with your data.
  • Every entry in this directory is reviewed by hand before it goes live, and details are checked against the project's own documentation.

Available tools

ToolWhat it does
connect-databaseConnect to a database
disconnect-databaseDisconnect from a database
execute-queryExecute a query and return results
execute-updateExecute a query without returning results
NotesThe Notes tool exposed by this server.
SQLiteThe SQLite tool exposed by this server.
PostgreSQLThe PostgreSQL tool exposed by this server.
MongoDBThe MongoDB tool exposed by this server.
TestingThe Testing tool exposed by this server.

How to install the MCP Dbs MCP 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.

Configuration

VariableDescriptionRequired
MCP_MONGODB_URIConfiguration value read at startup.Optional
MCP_MONGODB_DATABASEConfiguration value read at startup.Optional
MCP_SQLITE_FILENAMEConfiguration value read at startup.Optional
MCP_SQLITE_CREATE_IF_NOT_EXISTSConfiguration value read at startup.Optional
MCP_POSTGRES_HOSTEndpoint or connection string the server talks to.Optional
MCP_POSTGRES_PORTConfiguration value read at startup.Optional
MCP_POSTGRES_DATABASEConfiguration value read at startup.Optional
MCP_POSTGRES_USERConfiguration value read at startup.Optional

Example prompts to try

  • Use MCP Dbs to connect-database.
  • Use MCP Dbs to disconnect-database.
  • Use MCP Dbs to execute-query.

Frequently asked questions

It connects MCP Dbs to MCP-compatible AI assistants such as Claude and Cursor, exposing 9 tools (connect-database, disconnect-database, execute-query, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with MCP Dbs directly.