Database MCP server with easy credential management.
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 addto add a connection - Copy the generated connection ID and use it in your MCP client
curl -fsSL https://raw.githubusercontent.com/f24aalam/dbmcp/master/install.sh | bashirm https://raw.githubusercontent.com/f24aalam/dbmcp/master/install.ps1 | iexTo 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/dbmcpTo remove dbmcp, delete the executable from your installation folder:
Remove-Item "$HOME\bin\dbmcp.exe"dbmcp addMySQL 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).
dbmcp listdbmcp mcp --connection-id <CONNECTION_ID>Add to ~/.cursor/mcp.json:
{
"mcpServers": {
"dbmcp": {
"command": "dbmcp",
"args": ["mcp", "--connection-id", "<YOUR_CONNECTION_ID>"]
}
}
}Add to your OpenCode MCP settings with the same command format.
| 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 |
- MySQL
- PostgreSQL
- SQLite
MIT