MCP Toolbox for Databases with Postgres: which tools run SQL, what read-only misses, and how to make your agent ask
All 29 tools of Google's MCP Toolbox for Databases with --prebuilt=postgres (1.18.0), checked by running them against a real Postgres: what execute_sql ran as an app role and as postgres, how an agent switched a read-only connection back to writing, what the monitoring tools show of other sessions, what HTTP mode lets any website do, and the Claude Code settings that make the risky tools ask.
Checked on by running MCP Toolbox for Databases 1.18.0 (binary and @toolbox-sdk/server on npm, against Postgres 17 in Docker) from googleapis/mcp-toolbox and reading its tools/list answer. Each tier is the tool risk checker’s reading, with our reason wherever we changed it. Written by the people who make VariantGate.
The short answer
The prebuilt Postgres setup hands the model execute_sql with whatever the role may do, and has no read-only mode: a read-only connection setting was switched off by the agent itself. Give it a role that can only read, and for anything past exploring, write a tools.yaml of parameterised queries instead. With the prebuilt tools, 23 of 29 can run unasked; execute_sql, the query plan and the tools that show other sessions' SQL ask.
- Can run on their own
- 23
- Should ask a person
- 6
Lethal trifecta: This server can read private data. Beside a server that can take in content other people wrote and send data out, a setup holds all three legs of the lethal trifecta. Check your whole setup
Which server this is
MCP Toolbox for Databases is Google’s open-source MCP server, published as googleapis/mcp-toolbox (it used to be called genai-toolbox) and on npm as @toolbox-sdk/server. One binary serves many databases. Its README tells you to add it to Claude Code, Cursor or Gemini CLI with --prebuilt=postgres --stdio, and that loads 29 ready-made tools. We ran 1.18.0, released on 20 November 2026, against Postgres 17 in Docker, signed in as three roles in turn: one that may only read, one that may change rows, and postgres itself. Every start prints a warning that the prebuilt tools are for “build-time” use with trusted developers, and Google’s page for execute_sql says it is meant for workflows with a human in the loop.
execute_sql runs whatever the role may run
execute_sql takes one statement and runs it. Two statements in one call were refused, because the driver prepares the statement first. One statement goes a long way, though:
- As the role that may change rows, an
UPDATEand aDELETEboth went through, and the answer was empty: no row count, nothing for the model or a reader of the transcript to notice. AWITH … DELETE … RETURNINGinside aSELECTdeleted too. Dropping or creating a table was refused, by the role. - As
postgres,COPY (SELECT 1) TO PROGRAM 'id'ran a shell command on the database host. It also returned/etc/passwdthroughpg_read_file, read a password hash frompg_authid, and changed another role’s password.
No read-only mode, and the agent can switch one off
Toolbox has a read-only setting for BigQuery, but none for Postgres. The nearest thing is a connection setting: with POSTGRES_QUERY_PARAMS='{"default_transaction_read_only":"on"}' a DELETE was refused with “cannot execute DELETE in a read-only transaction”. Then the agent sent SET default_transaction_read_only = off through execute_sql, and the next DELETE went through. A session setting is something the session can change. What held was the role: the role with only SELECT grants was refused the DELETE, SET ROLE to the writing role, COPY … TO PROGRAM and pg_read_file.
The monitoring tools show other sessions’ SQL
list_active_queries, long_running_transactions and list_locks return the SQL text of other connections, values included. Signed in as postgres, they showed a query another role was running with a card number and an IBAN written into it. As a role without extra rights they showed nothing of other roles’ sessions, because Postgres hides that text. Granting pg_monitor or pg_read_all_stats, the usual roles for monitoring, opens it again. list_query_stats reads pg_stat_statements; our database did not have it, so we only saw its error.
The hints are wrong in both directions
Five tools are marked destructive although each runs one fixed SELECT from the server’s own config, such as list_autovacuum_configurations. Any SQL tool you write yourself gets the same mark unless you add readOnlyHint: true. Going the other way, the three tools above that showed other sessions’ SQL are marked read-only, which is true and still not the whole story. get_query_plan is marked destructive with reason: it pastes the model’s text into EXPLAIN (FORMAT JSON) … as written, and its own description says it is prone to SQL injection. We could not make it write, since a second statement and ANALYZE were both refused, but it asks below anyway.
HTTP mode answers any website
Started without --stdio, Toolbox serves MCP over HTTP on 127.0.0.1:5000 with no sign-in, and allows every host name and every origin. It warns about DNS rebinding at start-up, and it is right to. A request sent with Host: rebind.attacker.example and Origin: https://attacker.example ran execute_sql and got rows back, with Access-Control-Allow-Origin: * on the answer, which tells a browser to hand those rows to the page that asked. With --allowed-hosts 127.0.0.1:5000,localhost:5000 the same request got 403, and --allowed-origins took the CORS header away. Use --stdio for a coding agent and the question does not come up.
What it sends and reads
On every start it asks api.github.com for the latest release; --disable-version-check stopped that in our run. It sends traces or metrics only when you pass a --telemetry- flag. It did not read a .env file in the folder it started in: with the variables missing it refused to start, and with them set a .env beside it changed nothing.
A safer setup
For exploring a database with the prebuilt tools, sign in as a role that can only read the tables it needs, over stdio, without the version check:
CREATE ROLE agent_read LOGIN PASSWORD '…';
GRANT CONNECT ON DATABASE app TO agent_read;
GRANT USAGE ON SCHEMA public TO agent_read;
GRANT SELECT ON orders, customers TO agent_read;claude mcp add toolbox -e POSTGRES_HOST=db.internal -e POSTGRES_DATABASE=app -e POSTGRES_USER=agent_read -e POSTGRES_PASSWORD=… -- npx -y @toolbox-sdk/server@1.18.0 --prebuilt=postgres --stdio --disable-version-checkFor an agent that does real work, Google’s README points to its custom tools, written in a tools.yaml of your own: each tool is one query, and the model fills in only its parameters. Ours had one tool:
kind: source
name: shop-db
type: postgres
host: db.internal
port: 5432
database: app
user: agent_read
password: ${SHOP_DB_PASSWORD}
---
kind: tool
name: orders_for_customer
type: postgres-sql
source: shop-db
description: Lists one customer's orders, newest first, by the customer's email.
statement: |
SELECT o.id, o.total
FROM orders o JOIN customers c ON c.id = o.customer_id
WHERE c.email = $1
ORDER BY o.id DESC
LIMIT 20;
parameters:
- name: email
type: string
description: The customer's email address.
annotations:
readOnlyHint: trueStarted with --config tools.yaml --stdio, it offered only that tool; asked for execute_sql, it answered that no such tool exists. An email of x' OR '1'='1 or x'; DELETE FROM orders; -- returned no rows and deleted nothing, because $1 is sent as a value, not pasted into the SQL. Avoid templateParameters, which are pasted in; the docs warn about them too.
All 29 prebuilt Postgres tools
Hard to undo1 toolAsk a person every time. Consider two people, or deny it if the agent never needs it.
execute_sqlUse this tool to execute a single SQL statement.
Server says: destructive · toolset data
Our call: Runs any single statement the role may run. As an app role it updated and deleted rows and answered with nothing at all; as postgres it ran a shell command on the database host through COPY … TO PROGRAM.
Not sure5 toolsAsk a person until you have checked what it does.
list_query_statsLists performance statistics for executed queries ordered by total time, filtering by database name pattern if provided.
Server says: read-only · toolset monitor
Our call: Lists executed queries from pg_stat_statements, which keeps commands such as ALTER ROLE … PASSWORD as written. Our test database had no pg_stat_statements, so it only returned an error.
get_query_planGenerate a PostgreSQL EXPLAIN plan in JSON format for a single SQL statement—without executing it.
Server says: destructive · toolset monitor
Our call: Pastes the model's text into EXPLAIN as written; Google's own description says it is prone to SQL injection. We could not make it write: a second statement and ANALYZE were refused.
list_active_queriesList the top N (default 50) currently running queries (state='active') from pg_stat_activity, ordered by longest-running first.
Server says: read-only · toolset monitor
Our call: Returns the SQL text of other sessions, values included. As a non-superuser role it showed nothing of other roles; signed in as postgres, it showed another role's query with the IBAN written in it.
long_running_transactionsIdentifies and lists database transactions that exceed a specified time limit.
Server says: read-only · toolset monitor
Our call: Returns the SQL text of other sessions, values included. As a non-superuser role it showed nothing of other roles; signed in as postgres, it showed another role's query with the IBAN written in it.
list_locksIdentifies all locks held by active processes showing the process ID, user, query text, and an aggregated list of all transactions and specific locks (relation, mode, grant status) associated with each process.
Server says: read-only · toolset monitor
Our call: Returns the SQL text of other sessions, values included. As a non-superuser role it showed nothing of other roles; signed in as postgres, it showed another role's query with the IBAN written in it.
Only looks23 toolsLet it run. It only looks.
list_tablesLists detailed schema information (object type, columns, constraints, indexes, triggers, owner, comment) as JSON for user-created tables (ordinary or partitioned).
Server says: read-only · toolset data
Our call: Only reads the system catalogue or statistics views, with SQL the server writes itself, and the server marks it read-only. Words like installed or created in its description are about what it lists.
list_viewsLists views in the database from pg_views with a default limit of 50 rows.
Server says: read-only · toolset data
list_schemasLists all schemas in the database ordered by schema name and excluding system and temporary schemas.
Server says: read-only · toolset data
list_triggersLists all non-internal triggers in a database.
Server says: read-only · toolset data
list_indexesLists available user indexes in the database, excluding system schemas (pg_catalog, information_schema).
Server says: read-only · toolset data
list_sequencesLists sequences in the database.
Server says: read-only · toolset data
list_stored_procedureRetrieves stored procedure metadata returning schema name, procedure name, procedure owner, language, definition, and description, filtered by optional role name (procedure owner), schema name, and limit (default 20).
Server says: read-only · toolset data
list_database_statsLists the key performance and activity statistics for each PostgreSQL database in the instance, offering insights into cache efficiency, transaction throughputrow-level activity, temporary file usage, and contention.
Server says: read-only · toolset monitor
list_top_bloated_tablesList the top tables by dead-tuple (approximate bloat signal), returning schema, table, live/dead tuples, percentage, and last vacuum/analyze times.
Server says: destructive · toolset health
Our call: Marked destructive only because every tool of the fixed-SQL type is, unless its config says otherwise. Its SQL is one SELECT written in the server's own config, with no text from the model in it.
list_invalid_indexesLists all invalid PostgreSQL indexes which are taking up disk space but are unusable by the query planner.
Server says: destructive · toolset health
Our call: Marked destructive only because every tool of the fixed-SQL type is, unless its config says otherwise. Its SQL is one SELECT written in the server's own config, with no text from the model in it.
list_table_statsLists the user table statistics in the database ordered by number of sequential scans with a default limit of 50 rows.
Server says: read-only · toolset health
get_column_cardinalityEstimates the number of unique values (cardinality) quickly for one or all columns in a specific PostgreSQL table by using the database's internal statistics, returning the results in descending order of estimated cardinality.
Server says: read-only · toolset health
list_autovacuum_configurationsList PostgreSQL autovacuum-related configurations (name and current setting) from pg_settings.
Server says: destructive · toolset health
Our call: Marked destructive only because every tool of the fixed-SQL type is, unless its config says otherwise. Its SQL is one SELECT written in the server's own config, with no text from the model in it.
list_tablespacesLists all tablespaces in the database.
Server says: read-only · toolset health
database_overviewFetches the current state of the PostgreSQL server, returning the version, whether it's a replica, uptime duration, maximum connection limit, number of current connections, number of active connections, and the percentage of connections in use.
Server says: read-only · toolset health, view-config, replication
list_pg_settingsLists configuration parameters for the postgres server ordered lexicographically, with a default limit of 50 rows.
Server says: read-only · toolset health, view-config, replication
list_available_extensionsDiscover all PostgreSQL extensions available for installation on this server, returning name, default_version, and description.
Server says: read-only · toolset view-config
list_installed_extensionsList all installed PostgreSQL extensions with their name, version, schema, owner, and description.
Server says: read-only · toolset view-config
Our call: Only reads the system catalogue or statistics views, with SQL the server writes itself, and the server marks it read-only. Words like installed or created in its description are about what it lists.
list_memory_configurationsList PostgreSQL memory-related configurations (name and current setting) from pg_settings.
Server says: destructive · toolset view-config
Our call: Marked destructive only because every tool of the fixed-SQL type is, unless its config says otherwise. Its SQL is one SELECT written in the server's own config, with no text from the model in it.
replication_statsLists each replica's process ID, user name, application name, backend_xmin (standby's xmin horizon reported by hot_standby_feedback), client IP address, connection state, and sync_state, along with lag sizes in bytes for sent_lag (primary to sent), write_lag (sent to written), flush_lag (written to flushed), replay_lag (flushed to replayed), and the overall total_lag (primary to replayed).
Server says: read-only · toolset replication
Our call: Only reads the system catalogue or statistics views, with SQL the server writes itself, and the server marks it read-only. Words like installed or created in its description are about what it lists.
list_replication_slotsList key details for all PostgreSQL replication slots (e.g., type, database, active status) and calculates the size of the outstanding WAL that is being prevented from removal by the slot.
Server says: destructive · toolset replication
Our call: Marked destructive only because every tool of the fixed-SQL type is, unless its config says otherwise. Its SQL is one SELECT written in the server's own config, with no text from the model in it.
list_publication_tablesLists all publication tables in the database.
Server says: read-only · toolset replication
list_rolesLists all the user-created roles in the instance .
Server says: read-only · toolset replication
Our call: Reads role names and their flags, such as superuser and can log in. It never returned a password hash; those live in pg_authid, which it does not read.
Let the reads run in Claude Code
Claude Code asks before every MCP tool it has no rule for. Added as toolbox, this server’s tools are named mcp__toolbox__<tool>. These allow rules, in .claude/settings.json or ~/.claude/settings.json, let the tools that only look run without a prompt. Everything else keeps asking, including any tool a later version of the server adds.
{
"permissions": {
"allow": [
"mcp__toolbox__list_tables",
"mcp__toolbox__list_views",
"mcp__toolbox__list_schemas",
"mcp__toolbox__list_triggers",
"mcp__toolbox__list_indexes",
"mcp__toolbox__list_sequences",
"mcp__toolbox__list_stored_procedure",
"mcp__toolbox__list_database_stats",
"mcp__toolbox__list_top_bloated_tables",
"mcp__toolbox__list_invalid_indexes",
"mcp__toolbox__list_table_stats",
"mcp__toolbox__get_column_cardinality",
"mcp__toolbox__list_autovacuum_configurations",
"mcp__toolbox__list_tablespaces",
"mcp__toolbox__database_overview",
"mcp__toolbox__list_pg_settings",
"mcp__toolbox__list_available_extensions",
"mcp__toolbox__list_installed_extensions",
"mcp__toolbox__list_memory_configurations",
"mcp__toolbox__replication_stats",
"mcp__toolbox__list_replication_slots",
"mcp__toolbox__list_publication_tables",
"mcp__toolbox__list_roles"
]
}
}The command that adds the server:
claude mcp add toolbox -e POSTGRES_HOST=db.internal -e POSTGRES_DATABASE=app -e POSTGRES_USER=agent_read -e POSTGRES_PASSWORD=… -- npx -y @toolbox-sdk/server@1.18.0 --prebuilt=postgres --stdio --disable-version-checkSend the rest to a person, not the terminal
A prompt in the terminal only works while someone is watching it. With this hook, every other tool of the server becomes a request in your VariantGate inbox, on your phone or in Slack, and Claude Code waits for the answer. The matcher names the look-only tools, so a tool added later is sent too. Put the key in VARIANTGATE_KEY, or run the one-command setup for Claude Code first.
{
"hooks": {
"PreToolUse": [
{
"matcher": "mcp__toolbox__(?!(list_tables|list_views|list_schemas|list_triggers|list_indexes|list_sequences|list_stored_procedure|list_database_stats|list_top_bloated_tables|list_invalid_indexes|list_table_stats|get_column_cardinality|list_autovacuum_configurations|list_tablespaces|database_overview|list_pg_settings|list_available_extensions|list_installed_extensions|list_memory_configurations|replication_stats|list_replication_slots|list_publication_tables|list_roles)$).*",
"hooks": [
{ "type": "command", "command": "variantgate hook claude-code", "timeout": 180 }
]
}
]
}
}Disagree with a tier, or run the server with other flags? Open these tools in the tool risk checker, change what you like, and copy the settings for your own setup. It runs in your browser and starts from its own reading, so a tool we marked as only looking by hand asks there until you change it.
Set it up in Cursor, VS Code, Codex, Gemini CLI and other clients
The same server as the claude mcp add line above, written the way each client reads it, for Claude Desktop, Cursor, VS Code, Windsurf, Codex, Gemini CLI, Cline and Zed. Cursor and VS Code add it in one click: the app shows the settings and asks before it saves them. Set up like this, every tool runs as soon as the model calls it; the next section puts a person in front of the ones that change things. Running it with other flags? Convert your own settings.
claude_desktop_config.json{
"mcpServers": {
"toolbox": {
"command": "npx",
"args": [
"-y",
"@toolbox-sdk/server@1.18.0",
"--prebuilt=postgres",
"--stdio",
"--disable-version-check"
],
"env": {
"POSTGRES_HOST": "db.internal",
"POSTGRES_DATABASE": "app",
"POSTGRES_USER": "agent_read",
"POSTGRES_PASSWORD": "…"
}
}
}
}~/.cursor/mcp.json or .cursor/mcp.json{
"mcpServers": {
"toolbox": {
"command": "npx",
"args": [
"-y",
"@toolbox-sdk/server@1.18.0",
"--prebuilt=postgres",
"--stdio",
"--disable-version-check"
],
"env": {
"POSTGRES_HOST": "db.internal",
"POSTGRES_DATABASE": "app",
"POSTGRES_USER": "agent_read",
"POSTGRES_PASSWORD": "…"
}
}
}
}.vscode/mcp.json{
"servers": {
"toolbox": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@toolbox-sdk/server@1.18.0",
"--prebuilt=postgres",
"--stdio",
"--disable-version-check"
],
"env": {
"POSTGRES_HOST": "db.internal",
"POSTGRES_DATABASE": "app",
"POSTGRES_USER": "agent_read",
"POSTGRES_PASSWORD": "…"
}
}
}
}~/.codeium/windsurf/mcp_config.json{
"mcpServers": {
"toolbox": {
"command": "npx",
"args": [
"-y",
"@toolbox-sdk/server@1.18.0",
"--prebuilt=postgres",
"--stdio",
"--disable-version-check"
],
"env": {
"POSTGRES_HOST": "db.internal",
"POSTGRES_DATABASE": "app",
"POSTGRES_USER": "agent_read",
"POSTGRES_PASSWORD": "…"
}
}
}
}~/.codex/config.toml[mcp_servers.toolbox]
command = "npx"
args = ["-y", "@toolbox-sdk/server@1.18.0", "--prebuilt=postgres", "--stdio", "--disable-version-check"]
env = { POSTGRES_HOST = "db.internal", POSTGRES_DATABASE = "app", POSTGRES_USER = "agent_read", POSTGRES_PASSWORD = "…" }~/.gemini/settings.json{
"mcpServers": {
"toolbox": {
"command": "npx",
"args": [
"-y",
"@toolbox-sdk/server@1.18.0",
"--prebuilt=postgres",
"--stdio",
"--disable-version-check"
],
"env": {
"POSTGRES_HOST": "db.internal",
"POSTGRES_DATABASE": "app",
"POSTGRES_USER": "agent_read",
"POSTGRES_PASSWORD": "…"
}
}
}
}cline_mcp_settings.json (Configure MCP Servers){
"mcpServers": {
"toolbox": {
"command": "npx",
"args": [
"-y",
"@toolbox-sdk/server@1.18.0",
"--prebuilt=postgres",
"--stdio",
"--disable-version-check"
],
"env": {
"POSTGRES_HOST": "db.internal",
"POSTGRES_DATABASE": "app",
"POSTGRES_USER": "agent_read",
"POSTGRES_PASSWORD": "…"
}
}
}
}~/.config/zed/settings.json{
"context_servers": {
"toolbox": {
"command": "npx",
"args": [
"-y",
"@toolbox-sdk/server@1.18.0",
"--prebuilt=postgres",
"--stdio",
"--disable-version-check"
],
"env": {
"POSTGRES_HOST": "db.internal",
"POSTGRES_DATABASE": "app",
"POSTGRES_USER": "agent_read",
"POSTGRES_PASSWORD": "…"
}
}
}
}- Add context_servers next to your other settings in the same file.
Any MCP client: put the proxy in front
Claude Desktop, Cursor and most other MCP clients have no hook to send a call to a person. The VariantGate MCP proxy does it in the server’s place: it starts the server, lets the look-only tools above through, and holds every other call until someone approves it in the inbox. Run npx -y https://variantgate.com/sdk/variantgate-agent-0.19.0.tgz login once to save a key, then use the settings for your client:
claude_desktop_config.json{
"mcpServers": {
"toolbox": {
"command": "npx",
"args": [
"-y",
"https://variantgate.com/sdk/variantgate-agent-0.19.0.tgz",
"mcp-proxy",
"--name",
"toolbox",
"--look-only",
"list_tables,list_views,list_schemas,list_triggers,list_indexes,list_sequences,list_stored_procedure,list_database_stats,list_top_bloated_tables,list_invalid_indexes,list_table_stats,get_column_cardinality,list_autovacuum_configurations,list_tablespaces,database_overview,list_pg_settings,list_available_extensions,list_installed_extensions,list_memory_configurations,replication_stats,list_replication_slots,list_publication_tables,list_roles",
"--",
"npx",
"-y",
"@toolbox-sdk/server@1.18.0",
"--prebuilt=postgres",
"--stdio",
"--disable-version-check"
],
"env": {
"POSTGRES_HOST": "db.internal",
"POSTGRES_DATABASE": "app",
"POSTGRES_USER": "agent_read",
"POSTGRES_PASSWORD": "…"
}
}
}
}~/.cursor/mcp.json or .cursor/mcp.json{
"mcpServers": {
"toolbox": {
"command": "npx",
"args": [
"-y",
"https://variantgate.com/sdk/variantgate-agent-0.19.0.tgz",
"mcp-proxy",
"--name",
"toolbox",
"--look-only",
"list_tables,list_views,list_schemas,list_triggers,list_indexes,list_sequences,list_stored_procedure,list_database_stats,list_top_bloated_tables,list_invalid_indexes,list_table_stats,get_column_cardinality,list_autovacuum_configurations,list_tablespaces,database_overview,list_pg_settings,list_available_extensions,list_installed_extensions,list_memory_configurations,replication_stats,list_replication_slots,list_publication_tables,list_roles",
"--",
"npx",
"-y",
"@toolbox-sdk/server@1.18.0",
"--prebuilt=postgres",
"--stdio",
"--disable-version-check"
],
"env": {
"POSTGRES_HOST": "db.internal",
"POSTGRES_DATABASE": "app",
"POSTGRES_USER": "agent_read",
"POSTGRES_PASSWORD": "…"
}
}
}
}.vscode/mcp.json{
"servers": {
"toolbox": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"https://variantgate.com/sdk/variantgate-agent-0.19.0.tgz",
"mcp-proxy",
"--name",
"toolbox",
"--look-only",
"list_tables,list_views,list_schemas,list_triggers,list_indexes,list_sequences,list_stored_procedure,list_database_stats,list_top_bloated_tables,list_invalid_indexes,list_table_stats,get_column_cardinality,list_autovacuum_configurations,list_tablespaces,database_overview,list_pg_settings,list_available_extensions,list_installed_extensions,list_memory_configurations,replication_stats,list_replication_slots,list_publication_tables,list_roles",
"--",
"npx",
"-y",
"@toolbox-sdk/server@1.18.0",
"--prebuilt=postgres",
"--stdio",
"--disable-version-check"
],
"env": {
"POSTGRES_HOST": "db.internal",
"POSTGRES_DATABASE": "app",
"POSTGRES_USER": "agent_read",
"POSTGRES_PASSWORD": "…"
}
}
}
}~/.codeium/windsurf/mcp_config.json{
"mcpServers": {
"toolbox": {
"command": "npx",
"args": [
"-y",
"https://variantgate.com/sdk/variantgate-agent-0.19.0.tgz",
"mcp-proxy",
"--name",
"toolbox",
"--look-only",
"list_tables,list_views,list_schemas,list_triggers,list_indexes,list_sequences,list_stored_procedure,list_database_stats,list_top_bloated_tables,list_invalid_indexes,list_table_stats,get_column_cardinality,list_autovacuum_configurations,list_tablespaces,database_overview,list_pg_settings,list_available_extensions,list_installed_extensions,list_memory_configurations,replication_stats,list_replication_slots,list_publication_tables,list_roles",
"--",
"npx",
"-y",
"@toolbox-sdk/server@1.18.0",
"--prebuilt=postgres",
"--stdio",
"--disable-version-check"
],
"env": {
"POSTGRES_HOST": "db.internal",
"POSTGRES_DATABASE": "app",
"POSTGRES_USER": "agent_read",
"POSTGRES_PASSWORD": "…"
}
}
}
}~/.codex/config.toml[mcp_servers.toolbox]
command = "npx"
args = ["-y", "https://variantgate.com/sdk/variantgate-agent-0.19.0.tgz", "mcp-proxy", "--name", "toolbox", "--look-only", "list_tables,list_views,list_schemas,list_triggers,list_indexes,list_sequences,list_stored_procedure,list_database_stats,list_top_bloated_tables,list_invalid_indexes,list_table_stats,get_column_cardinality,list_autovacuum_configurations,list_tablespaces,database_overview,list_pg_settings,list_available_extensions,list_installed_extensions,list_memory_configurations,replication_stats,list_replication_slots,list_publication_tables,list_roles", "--", "npx", "-y", "@toolbox-sdk/server@1.18.0", "--prebuilt=postgres", "--stdio", "--disable-version-check"]
env = { POSTGRES_HOST = "db.internal", POSTGRES_DATABASE = "app", POSTGRES_USER = "agent_read", POSTGRES_PASSWORD = "…" }~/.gemini/settings.json{
"mcpServers": {
"toolbox": {
"command": "npx",
"args": [
"-y",
"https://variantgate.com/sdk/variantgate-agent-0.19.0.tgz",
"mcp-proxy",
"--name",
"toolbox",
"--look-only",
"list_tables,list_views,list_schemas,list_triggers,list_indexes,list_sequences,list_stored_procedure,list_database_stats,list_top_bloated_tables,list_invalid_indexes,list_table_stats,get_column_cardinality,list_autovacuum_configurations,list_tablespaces,database_overview,list_pg_settings,list_available_extensions,list_installed_extensions,list_memory_configurations,replication_stats,list_replication_slots,list_publication_tables,list_roles",
"--",
"npx",
"-y",
"@toolbox-sdk/server@1.18.0",
"--prebuilt=postgres",
"--stdio",
"--disable-version-check"
],
"env": {
"POSTGRES_HOST": "db.internal",
"POSTGRES_DATABASE": "app",
"POSTGRES_USER": "agent_read",
"POSTGRES_PASSWORD": "…"
}
}
}
}cline_mcp_settings.json (Configure MCP Servers){
"mcpServers": {
"toolbox": {
"command": "npx",
"args": [
"-y",
"https://variantgate.com/sdk/variantgate-agent-0.19.0.tgz",
"mcp-proxy",
"--name",
"toolbox",
"--look-only",
"list_tables,list_views,list_schemas,list_triggers,list_indexes,list_sequences,list_stored_procedure,list_database_stats,list_top_bloated_tables,list_invalid_indexes,list_table_stats,get_column_cardinality,list_autovacuum_configurations,list_tablespaces,database_overview,list_pg_settings,list_available_extensions,list_installed_extensions,list_memory_configurations,replication_stats,list_replication_slots,list_publication_tables,list_roles",
"--",
"npx",
"-y",
"@toolbox-sdk/server@1.18.0",
"--prebuilt=postgres",
"--stdio",
"--disable-version-check"
],
"env": {
"POSTGRES_HOST": "db.internal",
"POSTGRES_DATABASE": "app",
"POSTGRES_USER": "agent_read",
"POSTGRES_PASSWORD": "…"
}
}
}
}~/.config/zed/settings.json{
"context_servers": {
"toolbox": {
"command": "npx",
"args": [
"-y",
"https://variantgate.com/sdk/variantgate-agent-0.19.0.tgz",
"mcp-proxy",
"--name",
"toolbox",
"--look-only",
"list_tables,list_views,list_schemas,list_triggers,list_indexes,list_sequences,list_stored_procedure,list_database_stats,list_top_bloated_tables,list_invalid_indexes,list_table_stats,get_column_cardinality,list_autovacuum_configurations,list_tablespaces,database_overview,list_pg_settings,list_available_extensions,list_installed_extensions,list_memory_configurations,replication_stats,list_replication_slots,list_publication_tables,list_roles",
"--",
"npx",
"-y",
"@toolbox-sdk/server@1.18.0",
"--prebuilt=postgres",
"--stdio",
"--disable-version-check"
],
"env": {
"POSTGRES_HOST": "db.internal",
"POSTGRES_DATABASE": "app",
"POSTGRES_USER": "agent_read",
"POSTGRES_PASSWORD": "…"
}
}
}
}- Add context_servers next to your other settings in the same file.
Already have it in Claude Desktop? One command rewrites the file for you, with these look-only tools filled in, and keeps the old one (setup vscode does the same for VS Code; how it works):
npx -y https://variantgate.com/sdk/variantgate-agent-0.19.0.tgz setup claude-desktopThe same in Claude Code, instead of the hook. The proxy now asks about every call that matters, so an allow rule for the whole server, mcp__toolbox, keeps Claude Code from asking a second time in the terminal:
claude mcp add toolbox -e POSTGRES_HOST=db.internal -e POSTGRES_DATABASE=app -e POSTGRES_USER=agent_read -e POSTGRES_PASSWORD=… -- npx -y https://variantgate.com/sdk/variantgate-agent-0.19.0.tgz mcp-proxy --name toolbox --look-only list_tables,list_views,list_schemas,list_triggers,list_indexes,list_sequences,list_stored_procedure,list_database_stats,list_top_bloated_tables,list_invalid_indexes,list_table_stats,get_column_cardinality,list_autovacuum_configurations,list_tablespaces,database_overview,list_pg_settings,list_available_extensions,list_installed_extensions,list_memory_configurations,replication_stats,list_replication_slots,list_publication_tables,list_roles -- npx -y @toolbox-sdk/server@1.18.0 --prebuilt=postgres --stdio --disable-version-checkWhen the agent should write
Write one tool per change in a second tools.yaml, such as refund_order with an order id and an amount, signed in as a role that may update only that table. Run it as its own server with its own name, such as toolbox-write, so the allow rules above do not cover it, and let every tool on it ask. Since an UPDATE answers with nothing, the person approving should see the order id and amount before it runs, not a row count after.
See it before you decide.
The playground runs the whole approval loop in your browser, no account needed. When it fits, the free plan covers 100 requests a month.