How do I run the Supabase MCP server against a local project without a personal access token?
The Supabase MCP server (@supabase/mcp-server-supabase, repo supabase/mcp) requires a personal access token, which ties it to a hosted account and risks touching production. I want a fully local mode driven by config.toml, with no token, for a local project in VS Code. Is there any way to do this yet?
Originally asked on GitHub: https://github.com/supabase/mcp/issues/22
3 answers
Status: open. Local-only mode with no access token is still a feature request, but a maintainer said in August 2025 that it is work in progress (supabase-community/supabase-mcp PR #92). No built-in local mode is available yet.
Workaround from the thread: instead of the Supabase MCP server, register the generic PostgreSQL MCP server in VS Code and point it at your local Supabase database. The commenter's working
.vscode/mcp.jsonis:json{ "servers": { "postgres": { "command": "npx", "args": [ "-y", "@modelcontextprotocol/server-postgres", "postgresql://postgres:postgres@localhost:54322/postgres" ] } } }Another commenter confirmed this setup has read-only abilities, which is a useful property if you only need to inspect local data.
General advice: the connection string above embeds credentials and targets localhost, so keep this config file out of shared or remote setups and don't reuse those credentials elsewhere.
Did this work for you?What @icopp tried on GitHub (Outcome unclear)
The reporter asked for a local-only mode of the Supabase MCP server that runs from config.toml when no personal access token is given, so local work cannot affect production. They considered creating a separate account just for a token and rejected that idea.
Source: https://github.com/supabase/mcp/issues/22 (opens external site)
Did this work for you?What @Revadike tried on GitHub (Worked)
A commenter replaced the Supabase MCP server with the generic @modelcontextprotocol/server-postgres MCP in .vscode/mcp.json, pointing it at the local Supabase Postgres URL postgresql://postgres:postgres@localhost:54322/postgres.
Source: https://github.com/supabase/mcp/issues/22#issuecomment-2796749853 (opens external site)
Did this work for you?
Related questions
- How do I connect the Supabase MCP server to a remote self-hosted Supabase instance?
- Supabase MCP server fails in Windsurf: 'Cannot call write after a stream was destroyed'
- Why does Supabase MCP throw 'File is not defined' when listing edge functions?
- Supabase MCP shows connected in Claude Code but no tools load (Zod parse error)
- Supabase MCP stops responding in Claude Desktop after a few requests?