From 41f1c596198438200c9e80eff53d9cec6a028dc7 Mon Sep 17 00:00:00 2001 From: Henry Mao <1828968+calclavia@users.noreply.github.com> Date: Fri, 24 Jan 2025 21:03:52 +0800 Subject: [PATCH 1/3] Add Dockerfile --- Dockerfile | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..83e8e6d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,41 @@ +# Generated by https://smithery.ai. See: https://smithery.ai/docs/config#dockerfile +# Use a Node.js image as the base image +FROM node:18-alpine AS builder + +# Create a working directory +WORKDIR /app + +# Copy package files and tsconfig.json for installation +COPY package.json package-lock.json tsconfig.json ./ + +# Install dependencies and cache them +RUN --mount=type=cache,target=/root/.npm npm install + +# Copy the rest of the application code +COPY . . + +# Build the project +RUN npm run build + +# Production stage +FROM node:18-alpine AS release + +# Set working directory +WORKDIR /app + +# Copy compiled files from builder +COPY --from=builder /app/dist /app/dist +COPY --from=builder /app/package.json /app/package.json +COPY --from=builder /app/package-lock.json /app/package-lock.json + +# Set environment to production +ENV NODE_ENV=production + +# Install only production dependencies +RUN npm ci --omit=dev + +# Define environment variable for the Supabase API key +ENV SUPABASE_API_KEY=YOUR_API_KEY_HERE + +# Set the entry point to the compiled JavaScript file +ENTRYPOINT ["node", "dist/index.js"] \ No newline at end of file From ef18c85cfe2ee5a12050ed3afe3b77a9079e4dac Mon Sep 17 00:00:00 2001 From: Henry Mao <1828968+calclavia@users.noreply.github.com> Date: Fri, 24 Jan 2025 21:03:53 +0800 Subject: [PATCH 2/3] Add Smithery configuration --- smithery.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 smithery.yaml diff --git a/smithery.yaml b/smithery.yaml new file mode 100644 index 0000000..635a6c5 --- /dev/null +++ b/smithery.yaml @@ -0,0 +1,17 @@ +# Smithery configuration file: https://smithery.ai/docs/config#smitheryyaml + +startCommand: + type: stdio + configSchema: + # JSON Schema defining the configuration options for the MCP. + type: object + required: + - supabaseApiKey + properties: + supabaseApiKey: + type: string + description: The API key for the Supabase MCP server. + commandFunction: + # A function that produces the CLI command to start the MCP on stdio. + |- + (config) => ({command: 'node', args: ['dist/index.js'], env: {SUPABASE_API_KEY: config.supabaseApiKey}}) \ No newline at end of file From 2ee2ac1d5690dcc95c346320af195ea8a588f06c Mon Sep 17 00:00:00 2001 From: Henry Mao <1828968+calclavia@users.noreply.github.com> Date: Fri, 24 Jan 2025 21:03:54 +0800 Subject: [PATCH 3/3] Update README --- README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 950fa7f..222373e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # Supabase MCP Server +[![smithery badge](https://smithery.ai/badge/@joshuarileydev/supabase-mcp-server)](https://smithery.ai/server/@joshuarileydev/supabase-mcp-server) A Model Context Protocol (MCP) server that provides programmatic access to the Supabase Management API. This server allows AI models and other clients to manage Supabase projects and organizations through a standardized interface. @@ -17,6 +18,16 @@ A Model Context Protocol (MCP) server that provides programmatic access to the S - Create new organizations ## Installation + +### Installing via Smithery + +To install Supabase Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@joshuarileydev/supabase-mcp-server): + +```bash +npx -y @smithery/cli install @joshuarileydev/supabase-mcp-server --client claude +``` + +### Installing Manually Add the following to your Claude Config JSON file ``` { @@ -33,4 +44,4 @@ Add the following to your Claude Config JSON file } } } -``` \ No newline at end of file +```