DBA Brain
Database health checks, verified backups and safe SQL for AI agents on SQL Server
DBA Brain is an open-source MCP server for databases. It can run locally on your machine or as a hosted remote server.
- Pricing
- Open source
- Platforms
- CLI, API, Linux
- Runs
- Locally or Remotely
- What it can do
- Can change data (2 tools)
- Version
- 1.1.0
Similar MCP servers
Install
Add with the CLI
Run in a terminal
claude mcp add --transport http dbabrain https://mcp.dbabrain.dev/mcpAdd --scope user to use it in every project, or --scope project to share it in .mcp.json.
Or share it with your project
Add to .mcp.json
{
"mcpServers": {
"dbabrain": {
"type": "http",
"url": "https://mcp.dbabrain.dev/mcp"
}
}
}In Customize → Connectors → Add → Add custom connector
https://mcp.dbabrain.dev/mcpPaste this URL, choose how to sign in, then click Add and Connect. On Team and Enterprise an Owner adds it in Organization settings → Connectors.
Add to ~/.cursor/mcp.json
{
"mcpServers": {
"dbabrain": {
"url": "https://mcp.dbabrain.dev/mcp"
}
}
}Use .cursor/mcp.json in a project to share it with the project.
Add to ~/.copilot/mcp-config.json
{
"mcpServers": {
"dbabrain": {
"type": "http",
"url": "https://mcp.dbabrain.dev/mcp"
}
}
}Or put the same entry in .mcp.json at your workspace root to share it.
In chatgpt.com → Plugins → + → Add custom MCP server
https://mcp.dbabrain.dev/mcpPaste this URL, set up sign-in, accept the warning and install the plugin. Then type @ in a chat to use it.
Add with the CLI
Run in a terminal
codex mcp add dbabrain --url https://mcp.dbabrain.dev/mcpOr add to config.toml
Add to ~/.codex/config.toml
[mcp_servers.dbabrain]
url = "https://mcp.dbabrain.dev/mcp"Add to Grok Bot desktop app → Connect apps → Add a custom connector
https://mcp.dbabrain.dev/mcpEnter a Name (for example "DBA Brain"), choose Type: Remote HTTPS, paste this as the Server URL and choose Add plugin.
Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"dbabrain": {
"type": "http",
"url": "https://mcp.dbabrain.dev/mcp"
}
}
}Gemini CLI and Antigravity
Gemini CLI
Add to ~/.gemini/settings.json
{ "mcpServers": { "dbabrain": { "httpUrl": "https://mcp.dbabrain.dev/mcp" } } }Or run: gemini mcp add -s user --transport http dbabrain https://mcp.dbabrain.dev/mcp
Antigravity
Add to ~/.gemini/config/mcp_config.json
{ "mcpServers": { "dbabrain": { "serverUrl": "https://mcp.dbabrain.dev/mcp" } } }Use .agents/mcp_config.json to add it to one workspace only.
Devin Desktop (formerly Windsurf)
Add to ~/.config/devin/mcp_config.json
{ "mcpServers": { "dbabrain": { "url": "https://mcp.dbabrain.dev/mcp", "transport": "http" } } }On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.
Cline
Add to cline_mcp_settings.json
{ "mcpServers": { "dbabrain": { "type": "streamableHttp", "url": "https://mcp.dbabrain.dev/mcp" } } }Open it from the MCP Servers icon → Configure → Configure MCP Servers.
Zed
Add to Zed settings.json
{ "context_servers": { "dbabrain": { "url": "https://mcp.dbabrain.dev/mcp" } } }Open it with zed: open settings file. Merge context_servers into the settings you already have.
JetBrains AI Assistant and Junie
AI Assistant
Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add
{ "mcpServers": { "dbabrain": { "url": "https://mcp.dbabrain.dev/mcp" } } }Junie
Add to ~/.junie/mcp/mcp.json
{ "mcpServers": { "dbabrain": { "url": "https://mcp.dbabrain.dev/mcp" } } }Use .junie/mcp/mcp.json to share it with a project.
Kiro
Add to ~/.kiro/settings/mcp.json
{ "mcpServers": { "dbabrain": { "url": "https://mcp.dbabrain.dev/mcp" } } }Use .kiro/settings/mcp.json to add it to one workspace only.
Using several servers? Build one config file with the MCP config generator.
Configuration
DBABRAIN_HOMEThe tool root `dbabrain init` wrote: its config.json, data/ and encrypted secret store
About DBA Brain
DBA Brain gives Claude and other MCP clients a set of database operations that run on your own machine against your own instances. An agent asks for a check and gets back a graded verdict, then pulls evidence only for the items that came back as warnings or critical.
Credentials stay on the machine: a request names a server, and the login is filled from an encrypted local store, so the agent never sees a password. Ad-hoc queries run inside a transaction that is always rolled back, and changes are kept only when explicitly committed. Tools that alter state are marked destructive and require their own confirmation.
The same commands a DBA runs by hand are exposed to the agent, and each call is recorded with the tool, the server and the caller. It suits DBAs and DevOps teams who want an assistant to help with routine monitoring and restores without handing it a shell.
Tools this server provides (19)
Taken from the project documentation; the running server may differ.
From the tool list in its README, going by the names, 2 of 19 tools change data; 10 names don't say.
From the server's own tool labels and tool names; not verified by us.
- list-targetsName suggests: reads
- Lists registered database targets.
- db-statusName suggests: reads
- Returns graded health status for an instance.
- list-databasesName suggests: reads
- Lists databases on an instance.
- describe-objectName suggests: reads
- Describes a database object.
- list-jobsName suggests: reads
- Lists scheduled jobs.
- trace-session
- Inspects a trace session.
- host-facts
- Returns facts about the host.
- sqlserver-precheck
- Runs a SQL Server precheck.
- run-sqlName suggests: changes
- Runs one SELECT, rolled back.
- run-sql-writeName suggests: changes
- Runs a write kept only with commit.
- kill-spid
- Terminates a session.
- backup-database
- Backs up a database.
- list-backup-filesName suggests: reads
- Lists backup files.
- restore-full
- Restores a full backup.
- restore-diff
- Restores a differential backup.
- restore-log
- Restores a log backup.
- verify-restore
- Verifies a restore.
- store_schema
- Read-only view of the store schema.
- store_queryName suggests: reads
- Read-only query of the dbabrain store.
What it does
- Graded health verdicts
- Checks return OK, WARNING or CRITICAL so the agent reads a summary before any raw evidence.
- Credentials kept local
- Logins are read from an encrypted store on the machine, so requests never carry passwords or keys.
- Rolled-back ad-hoc SQL
- Single SELECT queries always roll back, and write statements persist only when committed.
- Backup and restore tools
- Covers backup, restore, log and differential handling, and restore verification.
- Audit record of calls
- Every tool call is logged with the server and the requester in the local runtime store.
- Two connection modes
- Works through claude.ai via an outbound link or locally over stdio with Claude Desktop or Claude Code.
Good for
- Asking an assistant whether database instances are healthy before a release
- Verifying that last night's backups completed and can be restored
- Reviewing failed SQL Server Agent jobs and recent backup history
- Running read-only diagnostic queries without exposing credentials to the model
- Restoring a database to a test target as part of a recovery drill
Pricing
Open source
Free and open source under Apache 2.0; a free dbabrain key is needed for the hosted connector.
Prices change. Check dbabrain.dev before you buy.
DBA Brain FAQ
Do I need a dbabrain key to use DBA Brain?
The machine needs a free dbabrain key to link with the hosted connector. Without a linked machine, an account gets a read-only lab demo.
Are passwords sent to the AI model?
No. A request names a server_id and the machine fills the login from its encrypted store. Requests carrying a password, key or token are refused.
Which database engines are supported?
SQL Server, PostgreSQL, Oracle and MySQL, though the project notes MySQL has less production history so far.
How are write operations handled?
run-sql-write keeps a change only when commit is given. Tools that change something are marked destructive and ask for their own confirmation.
Is DBA Brain free?
Yes. DBA Brain is open source, so you can use and self-host it for free.
How do I add DBA Brain to Claude Code?
Run this command in your terminal: claude mcp add --transport http dbabrain https://mcp.dbabrain.dev/mcp
What are the best alternatives to DBA Brain?
The closest alternatives to DBA Brain are SQL Server DBA (read-only), codeDB Lens, DBGorilla, Dbridge MCP and Db Access MCP.
Where this comes from
- Description: written from the project's README, the project's website and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.