{"slug": "supabase-mcp-server-connect-claude-code-safely-read-only-and-one-project", "title": "Supabase MCP server: connect Claude Code safely (read-only and one project)", "summary": "Supabase hosts an official MCP server at https://mcp.supabase.com/mcp that connects agents such as Claude Code, Codex and Cursor to a Supabase account, and a dev blog dated 2026-11-28 recommends appending ?project_ref=<your-project-ref>&read_only=true for anything near production. The project_ref parameter scopes the server to one project and drops account-level tools, while read_only=true removes every tool that writes, leaving table listing, schema reads, select queries and docs search; features=database,docs narrows it further. Without those options the server can see every project in the account and use tools that run SQL, apply migrations and deploy edge functions, and the Supabase CLI's local stack serves MCP at http://localhost:54321/mcp with fewer tools and no OAuth.", "body_md": "[Dev blog](https://calyban.com/blog) · [Guides](https://calyban.com/blog#guide) · 2026-11-28\n\n# Supabase MCP server: connect Claude Code safely (read-only and one project)\n\n**Short answer:** Supabase hosts its official MCP server at `https://mcp.supabase.com/mcp`. Add that URL to your agent and sign in through the browser. For anything near production, use `https://mcp.supabase.com/mcp?project_ref=<your-project-ref>&read_only=true` instead, which limits the agent to one project and removes every tool that writes.\n\nOr let [Calyban](https://calyban.com/) add it: one click puts Supabase’s hosted server into Claude Code, Codex, Cursor and the rest, each in its own format. Free, no account.\n\n## Claude Code\n\n```\nclaude mcp add --transport http supabase \"https://mcp.supabase.com/mcp?project_ref=abcdefghijklmnop&read_only=true\"\n```\n\nThe first call opens a browser window to sign in to Supabase. There’s no access token to paste.\n\n## Codex\n\n```\n[mcp_servers.supabase]\nurl = \"https://mcp.supabase.com/mcp?project_ref=abcdefghijklmnop&read_only=true\"\n```\n\n## Cursor\n\n```\n{\n  \"mcpServers\": {\n    \"supabase\": { \"url\": \"https://mcp.supabase.com/mcp?project_ref=abcdefghijklmnop&read_only=true\" }\n  }\n}\n```\n\nYour project ref is the random string in your dashboard URL: `supabase.com/dashboard/project/<ref>`.\n\n## Why scope it\n\nWithout options, the server can see every project in your account and use every tool, including ones that run SQL, apply migrations and deploy edge functions. That’s the right power for a throwaway dev project and the wrong one for the database your customers use.\n\n- `project_ref=...` scopes it to one project and drops the account-level tools.\n- `read_only=true` drops every tool that changes anything. The agent can still list tables, read schemas, run select queries and search the docs.\n- `features=database,docs` narrows it further to just those tool groups.\n\nA good pattern is two entries: a read-only one for production, and a full one for a dev branch or a local stack.\n\n## Running Supabase locally\n\nIf you use the Supabase CLI, your local stack serves MCP at `http://localhost:54321/mcp`. It has fewer tools than the hosted one and no OAuth, which is fine on your own machine.\n\n## Skills that pair well\n\nThe server gives the agent access. Skills give it judgment. The catalog has Supabase’s own [Postgres Best Practices](https://calyban.com/plugins/supabase-agent-skills-postgres-best-practices) plugin, the official [Supabase plugin](https://calyban.com/plugins/claude-plugins-official-supabase) for Claude Code, and a set of community commands for migrations and performance.\n\n## The Calyban way\n\nOpen [Supabase](https://calyban.com/mcp/supabase) in Calyban and press **Install**. Calyban writes the hosted URL into each agent’s config in that agent’s format, and your agent handles the Supabase sign-in on first use. For a project-specific setup, choose **One folder** and the server goes into that repo alone, where it belongs.\n\n(Claude Desktop takes hosted servers through its own **Settings → Connectors**, so paste the same URL there.)\n\nCalyban is free for Windows and Linux at [/#download](https://calyban.com/#download). Tell us on [Discord](https://discord.gg/pHDNtgYvWn) what you’d like Calyban to set up next.", "url": "https://wpnews.pro/news/supabase-mcp-server-connect-claude-code-safely-read-only-and-one-project", "canonical_source": "https://calyban.com/blog/supabase-mcp-claude-code", "published_at": "2026-11-28 00:00:00+00:00", "updated_at": "2026-11-29 06:15:02.496948+00:00", "lang": "en", "topics": ["ai-agents", "agent-protocols", "developer-tools", "ai-tools"], "entities": ["Supabase", "Claude Code", "Codex", "Cursor", "Calyban", "Claude Desktop"], "also_reported_by": [], "takeaway": "Append ?project_ref=<ref>&read_only=true to the Supabase MCP URL to confine an agent to one project and strip every write tool, keeping SQL execution, migrations and edge-function deploys out of production reach.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/supabase-mcp-server-connect-claude-code-safely-read-only-and-one-project", "markdown": "https://wpnews.pro/news/supabase-mcp-server-connect-claude-code-safely-read-only-and-one-project.md", "text": "https://wpnews.pro/news/supabase-mcp-server-connect-claude-code-safely-read-only-and-one-project.txt", "jsonld": "https://wpnews.pro/news/supabase-mcp-server-connect-claude-code-safely-read-only-and-one-project.jsonld"}}