diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index ab0929ae..bb327242 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -1235,7 +1235,7 @@ async function getAvailablePort(): Promise { } export const ACCESS_TOKEN = 'eval-token'; -export const MCP_SERVER_VERSION = '0.8.1'; +export const MCP_SERVER_VERSION = '0.11.0'; // Well-formed but inert PAT used when a Supabase MCP server is docs-only: the // server requires a token to boot but never authenticates without a platform. const THROWAWAY_ACCESS_TOKEN = `sbp_${'0'.repeat(40)}`; diff --git a/packages/platform-lite/package.json b/packages/platform-lite/package.json index 988b5a21..441a7782 100644 --- a/packages/platform-lite/package.json +++ b/packages/platform-lite/package.json @@ -28,7 +28,7 @@ "zod": "catalog:" }, "devDependencies": { - "@supabase/mcp-server-supabase": "^0.8.1", + "@supabase/mcp-server-supabase": "^0.11.0", "@types/node": "catalog:", "openapi-typescript": "^7.8.0", "tsx": "^4.21.0", diff --git a/packages/platform-lite/src/project/log-seeding.ts b/packages/platform-lite/src/project/log-seeding.ts index 6ad584f8..e28039f7 100644 --- a/packages/platform-lite/src/project/log-seeding.ts +++ b/packages/platform-lite/src/project/log-seeding.ts @@ -122,15 +122,14 @@ CREATE TABLE IF NOT EXISTS storage_logs ( -- -- Provenance (hand-modeled; nothing usable is importable): -- * The 'logs' relation shape is the hosted platform's Logflare/ClickHouse --- contract. Hosted serves the /analytics/endpoints/logs route today; the --- capabilities are landing per-PR (both in review as of 2026-07-21): +-- contract. Hosted serves the /analytics/endpoints/logs route today; both +-- capability PRs have landed: -- - supabase/platform#35096: logs.all.otel unified stream + ClickHouse -- dialect for the getLogs PRESETS - what mcp main (post-#326) emits. -- - supabase/platform#35970: custom-SQL passthrough (timestamps --- normalized platform-side) - what mcp#333's query_logs (still open) --- targets; current mcp main does not depend on it. --- The fixture models both current main and the #333 validation branch --- against that contract. It is +-- normalized platform-side) - what mcp#333's query_logs (shipped in +-- mcp 0.10.0) targets. +-- The fixture models both against that contract. It is -- platform-internal either way: no npm package exports the schema, so -- fixtures must model it by hand, exactly like every other platform-lite -- emulation in this package. @@ -138,8 +137,9 @@ CREATE TABLE IF NOT EXISTS storage_logs ( -- preset SQL and the query_logs sql description - not exported as data. -- (mcp's /platform entrypoint DOES export logsServiceSchema, but that -- enumerates service PRESETS, a different namespace; and the resolved --- package (^0.8.1) can drift ahead of the MCP_SERVER_VERSION pin the --- harness actually runs, so importing it would track the wrong artifact.) +-- package's devDependency range can drift ahead of the MCP_SERVER_VERSION +-- pin the harness actually runs, so importing it would track the wrong +-- artifact.) -- Resync this view when the pinned MCP_SERVER_VERSION moves. -- * UNMODELED preset sources: workflow_run_logs (branch-action) and -- realtime_logs (realtime) have no backing table in platform-lite. diff --git a/packages/platform-lite/test/clickhouse-logs.test.ts b/packages/platform-lite/test/clickhouse-logs.test.ts index 7b388a63..3975181f 100644 --- a/packages/platform-lite/test/clickhouse-logs.test.ts +++ b/packages/platform-lite/test/clickhouse-logs.test.ts @@ -193,11 +193,12 @@ limit 100` ).rejects.toThrow(/unknown log seed source/i); }); - // verbatim from mcp 0.9.0 getClickHouseLogQuery('edge-function-runtime'), - // limit interpolated to 100. This preset is why function_logs must stay - // queryable: the pin (0.8.1) predates it, 0.9.0 ships it, and rejecting the - // source would turn it into a hard error the moment the pin moves. - it('runs the mcp 0.9.0 edge-function-runtime preset against its own rows', async () => { + // verbatim from getClickHouseLogQuery('edge-function-runtime'), limit + // interpolated to 100: + // https://github.com/supabase/mcp/blob/c2826ee85a66d4fd6d4ccfa5086ec823d4a9fc88/packages/mcp-server-supabase/src/logs.ts#L41-L48 + // This preset is why function_logs must stay queryable: the pinned server + // ships it, so rejecting the source would be a hard error on every run. + it('runs the edge-function-runtime preset against its own rows', async () => { const result = await logsDb.query<{ function_id: string; level: string; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6e34baa1..6e059ea2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -344,8 +344,8 @@ importers: version: 4.4.3 devDependencies: '@supabase/mcp-server-supabase': - specifier: ^0.8.1 - version: 0.8.2(@modelcontextprotocol/sdk@1.29.0(zod@4.4.3))(zod@4.4.3) + specifier: ^0.11.0 + version: 0.11.0(@modelcontextprotocol/server@2.0.0)(zod@4.4.3) '@types/node': specifier: 'catalog:' version: 22.19.20 @@ -1091,6 +1091,10 @@ packages: '@mjackson/multipart-parser@0.10.1': resolution: {integrity: sha512-cHMD6+ErH/DrEfC0N6Ru/+1eAdavxdV0C35PzSb5/SD7z3XoaDMc16xPJcb8CahWjSpqHY+Too9sAb6/UNuq7A==} + '@modelcontextprotocol/core@2.0.0': + resolution: {integrity: sha512-pJCEwGG7Lfr/+PQp9ZTwKXNeO5wzbfKL7H3MYpCorM4oFBoQrdjnBgEoqG+RjhsvS1FKrDbKux+M1HhlnGWqcA==} + engines: {node: '>=20'} + '@modelcontextprotocol/sdk@1.29.0': resolution: {integrity: sha512-zo37mZA9hJWpULgkRpowewez1y6ML5GsXJPY8FI0tBBCd77HEvza4jDqRKOXgHNn867PVGCyTdzqpz0izu5ZjQ==} engines: {node: '>=18'} @@ -1101,6 +1105,10 @@ packages: '@cfworker/json-schema': optional: true + '@modelcontextprotocol/server@2.0.0': + resolution: {integrity: sha512-YhHWdHfpFMQfd0prsEnxKeS3Qz3ytIGmsS0sth4KDjnacIT7hxk6hXHkJ9KysxlkvTM+WZAtQbbcUhdoP4Hvtw==} + engines: {node: '>=20'} + '@noble/ciphers@1.3.0': resolution: {integrity: sha512-2I0gnIVPtfnMw9ee9h1dJG7tp81+8Ob3OJb3Mv37rx5L40/b0i7djjCVvGOVqc9AEIQyvyu1i6ypKdFw8R8gQw==} engines: {node: ^14.21.3 || >=16} @@ -2116,17 +2124,17 @@ packages: vite: optional: true - '@supabase/mcp-server-supabase@0.8.2': - resolution: {integrity: sha512-9NqyaI70EC545ULvzpLfSSN6gWsSuIdROD29TyA4qztDX+qmoiHC5on+pqWO/1vPnqnL8mq8P2OU8NXyl6irOg==} + '@supabase/mcp-server-supabase@0.11.0': + resolution: {integrity: sha512-++eAgAmq3SAnj3nf2Ic0i2Si9oFmTn9ppEJOioABf7+DZ/w3blPuxLlSTSBZV5+Sf1SdueMpTvYvkKJh0zx+/Q==} hasBin: true peerDependencies: - '@modelcontextprotocol/sdk': ^1.25.2 + '@modelcontextprotocol/server': ^2.0.0 zod: ^3.25.0 || ^4.0.0 - '@supabase/mcp-utils@0.5.1': - resolution: {integrity: sha512-UIIL0IkG5XvW2TikYkn3PtmLtgHWUJamoivrOwVYzaAwg6A492zt0udNeNVRh34Pc5TCqqSLGfGygSushE2xJg==} + '@supabase/mcp-utils@0.7.0': + resolution: {integrity: sha512-PDTPOn/0AEPWwAXc8I98wruYucGwNLCAfiCu0eZS1mE+E/e0xZhdSY3nfE2n+sh8p5aaep5Kqd9Wt0rThAKgdQ==} peerDependencies: - '@modelcontextprotocol/sdk': ^1.25.2 + '@modelcontextprotocol/server': ^2.0.0 zod: ^3.25.0 || ^4.0.0 '@supabase/pg-delta@1.0.0-alpha.10': @@ -5271,6 +5279,10 @@ snapshots: dependencies: '@mjackson/headers': 0.11.1 + '@modelcontextprotocol/core@2.0.0': + dependencies: + zod: 4.4.3 + '@modelcontextprotocol/sdk@1.29.0(zod@3.25.76)': dependencies: '@hono/node-server': 1.19.14(hono@4.13.0) @@ -5293,27 +5305,10 @@ snapshots: transitivePeerDependencies: - supports-color - '@modelcontextprotocol/sdk@1.29.0(zod@4.4.3)': + '@modelcontextprotocol/server@2.0.0': dependencies: - '@hono/node-server': 1.19.14(hono@4.13.0) - ajv: 8.20.0 - ajv-formats: 3.0.1(ajv@8.20.0) - content-type: 1.0.5 - cors: 2.8.6 - cross-spawn: 7.0.6 - eventsource: 3.0.7 - eventsource-parser: 3.1.0 - express: 5.2.1 - express-rate-limit: 8.5.2(express@5.2.1) - hono: 4.13.0 - jose: 6.2.3 - json-schema-typed: 8.0.2 - pkce-challenge: 5.0.1 - raw-body: 3.0.2 + '@modelcontextprotocol/core': 2.0.0 zod: 4.4.3 - zod-to-json-schema: 3.25.2(zod@4.4.3) - transitivePeerDependencies: - - supports-color '@noble/ciphers@1.3.0': {} @@ -6340,20 +6335,20 @@ snapshots: - pg-native - supports-color - '@supabase/mcp-server-supabase@0.8.2(@modelcontextprotocol/sdk@1.29.0(zod@4.4.3))(zod@4.4.3)': + '@supabase/mcp-server-supabase@0.11.0(@modelcontextprotocol/server@2.0.0)(zod@4.4.3)': dependencies: '@mjackson/multipart-parser': 0.10.1 - '@modelcontextprotocol/sdk': 1.29.0(zod@4.4.3) - '@supabase/mcp-utils': 0.5.1(@modelcontextprotocol/sdk@1.29.0(zod@4.4.3))(zod@4.4.3) + '@modelcontextprotocol/server': 2.0.0 + '@supabase/mcp-utils': 0.7.0(@modelcontextprotocol/server@2.0.0)(zod@4.4.3) common-tags: 1.8.2 gqlmin: 0.3.2 graphql: 16.14.2 openapi-fetch: 0.13.8 zod: 4.4.3 - '@supabase/mcp-utils@0.5.1(@modelcontextprotocol/sdk@1.29.0(zod@4.4.3))(zod@4.4.3)': + '@supabase/mcp-utils@0.7.0(@modelcontextprotocol/server@2.0.0)(zod@4.4.3)': dependencies: - '@modelcontextprotocol/sdk': 1.29.0(zod@4.4.3) + '@modelcontextprotocol/server': 2.0.0 zod: 4.4.3 '@supabase/pg-delta@1.0.0-alpha.10': @@ -8817,10 +8812,6 @@ snapshots: dependencies: zod: 3.25.76 - zod-to-json-schema@3.25.2(zod@4.4.3): - dependencies: - zod: 4.4.3 - zod-validation-error@4.0.2(zod@4.4.3): dependencies: zod: 4.4.3