
用于与兼容MCP的AI模型集成到光标中的MCP服务器
概览
Chroma 开源嵌入数据库的模型上下文协议(MCP)服务器集成。 Chroma MCP 服务器为 AI 辅助开发创建了一个持久且可搜索的“工作内存”: - AI 助手可以查询过去会话中的相关信息 - 通过 MCP 将关键决策和洞察存储在 ChromaDB 中 - 与 IDE 工作流集成,创建统一的知识中心 - 跟踪和索引代码变更 - 通过增强上下文捕捉记录AI交互(代码差异、工具序列) - 将讨论与代码变更连接起来,追踪功能演变 - 保留逻辑代码结构以实现更有意义的上下文检索 - MCP命令用于捕获和检索开发上下文 - 基于证据的代码变更验证和学习推广 - 从测试失败到验证修复和学习推广的全自动化工作流程。请参阅Pytest插件使用指南,将其整合到您的项目中。 更多详情请参阅《第二大脑入门指南》。
概述(AI 翻译)
Chroma 开源嵌入数据库的模型上下文协议(MCP)服务器集成。
概述
Chroma MCP 服务器为 AI 辅助开发创建了一个持久且可搜索的“工作内存”:
- 自动上下文回忆: AI 助手可以查询过去会话中的相关信息
- 开发者管理持久化: 通过MCP将关键决策和洞察存储在ChromaDB
- 第二大脑集成: 与IDE工作流程集成,创建统一的知识中心
主要特点:
- 自动化代码库索引: 跟踪和索引代码变更
- 自动聊天记录: 记录AI交互并增强上下文捕捉(代码差异、工具序列)
- 双向链接: 将代码变更的讨论连接起来,用于追踪功能演进
- 语义代码分块: 保留逻辑代码结构以实现更有意义的上下文检索
- 工作内存工具: 用于捕获和检索开发上下文的MCP命令
- 验证系统: 基于证据的代码变更验证和学习推广
- 自动化测试驱动学习: 从测试失败到验证修复和学习推广的全自动化工作流程。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Chroma MCP Server
A Model Context Protocol (MCP) server integration for Chroma, the open-source embedding database.
Overview
Chroma MCP Server creates a persistent, searchable “working memory” for AI-assisted development:
- Automated Context Recall: AI assistants can query relevant information from past sessions
- Developer-Managed Persistence: Store key decisions and insights in ChromaDB via MCP
- Second Brain Integration: Integrates with IDE workflows to create a unified knowledge hub
Key features:
- Automated Codebase Indexing: Track and index code changes
- Automated Chat Logging: Log AI interactions with enhanced context capture (code diffs, tool sequences)
- Bidirectional Linking: Connect discussions to code changes for tracing feature evolution
- Semantic Code Chunking: Preserve logical code structures for more meaningful context retrieval
- Working Memory Tools: MCP commands for capturing and retrieving development context
- Validation System: Evidence-based validation for code changes and learning promotions
- Automated Test-Driven Learning: Fully automated workflow from test failure to verified fix and learning promotion. See the Pytest Plugin Usage Guide to integrate this into your projects.
See the Getting Started with your Second Brain guide for more details.
Quick Start
Installation
# Basic installation
pip install chroma-mcp-server
# Full installation with all embedding models
pip install "chroma-mcp-server[full]"
Running
# With in-memory storage (data lost on restart)
chroma-mcp-server --client-type ephemeral
# With persistent storage
chroma-mcp-server --client-type persistent --data-dir ./my_data
Cursor Integration
Add or modify .cursor/mcp.json in your project root:
{
"mcpServers": {
"chroma": {
"command": "uvx",
"args": [
"chroma-mcp-server"
],
"env": {
"CHROMA_CLIENT_TYPE": "persistent",
"CHROMA_DATA_DIR": "/path/to/your/data",
"CHROMA_LOG_DIR": "/path/to/your/logs",
"LOG_LEVEL": "INFO",
"MCP_LOG_LEVEL": "INFO",
"MCP_SERVER_LOG_LEVEL": "INFO"
}
}
}
}
Recent Improvements
- Enhanced Context Capture: Automatically extracts code diffs, tool sequences, and assigns confidence scores
- Bidirectional Linking: Creates navigable connections between chat discussions and code changes
安装
uvx chroma-mcp-server配置
{
"mcpServers": {
"chroma": {
"command": "uvx",
"args": [
"chroma-mcp-server"
],
"env": {
"CHROMA_CLIENT_TYPE": "persistent",
"CHROMA_DATA_DIR": "/path/to/your/data",
"CHROMA_LOG_DIR": "/path/to/your/logs",
"LOG_LEVEL": "INFO",
"MCP_LOG_LEVEL": "INFO",
"MCP_SERVER_LOG_LEVEL": "INFO"
}
}
}
}