Skip to main content
Glama
HenkDz

Self-Hosted Supabase MCP Server

verify_jwt_secret

Validate the JWT secret configuration for self-hosted Supabase instances, ensuring secure authentication and returning a preview of the setup.

Instructions

Checks if the Supabase JWT secret is configured for this server and returns a preview.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The execute function implements the core tool logic: fetches the JWT secret using the client and returns its status ('found' or 'not_configured') with a secure preview if available.
    execute: async (input: VerifyJwtInput, 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' }; },
  • Zod schemas for tool input (empty object), output (status and preview), and static MCP JSON input schema (empty object).
    // 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: [], };
  • src/index.ts:23-23 (registration)
    Import statement bringing the verifyJwtSecretTool into the main index file.
    import { verifyJwtSecretTool } from './tools/verify_jwt_secret.js';
  • src/index.ts:112-112 (registration)
    Registration of the tool in the availableTools object map, which is used to populate the MCP server's tool capabilities.
    [verifyJwtSecretTool.name]: verifyJwtSecretTool as AppTool,
  • Complete tool definition including name, description, schemas, and execute handler.
    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: VerifyJwtInput, 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/HenkDz/selfhosted-supabase-mcp'

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