DB MCP Server
A Rust-based MCP server that enables AI assistants to interact with SQL databases (SQLite, PostgreSQL, MySQL) safely and efficiently.
Features
- : SQLite, PostgreSQL, MySQL
Power your agent
पब्लिशर का इंस्टॉल। PlugMCP एंडपॉइंट नहीं।
Host a copy with our keys and logs.
रजिस्ट्री में अभी कोई पैकेज्ड रिलीज़ नहीं है। रिपॉज़िटरी का README देखें.
रिमोट URL या आपकी मशीन पर कमांड? दोनों इंस्टॉल में क्या अंतर है
PlugMCP पर चलाएँ
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
लॉन्चपब्लिशर से
A Rust-based MCP server that enables AI assistants to interact with SQL databases (SQLite, PostgreSQL, MySQL) safely and efficiently.
A Rust-based MCP server that enables AI assistants to interact with SQL databases (SQLite, PostgreSQL, MySQL) safely and efficiently.
?writable=true flagcargo install --path .
Or build from source:
cargo build --release
# SQLite (read-only)
db-mcp-server --database sqlite:data.db
# SQLite (writable)
db-mcp-server --database sqlite:data.db?writable=true
# PostgreSQL (specific database)
db-mcp-server --database postgres://user:pass@localhost/mydb
# PostgreSQL (server-level, no default database)
db-mcp-server --database postgres://user:pass@localhost:5432?writable=true
# MySQL with write access
db-mcp-server --database mysql://user:pass@localhost/mydb?writable=true
Configure multiple databases using one of these methods:
Method 1: Command Line (repeat -d flag)
# Use auto-generated IDs (derived from database name)
db-mcp-server -d sqlite:one.db -d postgres://localhost/two
# Use custom IDs (recommended)
db-mcp-server -d app=sqlite:app.db?writable=true -d analytics=postgres://user:pass@localhost/analytics
# Mix multiple databases
db-mcp-server \
-d main=sqlite:main.db?writable=true \
-d reports=mysql://user:pass@localhost/reports \
-d logs=postgres://user:pass@localhost/logs?writable=true
Method 2: Environment Variable (comma-separated)
# Single database
export MCP_DATABASE="sqlite:data.db?writable=true"
db-mcp-server
# Multiple databases
export MCP_DATABASE="\
app=sqlite:app.db?writable=true,\
analytics=postgres://user:pass@localhost/analytics,\
logs=mysql://user:pass@localhost/logs?writable=true"
db-mcp-server
Method 3: Claude Desktop Configuration
See Claude Desktop Configuration section below.
# SQLite
sqlite:path/to/db.db
sqlite:path/to/db.db?writable=true
# PostgreSQL
postgres://user:pass@host:port/database
postgres://user:pass@host:5432 # server-level
postgres://user:pass@host/database?writable=true
# MySQL
mysql://user:pass@host:port/database
mysql://user:pass@host:3306 # server-level
mysql://user:pass@host/database?writable=true
# Named connections (recommended for multiple databases)
id=<connection_string>
app=sqlite:app.db?writable=true
analytics=postgres://user:pass@localhost/analytics
# HTTP mode (with SSE)
db-mcp-server --transport http --database sqlite:data.db
# HTTP mode with custom host/port
db-mcp-server --transport http --database sqlite:data.db --http-host 0.0.0.0 --http-port 3000
HTTP transport supports Bearer token authentication. STDIO transport does not require authentication as it relies on OS-level process isolation.
Enable authentication:
# Single token via CLI
db-mcp-server --transport http --database sqlite:data.db --auth-token my-secret-token
# Multiple tokens via CLI
db-mcp-server --transport http --database sqlite:data.db \
--auth-token token1 --auth-token token2
# Via environment variable (comma-separated)
export MCP_AUTH_TOKENS="token1,token2,token3"
db-mcp-server --transport http --database sqlite:data.db
Client usage:
Include the token in the Authorization header:
Authorization: Bearer my-secret-token
?writable=true in connection string)? or $1, $2, ... placeholders with params arrayquery and explain support format parameter (json, table, markdown)begin_transaction → query/execute with transaction_id → commit/rollbackskip_sql_check: truedatabase parameter to target specific database for server-level connectionsUsing CLI command:
# Single database
claude mcp add --transport stdio database -- db-mcp-server --database "sqlite:app.db?writable=true"
# Multiple databases
claude mcp add --transport stdio database -- db-mcp-server \
-d "app=sqlite:app.db?writable=true" \
-d "analytics=postgres://user:pass@localhost/analytics"
Or edit ~/.claude.json or .mcp.json manually:
{
"mcpServers": {
"database": {
"command": "db-mcp-server",
"args": [
"-d", "app=sqlite:app.db?writable=true",
"-d", "analytics=postgres://user:pass@localhost/analytics"
]
}
}
}
Using CLI command:
# Single database
codex mcp add database -- db-mcp-server --database "sqlite:app.db?writable=true"
# Multiple databases
codex mcp add database -- db-mcp-server \
-d "app=sqlite:app.db?writable=true" \
-d "analytics=postgres://user:pass@localhost/analytics"
Or edit ~/.codex/config.toml manually:
[mcp_servers.database]
command = "db-mcp-server"
args = [
"-d", "app=sqlite:app.db?writable=true",
"-d", "analytics=postgres://user:pass@localhost/analytics"
]
Add to your claude_desktop_config.json:
{
"mcpServers": {
"database": {
"command": "db-mcp-server",
"args": [
"-d", "app=sqlite:app.db?writable=true",
"-d", "analytics=postgres://user:pass@localhost/analytics"
]
}
}
}
Or using environment variables:
{
"mcpServers": {
"database": {
"command": "db-mcp-server",
"env": {
"MCP_DATABASE": "app=sqlite:app.db?writable=true,analytics=postgres://user:pass@localhost/analytics"
}
}
}
}
# Build from source
cargo build --release
# Run tests
cargo test
Contributions are welcome! Please feel free to submit a Pull Request.
MIT
A Rust-based MCP server that enables AI assistants to interact with SQL databases (SQLite, PostgreSQL, MySQL) safely and efficiently.
टूल
अभी टूल सूची नहीं है। रिमोट सर्वर को पहले हेल्थ चेक के बाद सूची मिलती है।
FAQ
इस पेज पर Cursor, Claude Desktop, Claude Code या VS Code के लिए stdio कॉन्फ़िग कॉपी करें। यह पब्लिशर का इंस्टॉल इस्तेमाल करता है, PlugMCP प्रॉक्सी नहीं।
इस रिकॉर्ड में कोई ज़रूरी एनवायरनमेंट वेरिएबल दर्ज नहीं है।
Db stdio पर लोकल चलता है।
पिछली जाँच 2026-10-28 को हुई। A Rust-based MCP server that enables AI assistants to interact with SQL databases (SQLite, PostgreSQL, MySQL) safely and efficiently.