Skip to main content
Glama
abushadab

Self-Hosted Supabase MCP Server

by abushadab

verify_jwt_secret

Verify the JWT secret configuration for a self-hosted Supabase instance, ensuring proper setup and providing a preview for validation directly from your MCP-compatible environment.

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 handler function implementing the core logic of the verify_jwt_secret tool: retrieves the JWT secret via the client and returns status with a preview if found.
    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' };
    },
  • Input (empty), output, and MCP static JSON schemas defining the structure and validation for the verify_jwt_secret tool.
    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: [],
    };
  • Primary registration/definition of the verifyJwtSecretTool, exporting the complete tool object with name, description, schemas, and 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' };
        },
    }; 
  • src/index.ts:112-112 (registration)
    Server-side registration of verifyJwtSecretTool into the availableTools map for MCP server initialization.
    [verifyJwtSecretTool.name]: verifyJwtSecretTool as AppTool,
  • Supporting getter method in SelfhostedSupabaseClient for retrieving the configured JWT secret, directly called by the tool handler.
    public getJwtSecret(): string | undefined {
        return this.options.jwtSecret;
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool checks configuration and returns a preview, but lacks details on what 'preview' entails (e.g., partial secret, status message), potential errors (e.g., if not configured), or side effects (e.g., logging, rate limits). For a tool with zero annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose ('Checks if the Supabase JWT secret is configured') and adds value with the outcome ('returns a preview'). There is no wasted verbiage or redundancy, making it highly concise and well-structured for quick understanding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 0 parameters, 100% schema coverage, and no output schema, the description is minimally adequate. It explains what the tool does but lacks details on the 'preview' output, error handling, or integration with sibling tools like get_anon_key. For a simple check tool, it meets basic needs but could be more complete by clarifying the return value or usage context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters, and schema description coverage is 100%, so there are no parameters to document. The description doesn't need to add parameter semantics beyond what the schema provides. A baseline score of 4 is appropriate as the description doesn't compensate for missing param info, but none is required.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Checks if the Supabase JWT secret is configured for this server and returns a preview.' It specifies the verb ('Checks'), resource ('Supabase JWT secret'), and outcome ('returns a preview'), which distinguishes it from sibling tools like get_anon_key or get_service_key that retrieve different credentials. However, it doesn't explicitly differentiate from all siblings, such as get_database_connections, which might also involve configuration checks.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., server setup), exclusions, or related tools like get_anon_key for other secret checks. The context is implied (verifying JWT configuration), but no explicit usage scenarios or comparisons are given, leaving the agent to infer based on the purpose alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

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/abushadab/selfhosted-supabase-mcp-basic-auth'

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