这是一个用于与 Supabase 交互的 MCP(模型 - 控制器 - 持久层)服务器,它提供了 RESTful API,能帮助开发者更便捷地操作 Supabase 相关数据。
本服务器可在本地进行配置和使用,也能部署到 Smithery 平台。下面为你详细介绍操作步骤。
npm install
.env.example 文件并重命名为 .env,然后填写您的 Supabase 凭据:cp .env.example .env
npm install -g @smithery/cli
smithery login
smithery deploy
SUPABASE_URL:您的 Supabase 项目的 URLSUPABASE_KEY:您的 Supabase 项目的 API 密钥要本地启动服务器:
npm start
select:要返回的字段(可选)curl http://localhost:3000/api/users
curl http://localhost:3000/api/users?select=id,name,email
curl http://localhost:3000/api/users/123
curl -X POST http://localhost:3000/api/users \
-H "Content-Type: application/json" \
-d '{"name": "João", "email": "joao@exemplo.com"}'
curl -X PATCH http://localhost:3000/api/users/123 \
-H "Content-Type: application/json" \
-d '{"name": "João Silva"}'
部署完成后,您可以通过 Smithery 控制面板监控您的服务器: