diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..063e20c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +# Generated by https://smithery.ai. See: https://smithery.ai/docs/build/project-config +FROM node:lts-alpine AS builder +WORKDIR /app +COPY . . +RUN npm ci --ignore-scripts +RUN npm run build + +FROM node:lts-alpine AS runtime +WORKDIR /app +# Copy production node_modules including symlinks +COPY --from=builder /app/node_modules ./node_modules +# Copy built supabase server +COPY --from=builder /app/packages/mcp-server-supabase/dist ./dist +# Copy mcp-utils package so symlink resolves +COPY --from=builder /app/packages/mcp-utils ./packages/mcp-utils +ENV NODE_ENV=production +ENTRYPOINT ["node", "dist/transports/stdio.js"] diff --git a/README.md b/README.md index 730f020..04fc2b2 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # Supabase MCP Server +[![smithery badge](https://smithery.ai/badge/@supabase-community/supabase-mcp)](https://smithery.ai/server/@supabase-community/supabase-mcp) > Connect your Supabase projects to Cursor, Claude, Windsurf, and other AI assistants. ![supabase-mcp-demo](https://github.com/user-attachments/assets/3fce101a-b7d4-482f-9182-0be70ed1ad56) @@ -18,6 +19,14 @@ If you don't have Node.js installed, you can download it from [nodejs.org](https ## Setup +### Installing via Smithery + +To install Supabase MCP Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@supabase-community/supabase-mcp): + +```bash +npx -y @smithery/cli install @supabase-community/supabase-mcp --client claude +``` + ### 1. Personal access token (PAT) First, go to your [Supabase settings](https://supabase.com/dashboard/account/tokens) and create a personal access token. Give it a name that describes its purpose, like "Cursor MCP Server". diff --git a/smithery.yaml b/smithery.yaml new file mode 100644 index 0000000..d59b3d5 --- /dev/null +++ b/smithery.yaml @@ -0,0 +1,34 @@ +# Smithery configuration file: https://smithery.ai/docs/build/project-config + +startCommand: + type: stdio + commandFunction: + # A JS function that produces the CLI command based on the given config to start the MCP on stdio. + |- + (config) => { + const args = []; + args.push('--access-token', config.accessToken); + if (config.projectRef) args.push('--project-ref', config.projectRef); + if (config.readOnly) args.push('--read-only'); + return { command: 'node', args: ['dist/transports/stdio.js', ...args] }; + } + configSchema: + # JSON Schema defining the configuration options for the MCP. + type: object + required: + - accessToken + properties: + accessToken: + type: string + description: Supabase personal access token + projectRef: + type: string + description: Optional Supabase project ref + readOnly: + type: boolean + default: false + description: Optional read-only mode + exampleConfig: + accessToken: supabase_test_token + projectRef: proj_ref_123 + readOnly: false