Skip to content

Commit 8f69a32

Browse files
authored
Merge pull request #114 from diksipav/112-exclude-mutating-tools-in-read-mode
Disable mutating tools in read-only mode
2 parents c39cac2 + d04931e commit 8f69a32

File tree

8 files changed

+442
-10
lines changed

8 files changed

+442
-10
lines changed

README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Replace `<personal-access-token>` with the token you created in step 1. Alternat
5151

5252
The following options are available:
5353

54-
- `--read-only`: Used to restrict the server to read-only queries. Recommended by default. See [read-only mode](#read-only-mode).
54+
- `--read-only`: Used to restrict the server to read-only queries and tools. Recommended by default. See [read-only mode](#read-only-mode).
5555
- `--project-ref`: Used to scope the server to a specific project. Recommended by default. If you omit this, the server will have access to all projects in your Supabase account. See [project scoped mode](#project-scoped-mode).
5656
- `--features`: Used to specify which tool groups to enable. See [feature groups](#feature-groups).
5757

@@ -150,7 +150,18 @@ To restrict the Supabase MCP server to read-only queries, set the `--read-only`
150150
npx -y @supabase/mcp-server-supabase@latest --read-only
151151
```
152152

153-
We recommend you enable this by default. This prevents write operations on any of your databases by executing SQL as a read-only Postgres user. Note that this flag only applies to database tools (`execute_sql` and `apply_migration`) and not to other tools like `create_project` or `create_branch`.
153+
We recommend enabling this setting by default. This prevents write operations on any of your databases by executing SQL as a read-only Postgres user (via `execute_sql`). All other mutating tools are disabled in read-only mode, including:
154+
`apply_migration`
155+
`create_project`
156+
`pause_project`
157+
`restore_project`
158+
`deploy_edge_function`
159+
`create_branch`
160+
`delete_branch`
161+
`merge_branch`
162+
`reset_branch`
163+
`rebase_branch`
164+
`update_storage_config`.
154165

155166
### Feature groups
156167

0 commit comments

Comments
 (0)