Windsurf Supabase MCP 服务器
针对 Supabase 集成的 Windsurf 优化 MCP 服务器
此存储库包含针对 Windsurf 优化的 Supabase MCP 服务器版本,并进行了特别增强,以便与 Windsurf 编辑器无缝协作。它基于模型上下文协议(MCP) 标准构建,并添加了关键改进,以更好地处理错误、响应格式和 SQL 查询。
风帆冲浪的关键修改
1.增强错误处理
我们在使用原始错误处理系统时面临几个挑战:
- 格式错误的 SQL 查询会导致静默失败
- 流解析错误很难调试
- 错误消息不适合 LLM
我们的解决方案:
- 添加了具有详细上下文的结构化错误响应
- 改进错误消息,以便更好地理解 LLM
- 添加了 SQL 查询结构验证
- 增强的流错误检测和恢复
2. 响应格式
原始响应格式存在局限性:
- 不同响应类型的 JSON 结构不一致
- 缺少 UI 组件的元数据
- 有限类型安全
我们的改进:
- 标准化 JSON 响应格式
- 添加了用于 UI 组件生成的元数据
- 实现严格的 TypeScript 类型
- 增加了对流式复杂数据结构的支持
3. SQL 到 REST 的转换
我们增强了 SQL 到 REST 的转换:
- 增加了对更复杂的 SQL 操作的支持
- 改进的查询验证
- 更好地处理 JOIN 和子查询
- 增强无效 SQL 的错误消息
4. 身份验证和标头
身份验证处理方面的主要改进:
- 灵活的 API 密钥���理
- 支持持有者令牌认证
- 更好地管理 PostgREST 请求的标头
- 增强的安全验证
与 Windsurf 集成
该 MCP 服务器专门设计用于与 Windsurf 编辑器配合使用,提供:
- 通过自然语言进行无缝数据库交互
- 实时查询验证和更正
- 增强错误消息以便更好地调试
- 优化 UI 组件的响应格式
Windsurf 中的使用示例
安装
- 克隆此存储库:
- 安装依赖项:
- 配置您的 Supabase 连接:
与 Windsurf 一起使用
该服务器提供两个主要工具:
postgrestRequest
:增强的 PostgREST API 访问
sqlToRest
:改进了 SQL 到 REST 的转换
贡献
欢迎贡献代码!请阅读我们的贡献指南,详细了解我们的行为准则以及提交 Pull Request 的流程。
执照
本项目遵循 MIT 许可证。详情请参阅LICENSE文件。
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
模型上下文协议服务器针对 Supabase 与 Windsurf 编辑器的集成进行了优化,通过自然语言提供数据库交互,并增强了错误处理和响应格式。
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityThis server enables interaction with Supabase PostgreSQL databases through the MCP protocol, allowing seamless integration with Cursor and Windsurf IDEs for secure and validated database management.Last updated -11774PythonApache 2.0
- -securityAlicense-qualityA Model Context Protocol (MCP) server that allows interaction with PDF and EPUB documents, designed to work with Windsurf IDE by Codeium.Last updated -4PythonMIT License
- -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 -7903TypeScriptMIT License
- -securityAlicense-qualityA Model Context Protocol server that enables AI tools to interact with Supabase databases, providing tools for reading, creating, updating, and deleting records in Supabase tables.Last updated -PythonMIT License