get_service_key
Retrieve the Supabase service role key from the Self-Hosted MCP Server to enable secure access and management of Supabase features and database interactions.
Instructions
Returns the configured Supabase service role key for this server, if available.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/get_service_key.ts:29-36 (handler)The execute handler function for the 'get_service_key' tool. It retrieves the Supabase service role key from the SelfhostedSupabaseClient context if available, returning status and key or just 'not_configured'.execute: async (input: GetServiceKeyInput, context: ToolContext) => { const client = context.selfhostedClient; const key = client.getServiceRoleKey(); if (key) { return { service_key_status: 'found', service_key: key }; } return { service_key_status: 'not_configured' }; },
- src/tools/get_service_key.ts:5-14 (schema)Zod schemas defining the input (empty object) and output structure for the get_service_key tool, including service_key_status and optional service_key.// Input schema (none needed) const GetServiceKeyInputSchema = z.object({}); type GetServiceKeyInput = z.infer<typeof GetServiceKeyInputSchema>; // Output schema const GetServiceKeyOutputSchema = z.object({ service_key_status: z.enum(['found', 'not_configured']).describe('Whether the service key was provided to the server.'), service_key: z.string().optional().describe('The configured Supabase service role key (if configured).'), });
- src/index.ts:109-109 (registration)Registration of the getServiceKeyTool in the availableTools object, which is used to populate the MCP server's tool capabilities and request handlers.[getServiceKeyTool.name]: getServiceKeyTool as AppTool,
- src/index.ts:20-20 (registration)Import statement for the getServiceKeyTool from its implementation file.import { getServiceKeyTool } from './tools/get_service_key.js';