MCP server read-only modes, tested: what got through on twenty-six servers
We ran the read-only modes of twenty-six MCP servers, from Postgres, MySQL, MongoDB and Neo4j to AWS, GitLab, Stripe, Sentry and Docker. One held completely; the others let through secrets, a deleted row, an Atlas access-list entry or a run that can apply. What holds instead, and how to test your own.
· 7 min read
Most popular MCP servers have a switch that is meant to make them safe to leave running: --read-only, --readOnly, --disable-write, READ_OPERATIONS_ONLY. We ran twenty-six servers, most of them against a local database, a local Grafana, the local Docker engine or a stand-in for the cloud API, and called the tools each mode keeps with the arguments a model could choose; for Supabase and the filesystem server we compared what each mode lists. Only the filesystem server’s held completely. Six more keep writes out, Supabase’s by design, but still hand over whatever their credentials can read, a cluster token included. The other nineteen let something through: a secret, a deleted row, a new entry in a cloud access list, a run that can apply, two writes that stay, a database taken offline, a new database user, or, for twelve of them, no switch at all.
The pattern repeats. A read-only mode takes away what is labelled a write, whether that is a tool, a kind of statement or an IAM access level, and keeps everything labelled a read. But the label describes the usual call, not every argument the tool accepts.
Twenty-six servers, and what got past their switches
| Option | Switch | What it stopped | What still got through | Holds? |
|---|---|---|---|---|
| Filesystem 2.4.0 | Switch--read-only | What it stoppedLists only the 10 tools the server marks read-only; the write tools are gone. | What still got throughNothing we found. Reads still reach every file in the folders it was given. | Holds?Holds |
| Postgres MCP Pro 0.3.0 | Switch--access-mode=restricted | What it stoppedEvery write we tried, including a COMMIT to escape its read-only transaction, and EXPLAIN ANALYZE. | What still got throughpg_read_file returned /etc/passwd, because we had signed in as a superuser. | Holds?Holds for writes; reads are up to the role |
| Supabase 0.19.0 | Switch--read-only | What it stopped14 of its 36 tools. By design, the server sends each query with Supabase's read-only flag set; we did not run a write against a project. | What still got throughexecute_sql and run_notebook stay, and read every row the connection can. | Holds?Holds for writes; reads are up to the connection |
| Atlassian (mcp-atlassian) 0.24.8 | SwitchREAD_ONLY_MODE=true | What it stoppedAll 40 tools tagged as writes. Called by name, they came back as unknown tools and nothing reached Jira or Confluence. | What still got throughReads see whatever the token’s user sees, email addresses included, and jira_get_issue still updates that user’s view history. | Holds?Holds for writes; reads are up to the token |
| Kubernetes 0.1.3 | Switchread_only = true | What it stoppedThe tools that change the cluster, pods_run among them. | What still got throughconfiguration_view, on by default and kept by read_only, returned the kubeconfig with its token in plain text. | Holds?Holds for the cluster, not for its credential |
| MongoDB 3.3.0 | Switch--readOnly | What it stoppedThe write tools, and $out or $merge stages in aggregate and export. | What still got throughatlas-connect-cluster added this machine’s address to the Atlas access list with no expiry, and created a database user. | Holds?Not for Atlas |
| AWS API 1.6.1 | SwitchREAD_OPERATIONS_ONLY=true | What it stoppedWhatever IAM calls a Write, such as iam create-access-key and lambda invoke, plus s3 cp and the STS calls its own list marks as writes. | What still got throughA Secrets Manager secret, decrypted SSM parameters, Lambda environment variables and registry tokens. s3api get-object overwrote a local file. | Holds?No: a read can be a secret |
| Sentry 0.50.0 | Switch--skills inspect | What it stopped24 of its 74 default tools, every triage and project tool among them; update_issue then came back as not found. | What still got throughEvent reads returned a password from local variables and one in a breadcrumb URL. Two writes stay: onboarding_status_update and the tool that sends feedback to Sentry. An uptime monitor’s X-Token and Private-Token header values came back in full, and so did an api_key in a monitor’s URL. | Holds?No: two writes stay |
| Grafana 2.3.0 | Switch--disable-write | What it stopped17 of its 80 default tools, and grafana_api_request may only send GET. | What still got throughrun_panel_query ran a DELETE through a dashboard variable with a Viewer token. An Admin GET returned webhook secrets decrypted. | Holds?No |
| Terraform 1.4.1 | SwitchENABLE_TF_OPERATIONS off, the default | What it stoppedFive operation tools, and destroy or auto-approve run types. | What still got throughupdate_workspace and create_run stay: they sent the requests to turn on auto-apply and start a run. | Holds?No |
| MySQL (@benborla29/mcp-server-mysql) 2.0.9 | SwitchALLOW_*_OPERATION off, the default | What it stoppedDELETE, two statements in one call, versioned comments, CALL, REPLACE, LOAD DATA, GRANT, RENAME and TRUNCATE. | What still got throughSigned in as root: SET GLOBAL offline_mode = 1 locked other users out, SET PERSIST was saved to mysqld-auto.cnf, INTO OUTFILE wrote a file, and mysql.user gave up its password hashes. With inserts on, a DELETE inside a /*!50000 */ comment ran. | Holds?No: a parser's guess |
| Neo4j (mcp-neo4j-cypher) 0.6.0 | Switch--read-only | What it stoppedwrite_neo4j_cypher is gone, and every data write we sent the read tool was refused. | What still got throughThrough read_neo4j_cypher: CREATE USER, another user’s new password, CREATE INDEX, DROP CONSTRAINT, ending another session’s query, and a LOAD CSV that sent an API key to a server we ran. | Holds?No: schema and user commands pass as reads |
| Qdrant (mcp-server-qdrant) 0.8.1 | SwitchQDRANT_READ_ONLY=true | What it stoppedqdrant-store is gone; calling it gave “Unknown tool”. | What still got throughqdrant-find still read every collection on the cluster, another app’s included, unless COLLECTION_NAME was set. | Holds?Holds for writes; reads are up to the key |
| GitLab (@zereight/mcp-gitlab) 2.3.31 | SwitchGITLAB_PERMISSION_MODE=readonly | What it stoppedEvery write tool called by name, downloads to disk, GraphQL mutations, and anything but GET through gitlab_api_request. | What still got throughThe agent turned on the variables toolset itself and read a CI/CD deploy token in full; webhook URLs, job logs, and other projects’ issues and code unless ENABLE_STRICT_PROJECT_SCOPE was on. | Holds?Holds for writes, not for secrets |
| Redis 0.5.1 | SwitchNone | What it stoppedNothing. The Redis user's ACL is the only limit. | What still got throughEvery tool, including the ones that delete whole keys. | Holds?There is no switch |
| Docker (mcp-server-docker) 0.3.0 | SwitchNone | What it stoppedNothing. Whatever can reach the Docker socket is the limit. | What still got throughEvery tool. run_container mounted a host folder and wrote into it from inside the container. | Holds?There is no switch |
| Desktop Commander 0.3.4 | SwitchNone; allowedDirectories and blockedCommands come closest | What it stoppedFile tools outside the allowed folder, and blocked commands spelled as /usr/bin/x, sh -c, env or eval. | What still got throughstart_process wrote outside the allowed folder, and the model lifted both limits itself with set_config_value. | Holds?There is no switch |
| Stripe (@stripe/mcp) 0.3.4 | SwitchNone; the old --tools flag is ignored | What it stoppedNothing. The API key or OAuth grant is the only limit. | What still got throughEvery tool our stand-in for the hosted server offered. --tools=balance.read printed a warning, then passed on the write tool too. | Holds?There is no switch |
| Resend (resend-mcp) 2.29.0 | SwitchNone; --allowed-file-dirs limits attachments only | What it stoppedAttachments from outside the allowed folder. An empty value lets every file through. | What still got throughget-webhook, marked read-only, returned the signing secret, and create-api-key returned the new key’s token in full. | Holds?There is no switch |
| Neon 0.6.5 (local) | SwitchNone | What it stoppedNothing. Every SQL tool signs in as the database owner. The hosted server has a readonly option we did not run. | What still got throughEvery tool. explain_sql_statement, with analyze on by default, deleted a row. | Holds?There is no switch |
| Twilio (@twilio-alpha/mcp) 0.7.0 | SwitchNone; --services and --tags pick whole resources | What it stoppedNothing. Each tag loads its resource's deletes too. | What still got throughEvery tool. A fetch tool given ../../AC… as its Sid reached the account record. | Holds?There is no switch |
| SQLite (mcp-server-sqlite) 2025.4.25 | SwitchNone | What it stoppedNothing. read_query refuses anything but one SELECT. | What still got throughwrite_query runs anything but a SELECT: DROP TABLE, and VACUUM INTO a copy in another folder, which still worked with the database file set read-only. | Holds?There is no switch |
| Elasticsearch (Elastic's server) 0.4.6 | SwitchNone; tools.exclude is read and ignored | What it stoppedNo tool writes. A key with read on named indices and no cluster privileges refused everything else we tried. | What still got throughA key made by the elastic user read every API key’s hash from .security-7. With monitor_enrich, an ES|QL ENRICH read salaries from an index the key could not search. | Holds?There is no switch |
| Azure DevOps (Microsoft's server) 2.11.0 | SwitchNone; the nearest is -d domains | What it stoppedOnly the tools of domains left out. | What still got throughEvery write in the domains chosen, a merge sent with bypassPolicy included; a misspelt domain served all 44 tools. | Holds?There is no switch |
| Firecrawl (firecrawl-mcp) 3.41.0 | SwitchNone over stdio; CLOUD_SERVICE=true safe mode is HTTP only | What it stoppedIn safe mode only: scrape actions, crawl webhooks, and parse reading local files. | What still got throughfirecrawl_interact clicks and forms, monitor emails and webhooks, and paid agent runs; firecrawl_parse uploaded a local .env. | Holds?There is no switch |
| HubSpot (@hubspot/mcp-server) 0.4.0 | SwitchNone; only the key's scopes | What it stoppedNothing at the server: all 21 tools are listed. | What still got throughA read tool sent a batch archive of contacts when the model put contacts/batch/archive# in its object type. | Holds?There is no switch |
Every server’s page has all its tools, how we ran it and the exact calls: Filesystem 2.4.0, Postgres MCP Pro 0.3.0, Supabase 0.19.0, Atlassian (mcp-atlassian) 0.24.8, Kubernetes 0.1.3, MongoDB 3.3.0, AWS API 1.6.1, Sentry 0.50.0, Grafana 2.3.0, Terraform 1.4.1, MySQL (@benborla29/mcp-server-mysql) 2.0.9, Neo4j (mcp-neo4j-cypher) 0.6.0, Qdrant (mcp-server-qdrant) 0.8.1, GitLab (@zereight/mcp-gitlab) 2.3.31, Redis 0.5.1, Docker (mcp-server-docker) 0.3.0, Desktop Commander 0.3.4, Stripe (@stripe/mcp) 0.3.4, Resend (resend-mcp) 2.29.0, Neon 0.6.5 (local), Twilio (@twilio-alpha/mcp) 0.7.0, SQLite (mcp-server-sqlite) 2025.4.25, Elasticsearch (Elastic's server) 0.4.6, Azure DevOps (Microsoft's server) 2.11.0, Firecrawl (firecrawl-mcp) 3.41.0, HubSpot (@hubspot/mcp-server) 0.4.0.
Four ways a read gets through
- The read is a secret. AWS’s server counts anything IAM does not call a Write as a read, and
secretsmanager get-secret-valueis a Read in IAM. The Kubernetes server’sconfiguration_viewis a read of your kubeconfig, token included. Resend’sget-webhookis marked read-only and returned the webhook’s signing secret. A read-only mode is about changing things, not about what the model gets to see. - The read takes a query. Grafana’s
run_panel_queryruns a saved panel with variables the caller picks; a variable of3; DELETE FROM orders WHERE id = 3went into the SQL and the row was gone. Postgres MCP Pro’sexplain_querydeleted a row too, in its unrestricted mode: with analyze on,EXPLAIN ANALYZEruns theDELETEit explains. Neon’sexplain_sql_statementturns analyze on unless the caller turns it off, so asking it to explain aDELETEdeleted the row. - The read takes a file name. Playwright’s
browser_snapshotand five other tools it marks read-only save to a file you name. We gave each of the six the name of a file that already existed, and each replaced it. The AWS server’ss3api get-objectdid the same in its working folder. - The read changes something else. MongoDB’s
atlas-connect-clusterleaves your data alone but opens the Atlas access list and makes a user to connect with. Redis’sxreadgroupreads a stream by claiming its jobs, so the worker that should have done them gets nothing.
The hints are labels, not limits
MCP lets a server mark each tool with readOnlyHint and destructiveHint, and clients use them to decide what to ask about. The specification says they are not guaranteed to describe a tool faithfully, and that clients should never decide on tool use from the hints of a server they do not trust. What we saw bears that out. Playwright, Kubernetes, Grafana, MongoDB and MySQL each mark a tool read-only that wrote, deleted or handed over a credential for us. Notion’s server marks its search as destructive, because the hint follows the HTTP method and Notion searches with a POST. PayPal’s, Redis’s, Postgres MCP Pro’s, Neon’s, Twilio’s and SQLite’s servers give no hints at all, so by the specification’s defaults a client that trusts hints treats every tool as a possibly destructive write.
What held
The switch that held completely, the filesystem server’s --read-only, is the one where the server itself is the only thing between the model and the resource. Everywhere else, what does the work is the credential the server signs in with. We saw it hold for a Redis ACL user and a MongoDB user with the read role; the rest is what each system’s own permissions and the servers’ docs point to:
- A database role that can only
SELECTthe tables it needs, so the database refuses aDELETEwhichever tool sends it. In Grafana that means the datasource’s database user, because a Viewer token did not stop the SQL. - An IAM role with an explicit deny on the calls that return secrets, and Kubernetes RBAC with nothing on Secrets and no kubeconfig in reach.
- A Redis ACL user such as
-@all +@read -@dangerous ~app:*; with it Redis refused every write we tried, fromsetanddeletetoxreadgroup. For MongoDB, a user with thereadrole refusedinsert-manyfor us. - An Atlas service account that cannot change the access list or users, if the MongoDB server gets Atlas credentials at all. We could not check that against real Atlas.
- For Stripe, a restricted key or agent key with only the permissions the agent needs, since the npm package no longer narrows the tools. We used no Stripe key, so we could not check what the hosted server does with one.
Then keep the switch on as a second layer, and make the tools that can still do harm ask a person. Each server page lists Claude Code allow rules for the tools that only read and a hook for the rest, so a run_panel_query or get-secret-value waits for someone to read the arguments first.
Test a read-only mode yourself
Three questions narrow down where to look, using the MCP Inspector’s command line and jq. Swap in your server’s command and its read-only flag; for a switch that is an environment variable, pass it with the Inspector’s -e KEY=value.
# 1. What does each mode offer? Save both lists and compare.
npx -y @modelcontextprotocol/inspector@2.13.0 --cli \
npx -y your-mcp-server --method tools/list > default.json
npx -y @modelcontextprotocol/inspector@2.13.0 --cli \
npx -y your-mcp-server --read-only --method tools/list > read-only.json
diff <(jq -r '.tools[].name' default.json) <(jq -r '.tools[].name' read-only.json)
# 2. Which tools does the read-only mode keep that it does not call reads?
jq -r '.tools[] | select(.annotations.readOnlyHint != true) | .name' read-only.json
# 3. What does each kept tool take? Look for paths, queries, URLs, variables.
jq -r '.tools[] | .name + ": " + ((.inputSchema.properties // {}) | keys | join(", "))' read-only.jsonThen call the tools it keeps against a test resource, starting with those from the second and third lists, with the riskiest arguments it takes: a file that already exists, a query with a second statement, a variable with a semicolon. Read what comes back from every kept tool, too, even those with no arguments, and look for anything you would not paste into a chat: that is how the kubeconfig token showed up. Our tool risk checker sorts a tools/list answer the same cautious way the server pages do.
These are the versions we ran in November 2026. Servers change their modes between releases, so run the three checks again after an upgrade.
Sources
Give your agents somewhere to ask.
Free for 100 requests a month. Sign in with your email and have a first request waiting a few minutes from now.
Start free