Skip to content

Commit 29e3619

Browse files
Merge pull request #24 from alexander-zuev/feat/infra
chore: add Docker and environment configuration files
2 parents da00388 + 609701b commit 29e3619

File tree

8 files changed

+193
-5
lines changed

8 files changed

+193
-5
lines changed

.dockerignore

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# Python
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
*.so
6+
.Python
7+
build/
8+
develop-eggs/
9+
dist/
10+
downloads/
11+
eggs/
12+
.eggs/
13+
lib/
14+
lib64/
15+
parts/
16+
sdist/
17+
var/
18+
wheels/
19+
*.egg-info/
20+
.installed.cfg
21+
*.egg
22+
.pytest_cache/
23+
.coverage
24+
htmlcov/
25+
.tox/
26+
.nox/
27+
28+
# Virtual Environment
29+
.env
30+
.venv
31+
env/
32+
venv/
33+
ENV/
34+
env.bak/
35+
venv.bak/
36+
37+
# macOS
38+
.DS_Store
39+
.AppleDouble
40+
.LSOverride
41+
Icon
42+
._*
43+
.DocumentRevisions-V100
44+
.fseventsd
45+
.Spotlight-V100
46+
.TemporaryItems
47+
.Trashes
48+
.VolumeIcon.icns
49+
.com.apple.timemachine.donotpresent
50+
51+
# IDEs and Editors
52+
.idea/
53+
.vscode/
54+
*.swp
55+
*.swo
56+
*~
57+
.project
58+
.classpath
59+
.settings/
60+
*.sublime-workspace
61+
*.sublime-project
62+
63+
# Local development
64+
.env.mcp
65+
.env.mcp2
66+
*.log
67+
logs/
68+
69+
# Ignore local assets
70+
assets/
71+
*.gif
72+
*.mp4
73+
74+
# Generated version file
75+
supabase_mcp/_version.py
76+
77+
# Docs
78+
.llms-full.txt
79+
80+
# Docker specific ignores
81+
Dockerfile
82+
.dockerignore
83+
docker-compose.yml
84+
docker-compose.yaml
85+
86+
# Git
87+
.git/
88+
.github/
89+
.gitignore

.env.example

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1-
# .env.mcp.example
2-
SUPABASE_PROJECT_REF=your-project-ref # default is local supabase project ref if not set
3-
SUPABASE_DB_PASSWORD=your-db-password # default is local supabase db password if not set
1+
# Supabase MCP Server Environment Configuration
2+
# Copy this file to .env to configure your server
3+
4+
# Required for remote Supabase projects (optional for local development)
5+
SUPABASE_PROJECT_REF=your-project-ref # Your project reference from dashboard URL
6+
SUPABASE_DB_PASSWORD=your-db-password # Database password for your project
7+
8+
# Optional configuration
9+
SUPABASE_REGION=us-east-1 # Region where your Supabase project is hosted (defaults to us-east-1)
10+
SUPABASE_ACCESS_TOKEN=your-personal-access-token # Required for Management API tools
11+
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key # Required for Auth Admin SDK tools

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Description
2+
3+
<!-- Provide a clear and concise description of what this PR accomplishes -->
4+
5+
## Type of Change
6+
7+
- [ ] Bug fix (non-breaking change which fixes an issue)
8+
- [ ] New feature (non-breaking change which adds functionality)
9+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
10+
- [ ] Documentation update
11+
- [ ] Performance improvement
12+
- [ ] Code refactoring (no functional changes)
13+
- [ ] Test updates
14+
- [ ] CI/CD or build process changes
15+
- [ ] Other (please describe):
16+
17+
## Checklist
18+
- [ ] I have performed a self-review of my own code
19+
- [ ] I have made corresponding changes to the documentation
20+
- [ ] New and existing unit tests pass locally with my changes

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
4040
- name: Run tests
4141
run: |
42-
source .venv/bin/activate
42+
source .venv/bin/activate # necessary for pytest
4343
pytest
4444
4545
- name: Build distribution packages

