Read-only database access for agents with SQL guardrails, table allowlists, PII masking and audit logs.
Setup
Choose your client, copy the config, then fill in any required environment variables.
claude mcp add safedb --env YOUR_API_KEY='<YOUR_API_KEY>' -- npx -y @safedb/safedb-mcp~/.codex/config.toml
[mcp_servers.safedb]
command = "npx"
args = ["-y", "@safedb/safedb-mcp"]
env = { YOUR_API_KEY = "<YOUR_API_KEY>" }
# codex mcp add safedb --env YOUR_API_KEY='<YOUR_API_KEY>' -- npx -y @safedb/safedb-mcp~/.cursor/mcp.json
{
"mcpServers": {
"safedb": {
"command": "npx",
"args": [
"-y",
"@safedb/safedb-mcp"
],
"env": {
"YOUR_API_KEY": "<YOUR_API_KEY>"
}
}
}
}.vscode/mcp.json
{
"servers": {
"safedb": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@safedb/safedb-mcp"
],
"env": {
"YOUR_API_KEY": "<YOUR_API_KEY>"
}
}
}
}~/.gemini/settings.json
{
"mcpServers": {
"safedb": {
"command": "npx",
"args": [
"-y",
"@safedb/safedb-mcp"
],
"env": {
"YOUR_API_KEY": "<YOUR_API_KEY>"
}
}
}
}claude_desktop_config.json
{
"mcpServers": {
"safedb": {
"command": "npx",
"args": [
"-y",
"@safedb/safedb-mcp"
],
"env": {
"YOUR_API_KEY": "<YOUR_API_KEY>"
}
}
}
}.trae/mcp.json
{
"mcpServers": {
"safedb": {
"command": "npx",
"args": [
"-y",
"@safedb/safedb-mcp"
],
"env": {
"YOUR_API_KEY": "<YOUR_API_KEY>"
}
}
}
}Environment variables
YOUR_API_KEY
Replace the placeholders with your own credentials and keep them out of version control.