Skip to main content
Glama

Self-Hosted Supabase MCP Server

by abushadab
get_project_url.ts1.11 kB
import { z } from 'zod'; import type { SelfhostedSupabaseClient } from '../client/index.js'; import type { ToolContext } from './types.js'; // Input schema (none needed) const GetProjectUrlInputSchema = z.object({}); type GetProjectUrlInput = z.infer<typeof GetProjectUrlInputSchema>; // Output schema const GetProjectUrlOutputSchema = z.object({ project_url: z.string().url(), }); // Static JSON Schema for MCP capabilities const mcpInputSchema = { type: 'object', properties: {}, required: [], }; // The tool definition export const getProjectUrlTool = { name: 'get_project_url', description: 'Returns the configured Supabase project URL for this server.', inputSchema: GetProjectUrlInputSchema, mcpInputSchema: mcpInputSchema, // Add static JSON schema outputSchema: GetProjectUrlOutputSchema, execute: async (input: GetProjectUrlInput, context: ToolContext) => { const client = context.selfhostedClient; const url = client.getSupabaseUrl(); // Use getter from client return { project_url: url }; }, };

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