Skip to main content
Glama
MisterSandFR

Supabase MCP Server - Self-Hosted Edition

by MisterSandFR
verify_jwt_secret.ts1.6 kB
import { z } from "zod"; import { ToolContext } from "./types.js"; import type { SelfhostedSupabaseClient } from '../client/index.js'; import { Tool } from "@modelcontextprotocol/sdk/types.js"; // Input schema (none needed) const VerifyJwtInputSchema = z.object({}); type VerifyJwtInput = z.infer<typeof VerifyJwtInputSchema>; // Output schema const VerifyJwtOutputSchema = z.object({ jwt_secret_status: z.enum(['found', 'not_configured']).describe('Whether the JWT secret was provided to the server.'), jwt_secret_preview: z.string().optional().describe('A preview of the JWT secret (first few characters) if configured.'), }); // Static JSON Schema for MCP capabilities const mcpInputSchema = { type: 'object', properties: {}, required: [], }; // The tool definition export const verifyJwtSecretTool = { name: 'verify_jwt_secret', description: 'Checks if the Supabase JWT secret is configured for this server and returns a preview.', inputSchema: VerifyJwtInputSchema, mcpInputSchema: mcpInputSchema, outputSchema: VerifyJwtOutputSchema, execute: async (input: unknown, context: ToolContext) => { const client = context.selfhostedClient; const secret = client.getJwtSecret(); if (secret) { // Return only a preview for security const preview = `${secret.substring(0, Math.min(secret.length, 5))}...`; return { jwt_secret_status: 'found', jwt_secret_preview: preview, }; } return { jwt_secret_status: 'not_configured' }; }, };

Latest Blog Posts

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/MisterSandFR/Supabase-MCP-SelfHosted'

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