-
-
Notifications
You must be signed in to change notification settings - Fork 98
Description
Describe the bug
The supabase-mcp-server encounters a Python runtime error ('NoneType' object has no attribute 'group') when attempting to perform direct PostgreSQL database operations (e.g., listing schemas, listing tables, executing SQL) against a Supabase project. This occurs even when the underlying database credentials have been verified as correct and allow successful connection via an external database client (DBeaver).
Steps to Reproduce
Configured supabase-mcp-server via its mcp_config.json with valid and verified Supabase project credentials.
Windsurf on MacOS unable to read/write to my Supabase project/database, consistently returns there is nothing there, but verified externally with DBeaver.
Happy to share password and API keys privately, I can then generate new ones after.
Initiate a direct database operation through the supabase-mcp-server. For example, using a client that calls the server's equivalent of get_schemas or execute_postgresql.
Observe that the supabase-mcp-server returns an error indicating 'NoneType' object has no attribute 'group'.
Connection Details
Connection type: Remote
Using password with special characters?: No
Screenshots
Logs - Attached
supabase-mcp-server-logs.txt
Additional context
From Windsurf AI;
Credentials Validated Externally: The core database credentials were successfully used to connect to the Supabase project's database via DBeaver with SSL mode require. This confirms the database is accessible and the credentials are correct.
Successful Auth Admin API Calls: Auth Admin API operations (e.g., list_users) made through the same supabase-mcp-server instance, using the SUPABASE_PROJECT_REF and SUPABASE_SERVICE_ROLE_KEY from the mcp_config.json, are successful. This suggests that these specific credentials and some functionalities of the supabase-mcp-server are working correctly.
Hypothesis: The 'NoneType' object has no attribute 'group' error seems to be an internal issue within the supabase-mcp-server's specific logic for handling direct PostgreSQL connections or query executions, rather than an issue with the database credentials themselves or general Supabase service availability.
Secondary Issue (Potentially Unrelated but Observed): We also encountered 401 Unauthorized errors ("invalid signature" from the MCP server) for many Supabase Management API calls (e.g., GET /v1/projects/{ref}) using a SUPABASE_ACCESS_TOKEN. However, a call to get_management_api_spec succeeded with the same token. This secondary issue might provide additional context or could be a separate bug. The primary concern for this report is the direct database connection failure.
Checklist
[Yes] I've included the server logs
[Yes] I've checked the README troubleshooting section
[Yes, verified with DBeaver] I've verified my connection settings are correct (and confirmed external client connectivity)