Skip to content

f24aalam/dbmcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dbmcp

Database MCP server with easy credential management.

Why dbmcp?

Other database MCP tools require:

  • Cloning the entire repository
  • Node.js/npm installed
  • Setting database credentials in environment variables

dbmcp makes it simple:

  • Prebuilt binary - no dependencies needed
  • Store credentials securely locally
  • Just run dbmcp add to add a connection
  • Copy the generated connection ID and use it in your MCP client

Installation

Linux/macOS

curl -fsSL https://raw.githubusercontent.com/f24aalam/dbmcp/master/install.sh | bash

Windows (PowerShell)

irm https://raw.githubusercontent.com/f24aalam/dbmcp/master/install.ps1 | iex

Uninstallation

Linux/macOS

To remove dbmcp, delete the binary from your local bin directory:

rm ~/.local/bin/dbmcp
# or if installed in /usr/local/bin
sudo rm /usr/local/bin/dbmcp

Windows

To remove dbmcp, delete the executable from your installation folder:

Remove-Item "$HOME\bin\dbmcp.exe"

Quick Start

1. Add a database connection

dbmcp add

MySQL example:

user:password@tcp(localhost:3306)/mydb

PostgreSQL example:

postgres://user:password@localhost:5432/mydb

SQLite example:

/home/user/data/mydb.sqlite

Follow the prompts to enter your database details (MySQL or SQLite).

2. List connections

dbmcp list

3. Start MCP server

dbmcp mcp --connection-id <CONNECTION_ID>

Usage in MCP Clients

Cursor

Add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "dbmcp": {
      "command": "dbmcp",
      "args": ["mcp", "--connection-id", "<YOUR_CONNECTION_ID>"]
    }
  }
}

OpenCode

Add to your OpenCode MCP settings with the same command format.

Commands

Command Description
dbmcp add Add a new database connection
dbmcp list List all saved connections
dbmcp mcp Start the MCP server
dbmcp completion Generate shell autocompletion

Supported Databases

  • MySQL
  • PostgreSQL
  • SQLite

License

MIT

About

Zero-dependency database MCP server with secure local credential management. Supports MySQL, PostgreSQL, and SQLite.

Topics

Resources

License

Stars

Watchers

Forks

Contributors