Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deployment: Dockerfile and Smithery config #4

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand All @@ -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
```
{
Expand All @@ -33,4 +44,4 @@ Add the following to your Claude Config JSON file
}
}
}
```
```
17 changes: 17 additions & 0 deletions smithery.yaml
Original file line number Diff line number Diff line change
@@ -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}})