You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Firebase MCP服务器在Cursor与Windsurf中显示“无可用工具”求助

Firebase MCP服务器在Cursor/Windsurf中始终返回"No tools available"的排查与解决建议

核心问题分析

你遇到的No tools available提示,结合Windsurf日志中的EROFS(只读文件系统)错误是关键线索:Firebase CLI的pglite组件尝试写入pglite-debug.log时,因所在目录为只读而失败,导致MCP服务器启动终止,最终编辑器无法识别可用工具。

针对性解决方案

1. 降级Firebase CLI版本

最新版Firebase CLI(引入pglite的版本)存在读写权限兼容问题,降级到稳定版本可快速解决:

  • 修改Cursor的.cursor/mcp.json配置,指定旧版CLI:
{
  "mcpServers": {
    "firebase": {
      "command": "npx",
      "args": ["-y", "firebase-tools@13.15.0", "experimental:mcp"]
    }
  }
}
  • Windsurf同理,在~/.codeium/windsurf/mcp_config.json中做相同修改。

2. 指定可写的pglite日志路径

通过环境变量强制pglite将日志写入有读写权限的目录:

  • 启动编辑器前,在终端执行:
export PGLITE_DEBUG_LOG=~/pglite-debug.log
  • 再从该终端启动Cursor/Windsurf,确保环境变量生效。
  • 也可直接在MCP配置中注入环境变量:
{
  "mcpServers": {
    "firebase": {
      "command": "npx",
      "args": ["-y", "firebase-tools@latest", "experimental:mcp"],
      "env": {
        "PGLITE_DEBUG_LOG": "/Users/yourname/pglite-debug.log"
      }
    }
  }
}

3. 调整Node.js版本

Node.js 22属于非LTS版本,Firebase CLI对其兼容性尚未完全适配,建议切换到LTS版本(18.x或20.x):

  • 使用nvm切换版本:
nvm install 20
nvm use 20

4. 手动启动MCP服务器再关联编辑器

先单独启动Firebase MCP服务器,确认无错误后,让编辑器连接已运行的服务器:

  • 终端执行:
npx -y firebase-tools@13.15.0 experimental:mcp
  • 查看服务器启动日志,确认监听地址(通常为http://localhost:3000)。
  • 修改编辑器MCP配置,替换为连接本地服务器:
{
  "mcpServers": {
    "firebase": {
      "serverUrl": "http://localhost:3000"
    }
  }
}

5. 检查编辑器权限

  • 确保Cursor/Windsurf拥有项目目录的读写权限(macOS需在「系统设置-隐私与安全性-文件与文件夹」中授权)。
  • 避免从只读目录(如系统盘根目录、受保护的系统文件夹)启动编辑器。

社区反馈参考

近期已有不少开发者遇到相同问题,核心原因集中在Firebase CLI最新版的pglite组件权限逻辑缺陷,降级到13.x版本是目前最普遍的有效解决方案。

内容的提问来源于stack exchange,提问作者Feebs

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.12 18:42:33