.github/workflows/docs/release-checklist.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ Pre-release
99
6. Changelog is up to date
1010
7. Tag and release on GitHub
1111
8. Release is published to PyPI
12+
9. Update dockerfile
13+
10. Update .env.example (if necessary)
1214

1315
Post-release
1416
- Clean install from PyPi works

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,4 @@ supabase_mcp/_version.py
7777

7878
# Docs
7979
.llms-full.txt
80+
COMMIT_CONVENTION.md

Dockerfile

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
FROM python:3.12-slim-bookworm
2+
3+
WORKDIR /app
4+
5+
# Install PostgreSQL client libraries (required for psycopg2) and curl for uv installation
6+
RUN apt-get update && apt-get install -y \
7+
libpq-dev \
8+
gcc \
9+
curl \
10+
ca-certificates \
11+
&& rm -rf /var/lib/apt/lists/*
12+
13+
# # Install uv with fixed version
14+
ENV UV_VERSION="0.6.1"
15+
ADD https://astral.sh/uv/${UV_VERSION}/install.sh /uv-installer.sh
16+
RUN sh /uv-installer.sh && rm /uv-installer.sh
17+
# Ensure the installed binary is on the `PATH`
18+
ENV PATH="/root/.local/bin/:$PATH"
19+
20+
# # Copy the project into the image
21+
COPY . /app
22+
WORKDIR /app
23+
24+
# Create venv and install dependencies with version set
25+
ENV SETUPTOOLS_SCM_PRETEND_VERSION="0.3.6"
26+
RUN uv venv && \
27+
. .venv/bin/activate && \
28+
uv pip install .
29+
30+
# Set the entrypoint to use the venv
31+
ENTRYPOINT ["uv", "run", "supabase-mcp-server"]

smithery.yaml

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,44 @@ startCommand:
1515
supabaseDbPassword:
1616
type: string
1717
description: The database password of Supabase project you want to connect to.
18+
supabaseRegion:
19+
type: string
20+
description: Region where your Supabase project is hosted.
21+
default: "us-east-1"
22+
enum:
23+
- "us-west-1"
24+
- "us-east-1"
25+
- "us-east-2"
26+
- "ca-central-1"
27+
- "eu-west-1"
28+
- "eu-west-2"
29+
- "eu-west-3"
30+
- "eu-central-1"
31+
- "eu-central-2"
32+
- "eu-north-1"
33+
- "ap-south-1"
34+
- "ap-southeast-1"
35+
- "ap-northeast-1"
36+
- "ap-northeast-2"
37+
- "ap-southeast-2"
38+
- "sa-east-1"
39+
supabaseAccessToken:
40+
type: string
41+
description: Your Supabase access token (required for Management API tools).
42+
supabaseServiceRoleKey:
43+
type: string
44+
description: Your Supabase service role key (required for Auth Admin SDK tools).
1845
commandFunction:
1946
# A function that produces the CLI command to start the MCP on stdio.
2047
|-
21-
(config) => ({ command: 'uv', args: ['--directory', '.', 'run', 'main.py'], env: { SUPABASE_PROJECT_REF: config.supabaseProjectRef, SUPABASE_DB_PASSWORD: config.supabaseDbPassword } })
48+
(config) => ({
49+
command: 'supabase-mcp-server',
50+
args: [],
51+
env: {
52+
SUPABASE_PROJECT_REF: config.supabaseProjectRef,
53+
SUPABASE_DB_PASSWORD: config.supabaseDbPassword,
54+
SUPABASE_REGION: config.supabaseRegion,
55+
SUPABASE_ACCESS_TOKEN: config.supabaseAccessToken,
56+
SUPABASE_SERVICE_ROLE_KEY: config.supabaseServiceRoleKey
57+
}
58+
})

0 commit comments

Comments
 (0)