Integrations
Uses .env files for securely managing Supabase credentials and configuration settings for the MCP server.
Supports containerized deployment with Docker and Docker Compose, allowing for easy setup, management and troubleshooting of the MCP server environment.
Utilizes Pydantic for type-safe request/response handling, ensuring data validation and consistent interactions with the Supabase database.
Supabase MCP 服务器
模型上下文协议 (MCP) 服务器,使 AI 工具能够与 Supabase 数据库交互。该服务器提供用于读取、创建、更新和删除 Supabase 表中记录的工具。
特征
- 通过过滤和列选择从任何 Supabase 表中读取行
- 在表中创建单个或多个记录
- 根据过滤条件更新记录
- 根据过滤条件删除记录
- 人工智能模型理解的全面工具描述
- 使用 Pydantic 进行类型安全的请求/响应处理
- Docker 支持,轻松部署
先决条件
- Python 3.9+
- Docker 和 Docker Compose
- 具有服务角色密钥的 Supabase 项目
- 兼容 FastMCP 的 AI IDE
安装
- 克隆存储库:
Copy
- 使用您的 Supabase 凭证创建一个
.env
文件:
Copy
- 构建并启动容器:
Copy
该服务器将在http://localhost:8000
上可用。
Docker 管理命令
Copy
Docker 问题故障排除
- 如果容器启动失败:Copy
- 如果遇到端口冲突:Copy
- 如果环境变量未加载:Copy
在 AI IDE 中配置 MCP
常规配置步骤
- 打开你的 AI IDE 的设置/首选项
- 导航至 MCP 或 AI 设置部分
- 添加一个新的 MCP 服务器,配置如下:
Copy
IDE 特定指令
光标
- 打开设置(⌘,或 Ctrl+,)
- 前往“AI”部分
- 在“MCP 服务器”下,点击“添加服务器”
- 使用上面的配置
- 重新启动 Cursor 以应用更改
带有 AI 扩展的 VS Code
- 打开命令面板(⌘⇧P 或 Ctrl+Shift+P)
- 搜索“MCP”或“AI 设置”
- 添加新的 MCP 服务器配置
- 使用上面的配置
- 重新加载 VS Code 窗口
带有 AI 插件的 JetBrains IDE
- 打开设置(⌘ 或 Ctrl+Alt+S)
- 导航至“工具”→“AI”→“MCP 服务器”
- 点击“+”添加新服务器
- 使用上面的配置
- 重新启动 IDE 以应用更改
验证 MCP 连接
- 检查 IDE 的状态栏以了解 MCP 服务器状态
- 寻找绿色指示灯或“MCP 已连接”消息
- 尝试使用需要数据库访问的 AI 功能
- 检查 Docker 日志是否存在任何连接问题:Copy
用法
- 启动 MCP 服务器:
Copy
- 配置您的 AI 工具以使用 MCP 服务器:
Copy
可用工具
读取行
从 Supabase 表中读取行,并可选择过滤和列。
使用示例:
Copy
创建记录
在 Supabase 表中创建一个或多个记录。
使用示例:
Copy
更新记录
根据过滤条件更新 Supabase 表中的记录。
使用示例:
Copy
删除记录
根据过滤条件从 Supabase 表中删除记录。
使用示例:
Copy
安全注意事项
- 始终在安全的环境中使用服务角色密钥
- 切勿在客户端代码中公开服务角色密钥
- 在 Supabase 中使用适当的行级安全策略
- 考虑对生产用途实施速率限制
贡献
- 分叉存储库
- 创建功能分支
- 提交你的更改
- 推送到分支
- 创建拉取请求
执照
麻省理工学院
This server cannot be installed
模型上下文协议服务器,使 AI 工具能够与 Supabase 数据库交互,提供读取、创建、更新和删除 Supabase 表中记录的工具。
Related MCP Servers
- AsecurityFlicenseAqualityA Model Context Protocol (MCP) server that provides programmatic access to the Supabase Management API. This server allows AI models and other clients to manage Supabase projects and organizations through a standardized interface.Last updated -88427JavaScript
- -securityAlicense-qualityA Model Context Protocol server optimized for integrating Supabase with the Windsurf Editor, providing database interactions through natural language with enhanced error handling and response formatting.Last updated -2TypeScriptMIT License
- -securityFlicense-qualityA Model Context Protocol server that enables querying feature suggestions from a Supabase database, allowing AI tools like Cursor and Claude to access and display feature request data.Last updated -TypeScript
- -securityAlicense-qualityA Model Context Protocol server that enables Claude and other LLMs to perform database operations and invoke Edge Functions within Supabase through natural language.Last updated -TypeScriptMIT License