
Firestore MCP Server

2025.04.07
0
JavaScriptFirestore 接口数据库中间件数据库
Firestore MCP Server 是一个基于 Model Context Protocol (MCP) 的服务器,用于直接与 Google Firestore 交互。它提供了一个简洁的接口,通过 Claude Desktop 创建、读取、更新和删除 Firestore 文档。
View on GitHub
Overview
基本能力
产品定位
Firestore MCP Server 是一个中间件服务,旨在简化与 Google Firestore 的交互,特别适用于需要通过 Claude Desktop 操作 Firestore 的场景。
核心功能
- 创建 Firestore 集合中的文档
- 从 Firestore 集合中读取文档
- 更新现有文档
- 删除文档
- 通过过滤、排序和限制查询文档
- 列出可用集合
适用场景
- 需要通过 Claude Desktop 管理 Firestore 数据的开发场景
- 需要快速搭建 Firestore 操作接口的项目
- 需要批量操作 Firestore 数据的自动化任务
工具列表
- getDocument: 通过 ID 从集合中获取文档
- createDocument: 在集合中创建新文档
- updateDocument: 更新现有文档
- deleteDocument: 删除文档
- queryDocuments: 使用过滤器、排序和限制查询文档
- listCollections: 列出所有可用集合
使用教程
使用依赖
- 安装 Node.js 环境
- 确保有 Google Cloud 项目和服务账户凭证
安装教程
-
安装依赖:
npm install
-
构建项目:
npm run build
-
配置 Claude Desktop: 在
claude_desktop_config.json
中添加以下配置:json "firestore-mcp": { "command": "node", "args": [ "/path/to/firestore-mcp/build/index.js" ], "env": { "GOOGLE_CLOUD_PROJECTS": "project-id" } }
替换 args 中的路径为实际的 index.js 路径 在 GOOGLE_CLOUD_PROJECTS 中定义项目 ID 列表 确保 keys 文件夹中有每个项目的 .json 凭证文件
调试方式
- 使用开发模式:
npm run dev
- 检查日志输出
- 验证服务账户权限