Supabase User MCP
Enables AI agents to interact with application data as a specific user or agent while enforcing PostgreSQL Row Level Security, providing bounded tools for memory search, retrieval, and canonical mutation with an approval workflow.
README
Supabase User MCP
Give every human and agent its own database identity boundary.
Supabase User MCP is an independent, security-first data-plane MCP server for applications built on Supabase. It is designed to let AI clients work with application data as a specific user or agent while PostgreSQL Row Level Security (RLS) remains the final authorization authority.
[!WARNING] This repository is in active M0 development. It contains only a zero-authority protocol probe—not a deployable user-data server—and must not be connected to production data.
Why this exists
Supabase's hosted MCP server is a developer control-plane tool. It manages projects, schemas, migrations, functions, and operational resources under a developer's authority. Supabase explicitly recommends using that server for development and testing rather than exposing it to customers or production data.
Supabase User MCP explores the complementary data-plane problem:
| Supabase hosted MCP | Supabase User MCP | |
|---|---|---|
| Primary user | Developer | Application user or bounded agent |
| Plane | Project control plane | Application data plane |
| Typical actions | Schema, migration, project operations | Domain-specific reads and writes |
| Authorization | Developer account and project scope | User, client, tenant, capability, and row |
| Database boundary | Administrative tooling | RLS must remain effective |
| Intended environment | Development and test | Production only after the security gates pass |
The goal is not to make prompt injection impossible. The goal is to ensure that a compromised model cannot exceed the authority of the identity and capability it was given.
Security thesis
MCP client
│ authenticated request
▼
Supabase User MCP
├── validates identity and request context
├── exposes a small, allowlisted tool surface
├── enforces limits, approval states, and audit metadata
▼
Supabase Data API / PostgREST
▼
PostgreSQL + RLS
├── caller and OAuth-client policy
├── tenant and capability policy
└── row and operation policy
The project follows six non-negotiable principles:
- No master key in the MCP request path. A public tool handler must never use a
service_roleor secret key to perform user actions. - The database makes the final decision. Application checks improve usability; RLS and database constraints enforce authorization.
- Tools are capabilities, not a generic REST console. The initial server will not expose arbitrary SQL, tables, schemas, RPC names, URLs, or HTTP methods.
- Reads and writes are different authorities. Canonical or irreversible changes use a database-enforced proposal and approval workflow.
- Untrusted content stays data. Tool results are bounded and marked as untrusted; prompt injection is tested as a containment problem.
- Claims require evidence. A milestone is complete only when its positive, negative, cross-identity, and adversarial tests pass.
Planned product surface
The first useful release is deliberately narrow:
memory_search— bounded full-text or semantic search over authorized recordsmemory_get— retrieve one authorized memory record by opaque identifiermemory_list_recent— list authorized recent records with a hard page limitmemory_append_observation— append non-canonical information idempotentlymemory_propose_change— stage a canonical mutation for human reviewmemory_get_proposal— inspect approval status without applying the change
The names describe the reference sovereign-memory implementation. Adapters may later map the same capability model to other Supabase application schemas. See the complete feature catalog.
Current phase
The project is in M0: protocol and policy foundation. Before server code is treated as viable, M0 must resolve two identity questions:
- How a remote HTTP MCP server obtains a downstream Supabase token without violating MCP audience-binding and token-transit requirements.
- How durable non-human principals are provisioned and revoked, given that Supabase's
OAuth server currently documents authorization-code and refresh-token grants rather
than a
client_credentialsgrant.
These are architecture gates, not implementation details. The local stdio proof and the remote HTTP service are tracked as separate deployment profiles until the remote identity chain is demonstrated end to end.
The executable M0 spike now proves a strict TypeScript workspace, MCP 2026-07-28
stdio negotiation, structured input/output validation, and a deliberately non-authoritative
tool. It has no Supabase client, credentials, network access, or data operations. See the
compatibility evidence.
Try the M0 compatibility probe
Prerequisites: Node.js 22.20.0 and npm 11.19.0.
npm ci
npm run check
npm run build
npm start
npm start launches a JSON-RPC stdio server for an MCP 2026-07-28 client; it is not an
interactive terminal application. The only exposed tool is system_compatibility_probe,
which performs no network or data operation. Exact versions and verification commands are
documented in the development guide.
Roadmap
| Milestone | Outcome | Release gate |
|---|---|---|
| M0 | Protocol, identity, policy, and threat-model decisions | Architecture review is complete |
| M1 | Local policy laboratory with representative principals and records | Access matrix passes |
| M2 | Read-only stdio reference server | RLS isolation is proven end to end |
| M3 | Idempotent writes and canonical approval workflow | Direct canonical mutation is impossible |
| M4 | Standards-compliant remote HTTP and OAuth profile | Audience and downstream-token chain pass review |
| M5 | Fleet operations, observability, and adversarial hardening | Revocation and containment drills pass |
| M6 | Stable v1 contract | Independent security review and release checklist pass |
Each milestone has deliverables, dependencies, exclusions, and measurable exit criteria in the development roadmap.
Documentation
- Product definition — users, jobs, boundaries, and success measures
- Architecture — components, trust boundaries, and deployment profiles
- Feature catalog — proposed tools and platform capabilities
- Security model — identities, capabilities, RLS, and approvals
- Threat model — assets, attackers, abuse cases, and mitigations
- Roadmap — implementation sequence and release gates
- Development guide — pinned stack, layout, and engineering standards
- M0 compatibility evidence — pinned versions and protocol proof
- Architecture decisions — consequential decisions and open gates
Contributing
The highest-value contributions today are adversarial reviews, prior art, policy-test cases, and small documentation corrections. Please read CONTRIBUTING.md and GOVERNANCE.md before opening a pull request. Security reports belong in the private process described in SECURITY.md, not in a public issue.
Project status and independence
Supabase User MCP is an independent open-source project. It is not an official Supabase product and is not endorsed by Supabase, Inc. “Supabase” is used to identify compatibility with the Supabase platform.
Licensed under the Apache License 2.0.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。