mirror of
https://github.com/supabase/supabase.git
synced 2026-09-08 19:08:44 +08:00
Paired with [supabase/platform#37175](https://github.com/supabase/platform/pull/37175). Deletes the hand-maintained `MCPToolScopeMappings.ts` (the map is currently 'manually extracted from the mcp controller' and drifts) and fetches the `tool → FGA permission` map from the new mgmt-api `GET /mcp-tools-permissions` endpoint, the same way it already fetches the v1/v2 OpenAPI specs. Closes AI-1016 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * MCP tool permissions are now fetched dynamically from the management API and included in API permission mappings. * Permission data is validated before being applied. * **Bug Fixes** * Improved handling of invalid responses and request failures from the MCP permissions service. * Removed outdated bundled permission mappings, keeping access controls aligned with current configuration. * Updated permission mapping coverage to include both current API specifications and MCP tools. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: Gildas Garcia <1122076+djhi@users.noreply.github.com>