Codex CLI的ChromaDB MCP服务器
带有22个高级工具的修补ChromaDB MCP服务器,用于批处理、EXIF提取和重复检测
______________________________________________________________________
快速开始
需求
安装前,请确保:
- Docker 桌面版 - 下载
- 安装前必须运行
- Node.js (v18+)- 下载
- 检查: node --version
- Codex CLI - 安装指南
- 检查: codex --version
______________________________________________________________________
安装
不需要git克隆。只需运行一个命令:
macOS/Linux:
curl -fsSL https://raw.githubusercontent.com/SANARP98/chromamcp-vespo/main/mcp/vespo-patched/setup-codex-vespo-mac.sh | bashWindows(PowerShell):
irm https://raw.githubusercontent.com/SANARP98/chromamcp-vespo/main/mcp/vespo-patched/setup-codex-vespo.ps1 | iex安装程序将:
- 从GitHub容器注册表中提取预构建的Docker镜像
- 启动具有持久存储的ChromaDB容器
- 提示您输入OpenAI API密钥(用于嵌入)
- 自动配置Codex CLI
卸载
macOS/Linux:
curl -fsSL https://raw.githubusercontent.com/SANARP98/chromamcp-vespo/main/mcp/vespo-patched/uninstall-codex-vespo-mac.sh | bashWindows(PowerShell):
irm https://raw.githubusercontent.com/SANARP98/chromamcp-vespo/main/mcp/vespo-patched/uninstall-codex-vespo.ps1 | iexDocker镜像
MCP服务器映像已发布到GitHub容器注册表:
docker pull ghcr.io/sanarp98/chromamcp-vespo:latest可用平台: linux/amd64 (英特尔/AMD), linux/arm64 (苹果硅、ARM)
______________________________________________________________________
安装后:重要
安装后,您 必须 重新启动环境:
对于VS Code用户:
- 完全退出VS代码 (文件→ 退出,而不仅仅是关闭窗口)
- 重新打开VS代码
- 关闭所有终端窗口 并开设一个全新的航站楼
对于终端用户:
- 完全关闭终端
- 打开一个新的终端会话
然后:
导航到要索引的存储库并运行Codex:
cd /path/to/your/project
codex通过首先摄取您的仓库,然后列出集合来测试它是否正常工作:
Smart ingest all files from the current directoryList chroma collections现在,您可以开始向Codex“使用上下文和 __________(您的问题或代码改进)__________\_\_\_\_\_\_
______________________________________________________________________
提示示例
以下是您可以与Codex一起使用的示例提示,用于摄取、索引和检索数据。
注: 集合名称会自动设置为您的存储库/文件夹名称,因此您不需要手动指定。
摄入文件
Ingest all files from the current directoryBatch ingest all JavaScript files from ./srcIngest the file ./README.mdScan this directory and tell me what files can be ingestedQuick load all Python files from ./scripts for searchingIngest all .ts and .tsx files recursively索引和管理收藏
List all chroma collectionsGet info about the current collectionExport the current collection to a JSON backup fileImport collection from ./backup/my-project.jsonDelete the current collectionFind duplicates in the current collection搜索和检索
Search for "authentication logic"Find similar patterns to "async function fetchData"Search for code that handles user loginFind all references to database connectionsSearch for error handling patternsFind code similar to this function: [paste your code]How does the API handle errors?Where is the user session managed?照片和EXIF操作
Extract EXIF data from ./photos/image.jpgIngest all photos from ./images with EXIF metadata extractionFind all photos taken with a Canon camera监视文件夹
Watch the folder ./incoming for new files and auto-ingest themList all active folder watchersStop watching the folder ./incoming重复检测
Find duplicate files in ./documentsCompare ./file1.txt and ./file2.txt to check if they are duplicatesFind duplicate entries in the current collection高级查询
Ingest all files from ./src excluding node_modules, then search for "API endpoint"Ingest all .tsx and .css files from ./appSearch across all collections for "database migration"Find code patterns similar to React hooksWhat design patterns are used in this codebase?______________________________________________________________________
包含什么
主代码位于 mcp/vespo已修补 目录:
核心文件
- index.js -主MCP服务器(22个工具)
- batch-processor.js -批量文件摄取
- exif-extractor.js -照片元数据提取
- watch-folder.js -自动摄取监测
- 复制检测器.js -文件重复数据删除
- package.json -依赖关系
- Dockerfile -容器配置
设置脚本
- setup-codex-vespo.js -主自动设置(Node.js)
- setup-codex-vespo-mac.sh -macOS/Linux安装包装器
- setup-codex-vespo.ps -Windows安装程序包装器
卸载脚本
- 卸载codex-espo.js -主自动卸载(Node.js)
- 卸载codes-espo-mac.sh -macOS/Linux卸载包装器
- 卸载codes-espo.ps -Windows卸载包装器
文档
- README.md -完整的安装和使用指南
- .env.示例 -配置模板
______________________________________________________________________
特性
- 22个MCP工具 用于ChromaDB操作
- 批处理 -一次摄入500多个文件
- 照片EXIF -提取相机、GPS、日期元数据
- 监视文件夹 -自动摄取新文件
- 重复检测 -按哈希查找重复文件
- 77种文件类型 -代码、文档、照片、CAD文件等。
- Codex CLI兼容 -在VS代码中使用ChatGPT
______________________________________________________________________
可用工具(共22个)
核心工具(5)
- 搜索文本 -在ChromaDB中搜索相关上下文(自动路由到本地/远程)
- store_context -在ChromaDB中存储新上下文(本地存储并同步到远程)
- list_collections -列出所有ChromaDB集合(本地和远程)
- 查找_相似_模式 -查找类似的代码模式(先搜索本地,然后搜索远程)
- get_environment -获取当前环境和ChromaDB路由信息
批处理文件处理工具(10)
- scan_directory -扫描目录并获取文件统计信息(摄取前预览)
- 批量生产 -通过元数据提取将文件从目录批量摄取到ChromaDB中
- 快速加载 -快速将文件加载到临时收藏中,以便快速搜索
- 卸载收集 -处理完毕后删除/卸载集合
- 出口收集 -将集合导出为JSON以进行备份或传输
- 重要收藏 -从JSON导出文件导入集合
- batch_delete -按ID或筛选器从集合中删除多个文档
- get_collection_info -获取收集的详细信息,包括文档计数
- ingest_file -使用自动类型检测和元数据摄取单个文件
- list_file_types -列出所有支持的文件类型和扩展名(77种类型)
照片和EXIF工具(1)
- 提取物 -从照片中提取详细的EXIF元数据(相机、镜头、GPS、日期)
监视文件夹工具(3)
- watch_folder -开始查看文件夹中的新文件并自动摄取它们
- 停止观察 -停止监视文件夹
- list_watchers -列出所有活动文件夹观察程序
重复检测工具(3)
- 查找重复项 -使用文件哈希查找目录中的重复文件
- 比较文件 -比较两个特定文件以检查它们是否重复
- 查找集合重复项 -查找ChromaDB集合中的重复条目
______________________________________________________________________
文档
有关详细的设置说明、故障排除和使用示例,请参阅:
______________________________________________________________________
项目结构
chromamcp-vespo/
├── README.md # This file
├── .gitignore # Git ignore rules
│
└── mcp/
└── vespo-patched/ # Main application
├── README.md # Detailed guide
├── setup-codex-vespo.js # Automated setup
├── setup-codex-vespo-mac.sh # macOS installer
├── setup-codex-vespo.ps1 # Windows installer
├── uninstall-codex-vespo.js # Automated uninstall
├── uninstall-codex-vespo-mac.sh # macOS uninstaller
├── uninstall-codex-vespo.ps1 # Windows uninstaller
├── index.js # MCP server
├── batch-processor.js # Batch operations
├── exif-extractor.js # Photo metadata
├── watch-folder.js # Folder monitoring
├── duplicate-detector.js # Duplicate detection
├── package.json # Dependencies
├── Dockerfile # Container setup
└── .env.example # Config template______________________________________________________________________
学分
- 源服务器: vespo92/chromadblocal mcp服务器
- 补丁:已申请符合Codex CLI标准
- MCP协议: 人类模型上下文协议
______________________________________________________________________
许可证
MIT许可证(继承自原始项目)
