Skip to content

Commit 82191f1

Browse files
Merge pull request #48 from alexander-zuev/feat/migration-names
feat(database): enhance migration management and query validation
2 parents 8bb9290 + 3aa9eac commit 82191f1

20 files changed

+1566
-928
lines changed

.github/ISSUE_TEMPLATE/roadmap_item.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,3 @@ Why should this feature be added? What problems does it solve? For whom?
1919

2020
## Implementation Ideas
2121
Any initial thoughts on how this could be implemented.
22-

CHANGELOG.MD

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
66

77

8+
## [0.3.10] - Unreleased
9+
### Added
10+
- Enhanced migration naming system with improved object type detection for procedures, functions, and views.
11+
- Expanded `retrieve_migrations` tool with pagination, name pattern filtering, and option to include full SQL queries.
12+
- Added a check to validate personal access token and service role key are set before calling API or SDK methods
13+
14+
### Changed
15+
- Updated setup instructions for Claude Desktop
16+
- Updated setup instructions for Cline
17+
- Updated and fixed Smithery.ai setup
18+
19+
### Removed
20+
- Removed redundant `get_api_safety_rules` tool since exceptions already provide enough information to the client
21+
22+
823
## [0.3.9] - 2025-03-08
924
### Fixed
1025
- Fixed an issue with api spec tool that prevented spec retrieval

Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,17 @@ RUN apt-get update && apt-get install -y \
1414
ENV UV_VERSION="0.6.1"
1515
ADD https://astral.sh/uv/${UV_VERSION}/install.sh /uv-installer.sh
1616
RUN sh /uv-installer.sh && rm /uv-installer.sh
17-
# Ensure the installed binary is on the `PATH`
1817
ENV PATH="/root/.local/bin/:$PATH"
1918

2019
# # Copy the project into the image
2120
COPY . /app
2221
WORKDIR /app
2322

2423
# Create venv and install dependencies with version set
25-
ENV SETUPTOOLS_SCM_PRETEND_VERSION="0.3.6"
24+
ENV SETUPTOOLS_SCM_PRETEND_VERSION="0.3.9"
2625
RUN uv venv && \
2726
. .venv/bin/activate && \
2827
uv pip install .
2928

3029
# Set the entrypoint to use the venv
31-
ENTRYPOINT ["uv", "run", "supabase-mcp-server"]
30+
CMD ["uv", "run", "supabase-mcp-server"]

README.md

Lines changed: 208 additions & 150 deletions
Large diffs are not rendered by default.

smithery.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Smithery configuration file: https://smithery.ai/docs/config#smitheryyaml
22

3+
build:
4+
dockerBuildPath: .
5+
36
startCommand:
47
type: stdio
58
configSchema:
@@ -46,8 +49,8 @@ startCommand:
4649
# A function that produces the CLI command to start the MCP on stdio.
4750
|-
4851
(config) => ({
49-
command: 'supabase-mcp-server',
50-
args: [],
52+
command: 'uv run supabase-mcp-server',
53+
args: ['run', 'supabase-mcp-server'],
5154
env: {
5255
SUPABASE_PROJECT_REF: config.supabaseProjectRef,
5356
SUPABASE_DB_PASSWORD: config.supabaseDbPassword,

supabase_mcp/services/api/api_client.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,12 @@ async def execute_request(
212212
APIResponseError: For response parsing errors
213213
UnexpectedError: For unexpected errors
214214
"""
215+
# Check if access token is available
216+
if not self.settings.supabase_access_token:
217+
raise APIClientError(
218+
"Supabase access token is not configured. Set SUPABASE_ACCESS_TOKEN environment variable to use Management API tools."
219+
)
220+
215221
# Log detailed request information
216222
logger.info(f"API Client: Executing {method} request to {path}")
217223
if request_params:

0 commit comments

Comments
 (0)