modelscope·@davidvc/code-knowledge-mcptool
通过向量嵌入技术,为项目提供记忆库和RAG上下文支持,以增强代码理解和管理,并与RooCode和Cline集成。
一个使用向量嵌入技术的代码仓库知识管理工具。该工具利用先进的嵌入技术帮助维护和查询关于您的代码库的知识。
首先,您需要构建分发文件:
# Clone the repository
git clone https://github.com/yourusername/code-knowledge-tool.git
cd code-knowledge-tool
# Create and activate a virtual environment
python -m venv venv
source venv/bin/activate
# Install build tools
python -m pip install --upgrade pip build
# Build the package
python -m build
这将在 dist/ 目录中创建两个文件:
# Install Ollama (if not already installed)
curl https://ollama.ai/install.sh | sh
# Start Ollama service
ollama serve
# Navigate to where you built the package
cd /path/to/code_knowledge_tool
# Install from the wheel file
pip install dist/code_knowledge_tool-0.1.0-py3-none-any.whl
如果您希望修改工具或为其开发做出贡献,这个选项是最好的:
# Assuming you're already in the code-knowledge-tool directory
# and have activated your virtual environment
# Install in editable mode with development dependencies
pip install -e ".[dev]"
对于 Cline (VSCode):
# Open the settings file
open ~/Library/Application\ Support/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json
添加此配置:
{
"mcpServers": {
"code_knowledge": {
"command": "python",
"args": ["-m", "code_knowledge_tool.mcp_tool"],
"env": {
"PYTHONPATH": "${workspaceFolder}"
}
}
}
}
对于 RooCode:
# Open the settings file
open ~/Library/Application\ Support/RooCode/roocode_config.json
添加与上面相同的配置。
此工具可以充当您项目的记忆库和 RAG 上下文提供者。要进行设置,请执行以下步骤:
cp clinerules_template.md /path/to/your/project/.clinerules
模板包括有关以下内容的全面说明:
详见 clinerules_template.md 获取完整的配置和使用详情。
该项目遵循以集成测试为主的测试方法,侧重于端到端功能和 MCP 合约一致性。测试套件包括:
MCP 合约测试
包构建测试
要运行测试:
# Install test dependencies
pip install -e ".[dev]"
# Run all tests
pytest
# Run specific test suites
pytest tests/integration/test_mcp_contract.py -v # MCP functionality
pytest tests/integration/test_package_build.py -v # Installation verification
测试环境要求:
# Ensure Ollama is running
ollama serve
测试使用临时目录 (test_knowledge_store),该目录在每次测试运行之间自动清理。
有关测试策略和模式的更多详细信息,请参阅 docs/ 中的文档。
如果您希望通过 pip 提供此包(即 pip install code-knowledge-tool),则需要:
pip install twinetwine upload dist/*不过,目前请使用上述描述的本地构建和安装方法。
MIT 许可证
通过全局和分支特定的记忆库,管理跨 Claude AI 会话的项目文档和上下文的服务器,通过结构化的 JSON 文档存储实现一致的知识管理。
快递100 MCP Server提供快递信息查询、快递运费预估比价、快递时效查询(含发货前时效查询与在途动态时效查询)等功能。
一种模型上下文协议服务器,通过在语言模型交互之间高效缓存数据来减少令牌消耗,自动存储和检索信息以最小化冗余令牌使用。
通过集成DeepSeek R1的高级推理引擎以处理复杂推理任务,从而增强Claude推理能力的服务器。
通过简化的SOLID架构,启用提示词的创建、管理和模板化,允许用户按类别组织提示词并在运行时填充模板。
图片解读MCP,一键分析图片内容,提取文字,理解场景,让信息一目了然。