Neon MCP server tools: what reaches your main branch, and how to make your agent ask
All 23 tools of Neon's local MCP server (@neondatabase/mcp-server-neon 0.6.5), checked by running it against a stand-in for the Neon API and a real Postgres: why explain_sql_statement deleted a row, what complete_database_migration really runs on main, which tools hand the model a password, and the Claude Code settings that make the rest ask.
Checked on by running @neondatabase/mcp-server-neon 0.6.5 (npm, run with node) from neondatabase/mcp-server-neon 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 local server has no read-only mode, and every SQL tool signs in as the database owner. Let its 9 reads run, and make SQL, explain, migrations, query tuning and get_connection_string ask. Neon's remote server has a readonly=true switch.
- Can run on their own
- 9
- Should ask a person
- 14
Which Neon server this is
This page is about Neon’s own local server, @neondatabase/mcp-server-neon. We ran 0.6.5, its last npm release, from September 2025. Neon’s README now leads with its remote server at mcp.neon.tech, which has many more tools; that one is covered at the end. We pointed the local server at a stand-in for Neon’s API that we wrote, through its NEON_API_HOST setting, and sent its SQL to Postgres 17 in Docker. In the stand-in, each branch it created was a fresh copy of the database. It offers all 23 tools every time: there is no read-only mode, no flag to switch tools off, and the tools give no read-only or destructive hints.
Every SQL tool signs in as the database owner
run_sql asks the API for the owner’s connection string and runs what it is given; it has no role setting. A DELETE through it removed the row. It refuses two statements in one call, but run_sql_transaction takes a list. explain_sql_statement sounds safer and is not: its analyze option is on unless the agent turns it off, and EXPLAIN ANALYZE runs the statement. We explained DELETE FROM customers WHERE id = 4, passing only the SQL and the project, and row 4 was gone.
What a migration really runs on main
prepare_database_migration creates a branch from the default branch and runs the SQL there. complete_database_migration takes nothing but the migration id. We ran a migration that added a column and set every customer’s plan, then added a customer on main:
- Complete ran the stored SQL again on the default branch, so the customer added after the test was changed too. Whatever the agent did on the test branch afterwards is not carried over.
- The id lives only in the server’s memory. After a restart, complete answered “Migration not found”.
- The SQL is split at every semicolon, so
VALUES ('first; second')failed. The branch it had just made was left behind with its compute endpoint. complete_query_tuningnever checks its tuning id. With a made-up one andapplyChangesset, it ranDROP TABLE noteson main.
Three tools hand the model a secret
get_connection_string returns the owner’s connection string, password included, and create_project prints one for the new project twice. Neon’s own README says this string carries a privileged role password. provision_neon_auth returns the Neon Auth STACK_SECRET_SERVER_KEY. Our stand-in returned fake values; the tools passed them on unchanged. Once a password is in the conversation, anything the agent runs with it skips every approval.
Safe setup
claude mcp add neon -- npx -y @neondatabase/mcp-server-neon@0.6.5 start $NEON_API_KEY --no-analyticsPass --no-analytics after the key. Without it the server sends Segment events to track.neon.tech, with your account’s name and email, at start and on every tool call. The key itself goes on the command line, so other users of the machine can see it in the process list. Neon’s README says an organization’s API key limits it to that organization’s projects. Point it at a project you can afford to lose, not production.
Neon’s remote server and readonly=true
The remote server is configured on its URL. Its tool list, which Neon publishes without sign-in, offers 141 tools; with ?readonly=true it offers 59. It drops run_sql_transaction, both migration tools, query tuning, get_connection_string and the writes, and keeps run_sql and explain_sql_statement. The README says that run_sql then runs each query in a READ ONLY transaction, and that roleName pins SQL to a Postgres role you choose. We did not run SQL through the remote server.
All 23 tools
Hard to undo10 toolsAsk a person every time. Consider two people, or deny it if the agent never needs it.
delete_projectDelete a Neon project
Server gives no read-only or destructive hint
run_sqlUse this tool to execute a single SQL statement against a Neon database.
Server gives no read-only or destructive hint
Our call: Runs the SQL it is given, signed in as the database owner, with no read-only option. A DELETE we sent through it removed the row.
run_sql_transactionUse this tool to execute a SQL transaction against a Neon database, should be used for multiple SQL statements.
Server gives no read-only or destructive hint
Our call: Runs the SQL it is given, signed in as the database owner, with no read-only option. A DELETE we sent through it removed the row.
prepare_database_migrationThis tool performs database schema migrations by automatically generating and executing DDL statements.
Server gives no read-only or destructive hint
Our call: Runs the SQL on a new branch, not on main, but the SQL it stores is what complete_database_migration later runs on main without showing it again. When the SQL failed, the new branch was left behind.
complete_database_migrationComplete a database migration when the user confirms the migration is ready to be applied to the main branch.
Server gives no read-only or destructive hint
Our call: Takes only a migration id, then runs the stored SQL again on the default branch and deletes the test branch. A row added to main after the test was changed too.
delete_branchDelete a branch from a Neon project
Server gives no read-only or destructive hint
reset_from_parentResets a branch to match its parent's current state, effectively discarding all changes made on the branch.
Server gives no read-only or destructive hint
get_connection_stringGet a PostgreSQL connection string for a Neon database with all parameters being optional
Server gives no read-only or destructive hint
Our call: Returns the database owner's connection string with the password in it. Anyone holding it can run any SQL, past every approval.
explain_sql_statementDescribe the PostgreSQL query execution plan for a query of SQL statement by running EXPLAIN (ANAYLZE...) in the database
Server gives no read-only or destructive hint
Our call: Sounds like a read, but analyze is on unless the agent turns it off, and EXPLAIN ANALYZE runs the statement. Explaining a DELETE deleted the row.
complete_query_tuningComplete a query tuning session by either applying the changes to the main branch or discarding them.
Server gives no read-only or destructive hint
Our call: Runs any statements it is given on the default branch when applyChanges is true. With a made-up tuning id it ran DROP TABLE on main.
Changes data4 toolsAsk a person. Once it is routine, a standing rule can answer.
create_projectCreate a new Neon project.
Server gives no read-only or destructive hint
Our call: Creates a project and returns its connection string, owner password included.
create_branchCreate a branch in a Neon project
Server gives no read-only or destructive hint
Our call: Creates a branch with its own read-write compute endpoint of 0.25 CU.
provision_neon_authThis tool provisions authentication for a Neon project.
Server gives no read-only or destructive hint
Our call: Sets up Neon Auth on the default branch and returns its secret server key to the model.
prepare_query_tuningThis tool helps developers improve PostgreSQL query performance for slow queries or DML statements by analyzing execution plans and suggesting optimizations.
Server gives no read-only or destructive hint
Our call: Creates a temporary branch and runs the statement there with EXPLAIN ANALYZE, so a write lands on the copy, not on main.
Only looks9 toolsLet it run. It only looks.
list_projectsLists the first 10 Neon projects in your account.
Server gives no read-only or destructive hint
Our call: Sends only GET requests to Neon's API and returns names, ids, regions and settings. In our run it returned no connection string or password.
list_organizationsLists all organizations that the current user has access to.
Server gives no read-only or destructive hint
Our call: Sends only GET requests to Neon's API and returns names, ids, regions and settings. In our run it returned no connection string or password.
list_shared_projectsLists projects that have been shared with the current user.
Server gives no read-only or destructive hint
Our call: Only lists the projects other accounts have shared with you.
describe_projectDescribes a Neon project
Server gives no read-only or destructive hint
Our call: Sends only GET requests to Neon's API and returns names, ids, regions and settings. In our run it returned no connection string or password.
describe_table_schemaDescribe the schema of a table in a Neon database
Server gives no read-only or destructive hint
Our call: Runs only catalogue queries the server writes itself, with the table name passed as a parameter, not into the SQL.
get_database_tablesGet all tables in a Neon database
Server gives no read-only or destructive hint
Our call: Runs only catalogue queries the server writes itself.
describe_branchGet a tree view of all objects in a branch, including databases, schemas, tables, views, and functions
Server gives no read-only or destructive hint
Our call: Runs only catalogue queries the server writes itself.
list_slow_queriesUse this tool to list slow queries from your Neon database.
Server gives no read-only or destructive hint
Our call: Reads pg_stat_statements with SQL the server writes itself.
list_branch_computesLists compute endpoints for a project or specific branch
Server gives no read-only or destructive hint
Our call: Sends only GET requests to Neon's API and returns names, ids, regions and settings. In our run it returned no connection string or password.
Let the reads run in Claude Code
Claude Code asks before every MCP tool it has no rule for. Added as neon, this server’s tools are named mcp__neon__<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__neon__list_projects",
"mcp__neon__list_organizations",
"mcp__neon__list_shared_projects",
"mcp__neon__describe_project",
"mcp__neon__describe_table_schema",
"mcp__neon__get_database_tables",
"mcp__neon__describe_branch",
"mcp__neon__list_slow_queries",
"mcp__neon__list_branch_computes"
]
}
}The command that adds the server:
claude mcp add neon -- npx -y @neondatabase/mcp-server-neon@0.6.5 start $NEON_API_KEY --no-analyticsSend 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__neon__(?!(list_projects|list_organizations|list_shared_projects|describe_project|describe_table_schema|get_database_tables|describe_branch|list_slow_queries|list_branch_computes)$).*",
"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.
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.15.0.tgz login once to save a key, then use this in claude_desktop_config.json or ~/.cursor/mcp.json:
{
"mcpServers": {
"neon": {
"args": [
"-y",
"https://variantgate.com/sdk/variantgate-agent-0.15.0.tgz",
"mcp-proxy",
"--name",
"neon",
"--look-only",
"list_projects,list_organizations,list_shared_projects,describe_project,describe_table_schema,get_database_tables,describe_branch,list_slow_queries,list_branch_computes",
"--",
"npx",
"-y",
"@neondatabase/mcp-server-neon@0.6.5",
"start",
"<NEON_API_KEY>",
"--no-analytics"
],
"command": "npx"
}
}
}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.15.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__neon, keeps Claude Code from asking a second time in the terminal:
claude mcp add neon -- npx -y https://variantgate.com/sdk/variantgate-agent-0.15.0.tgz mcp-proxy --name neon --look-only list_projects,list_organizations,list_shared_projects,describe_project,describe_table_schema,get_database_tables,describe_branch,list_slow_queries,list_branch_computes -- npx -y @neondatabase/mcp-server-neon@0.6.5 start $NEON_API_KEY --no-analyticsWhen the agent should write
For an agent that has to change the schema, add the server a second time under its own name, such as neon-write, so the allow rules above, written for mcp__neon__, do not cover it. Every tool of that server should ask. Read the SQL when you approve prepare_database_migration: the approval for complete_database_migration shows only an id, and that SQL is what it will run on main, against the data main holds by then.
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.