Back to Browse

Db MCP Server

Developer ToolsLow Risk10.0MCP RegistryLocal
Free

Server data from the Official MCP Registry

Native SQL, schema metadata and query plans for Oracle, PostgreSQL, MySQL, SQLite and SQL Server.

About

Native SQL, schema metadata and query plans for Oracle, PostgreSQL, MySQL, SQLite and SQL Server.

Security Report

10.0
Low Risk10.0Low Risk

Valid MCP server (3 strong, 4 medium validity signals). No known CVEs in dependencies. Imported from the Official MCP Registry.

8 files analyzed · No issues found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Required

This plugin requests these system permissions. Most are normal for its category.

database

Check that this permission is expected for this type of plugin.

file_system

Check that this permission is expected for this type of plugin.

HTTP Network Access

Connects to external APIs or services over the internet.

How to Install

Install command not verified. See the repository for install instructions.

View repository

Documentation

View on GitHub

From the project's GitHub README.

DB MCP

Latest release CI License MCP Registry

M8ven Score DB MCP on Glama DB MCP on mcprush

View on the MCP Registry

DB MCP lets your MCP client run SQL against databases you configure locally. It supports reads and writes on Oracle, PostgreSQL, MySQL and SQLite. SQL Server supports reads only. Each connection has an ID and an access mode in its own TOML file.

Install with an agent

Paste this into a coding agent with terminal access.

Install DB MCP for my MCP client. Ask which client I use if you can't tell.
Download the archive for my OS and CPU from https://github.com/arthurhoch/db-mcp/releases/latest,
check it against SHA256SUMS from the same release, and extract it to a permanent location.
For a fresh install, register a stdio server with absolute paths to db-mcp and
the bundled demo/config/global.toml. Pass the TOML path with --config. Keep
existing client entries and catalogs. Run db-mcp --config <global.toml> --check-config.
With the demo loaded, ask the client for the pending order IDs in demo-ro.
Expect 101 and 103. If the client needs a restart first, give me the query to run.

Add a database with an agent

Add one connection to my DB MCP catalog. Ask which engine and database to use,
what to call it, and what data it contains. Use read_only unless I request write
or DDL access. SQL Server always uses read_only. For SQLite, ask for the existing
file path. For a network database, ask for the host, port, database or service name,
and username. Set password_env to the name of a variable I'll supply locally.
Keep its value out of the chat, commands and TOML.

Use the matching TOML in config-examples/databases from the release as a template.
If I'm using the bundled demo, create a personal catalog outside the install directory.
Give the connection a unique ID and add its file under the catalog's databases_dir.
Run db-mcp --config <global.toml> --check-config, then repeat with --test-connection <id>.
Once both pass, point my client at that catalog and restart the MCP server.

The configuration guide has a TOML example for each database engine.

Download and run

The archives include the executable, a SQLite demo and sample connection files. The executable runs without a Rust toolchain or Oracle Instant Client.

Systemx64 (Intel/AMD)ARM64 (Apple Silicon/ARM)
macOSDownloadDownload
LinuxDownloadDownload
WindowsDownloadDownload

On a Mac with Apple Silicon, try the demo from a terminal.

curl -fLO https://github.com/arthurhoch/db-mcp/releases/latest/download/db-mcp-macos-arm64.tar.gz
tar -xzf db-mcp-macos-arm64.tar.gz
cd db-mcp-macos-arm64
./db-mcp --version
./db-mcp --config demo/config/global.toml --check-config
./db-mcp --config demo/config/global.toml --test-connection demo-ro

On Windows, extract the ZIP and use db-mcp.exe. If your client supports MCPB and you already have a global TOML, install the matching .mcpb from the release and select that TOML when prompted.

For checksums and build provenance, see the verification instructions.

Connect your MCP client

GitHub Copilot in VS Code

The Copilot guide shows the .vscode/mcp.json entry and how to start the server.

Codex

Add this entry to your Codex configuration. Replace both paths with absolute paths on your machine.

[mcp_servers.db_mcp]
command = "/absolute/path/db-mcp-macos-arm64/db-mcp"
args = ["--config", "/absolute/path/db-mcp-macos-arm64/demo/config/global.toml"]

Access modes

Connection modeOperations
read_onlyRead queries.
read_writeRead queries, INSERT, UPDATE and DELETE.
read_write_ddlRead and write, plus supported CREATE, ALTER and DROP statements.

The database user's grants also apply. For PostgreSQL RLS or Oracle VPD, send the context setup and dependent queries in the same batch. If a write returns effect=unknown, check the database before retrying it.

Build from source

From the repository root, use rustup with the pinned toolchain.

cargo build --release --locked
cargo run --locked --example create_demo
target/release/db-mcp --config .runtime/demo/config/global.toml --test-connection demo-ro

The example creates .runtime/demo on its first run. To create another copy, pass a new directory after --example create_demo --.

Documentation · Privacy policy

Reviews

No reviews yet

Be the first to review this server!