Skip to main content
Glama

Self-Hosted Supabase MCP Server

by abushadab
get_anon_key.ts1.04 kB
import { z } from 'zod'; import type { SelfhostedSupabaseClient } from '../client/index.js'; import type { ToolContext } from './types.js'; // Input schema (none needed) const GetAnonKeyInputSchema = z.object({}); type GetAnonKeyInput = z.infer<typeof GetAnonKeyInputSchema>; // Output schema const GetAnonKeyOutputSchema = z.object({ anon_key: z.string(), }); // Static JSON Schema for MCP capabilities const mcpInputSchema = { type: 'object', properties: {}, required: [], }; // The tool definition export const getAnonKeyTool = { name: 'get_anon_key', description: 'Returns the configured Supabase anon key for this server.', inputSchema: GetAnonKeyInputSchema, mcpInputSchema: mcpInputSchema, outputSchema: GetAnonKeyOutputSchema, execute: async (input: GetAnonKeyInput, context: ToolContext) => { const client = context.selfhostedClient; const key = client.getAnonKey(); // Use getter from client return { anon_key: key }; }, };

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/abushadab/selfhosted-supabase-mcp-basic-auth'

If you have feedback or need assistance with the MCP directory API, please join our Discord server