Skip to content

Commit 0981afd

Browse files
committed
docs: project scoped mode
1 parent 518de9e commit 0981afd

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ Next, configure your MCP client (such as Cursor) to use this server. Most MCP cl
4646

4747
Replace `<personal-access-token>` with the token you created in step 1. Alternatively you can omit `--access-token` and instead set the `SUPABASE_ACCESS_TOKEN` environment variable to your personal access token (you will need to restart your MCP client after setting this). This allows you to keep your token out of version control if you plan on committing this configuration to a repository.
4848

49+
The following additional options are available:
50+
51+
- `--project-ref`: Used to scope the server to a specific project. See [project scoped mode](#project-scoped-mode).
52+
- `--read-only`: Used to restrict the server to read-only queries. See [read-only mode](#read-only-mode).
53+
4954
If you are on Windows, you will need to [prefix the command](#windows). If your MCP client doesn't accept JSON, the direct CLI command is:
5055

5156
```shell
@@ -111,6 +116,18 @@ Make sure Node.js is available in your system `PATH` environment variable. If yo
111116

112117
3. Restart your MCP client.
113118

119+
### Project scoped mode
120+
121+
By default, the MCP server will have access to all organizations and projects in your Supabase account. If you want to restrict the server to a specific project, you can set the `--project-ref` flag on the CLI command:
122+
123+
```shell
124+
npx -y @supabase/mcp-server-supabase@latest --access-token=<personal-access-token> --project-ref=<project-ref>
125+
```
126+
127+
Replace `<project-ref>` with the ID of your project. You can find this under **Project ID** in your Supabase [project settings](https://supabase.com/dashboard/project/_/settings/general).
128+
129+
After scoping the server to a project, [account-level](#project-management) tools like `list_projects` and `list_organizations` will no longer be available. The server will only have access to the specified project and its resources.
130+
114131
### Read-only mode
115132

116133
If you wish to restrict the Supabase MCP server to read-only queries, set the `--read-only` flag on the CLI command:
@@ -129,6 +146,8 @@ The following Supabase tools are available to the LLM:
129146

130147
#### Project Management
131148

149+
_**Note:** these tools will be unavailable if the server is [scoped to a project](#project-scoped-mode)._
150+
132151
- `list_projects`: Lists all Supabase projects for the user.
133152
- `get_project`: Gets details for a project.
134153
- `create_project`: Creates a new Supabase project.

0 commit comments

Comments
 (0)