Skip to content

Commit 1977bb7

Browse files
committed
feat: conditional tools based on platform implementation
1 parent 2a8cc28 commit 1977bb7

16 files changed

+449
-330
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,9 @@ You can enable or disable specific tool groups by passing the `--features` flag
156156
npx -y @supabase/mcp-server-supabase@latest --features=database,docs
157157
```
158158

159-
Available groups are: [`account`](#account), [`docs`](#knowledge-base), [`database`](#database), [`debug`](#debug), [`development`](#development), [`functions`](#edge-functions), [`storage`](#storage), and [`branching`](#branching-experimental-requires-a-paid-plan).
159+
Available groups are: [`account`](#account), [`docs`](#knowledge-base), [`database`](#database), [`debugging`](#debugging), [`development`](#development), [`functions`](#edge-functions), [`storage`](#storage), and [`branching`](#branching-experimental-requires-a-paid-plan).
160160

161-
If this flag is not passed, the default feature groups are: `account`, `database`, `debug`, `development`, `docs`, `functions`, and `branching`.
161+
If this flag is not passed, the default feature groups are: `account`, `database`, `debugging`, `development`, `docs`, `functions`, and `branching`.
162162

163163
## Tools
164164

@@ -198,9 +198,9 @@ Enabled by default. Use `database` to target this group of tools with the [`--fe
198198
- `apply_migration`: Applies a SQL migration to the database. SQL passed to this tool will be tracked within the database, so LLMs should use this for DDL operations (schema changes).
199199
- `execute_sql`: Executes raw SQL in the database. LLMs should use this for regular queries that don't change the schema.
200200

201-
#### Debug
201+
#### Debugging
202202

203-
Enabled by default. Use `debug` to target this group of tools with the [`--features`](#feature-groups) option.
203+
Enabled by default. Use `debugging` to target this group of tools with the [`--features`](#feature-groups) option.
204204

205205
- `get_logs`: Gets logs for a Supabase project by service type (api, postgres, edge functions, auth, storage, realtime). LLMs can use this to help with debugging and monitoring service performance.
206206
- `get_advisors`: Gets a list of advisory notices for a Supabase project. LLMs can use this to check for security vulnerabilities or performance issues.

packages/mcp-server-supabase/src/index.test.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
MCP_CLIENT_NAME,
88
MCP_CLIENT_VERSION,
99
} from '../test/mocks.js';
10-
import { createSupabaseMcpServer } from './index.js';
10+
import { createSupabaseApiPlatform, createSupabaseMcpServer } from './index.js';
1111

1212
type SetupOptions = {
1313
accessToken?: string;
@@ -34,11 +34,13 @@ async function setup(options: SetupOptions = {}) {
3434
}
3535
);
3636

37+
const platform = createSupabaseApiPlatform({
38+
apiUrl: API_URL,
39+
accessToken,
40+
});
41+
3742
const server = createSupabaseMcpServer({
38-
platform: {
39-
apiUrl: API_URL,
40-
accessToken,
41-
},
43+
platform,
4244
projectId,
4345
readOnly,
4446
features,

0 commit comments

Comments
 (0)