MCP 代码库洞察 - 开发中
🚧开发正在进行中
该项目正在积极开发中。功能和文档正在持续更新。
概述
MCP Codebase Insight 是一个通过语义分析、模式检测和文档管理来分析和理解代码库的系统。
目前发展状况
已完成的功能
✅ 核心向量存储系统
✅ 基础知识库
✅ SSE 集成
✅ 测试框架
✅ TDD 和调试框架(rules_template 集成)
进行中
🔄 文档管理系统
🔄 高级模式检测
🔄 性能优化
🔄集成测试
🔄 调试实用程序增强
计划
📋 扩展 API 文档
📋 自定义模式插件
📋 高级缓存策略
📋 部署指南
📋 全面的错误跟踪系统
快速入门
安装
pip install mcp-codebase-insight基本用法
from mcp_codebase_insight import CodebaseAnalyzer analyzer = CodebaseAnalyzer() results = analyzer.analyze_code("path/to/code")运行测试
# Run all tests pytest tests/ # Run unit tests pytest tests/unit/ # Run component tests pytest tests/components/ # Run tests with coverage pytest tests/ --cov=src --cov-report=term-missing调试实用程序
from mcp_codebase_insight.utils.debug_utils import debug_trace, DebugContext, get_error_tracker # Use debug trace decorator @debug_trace def my_function(): # Implementation # Use debug context with DebugContext("operation_name"): # Code to debug # Track errors try: # Risky operation except Exception as e: error_id = get_error_tracker().record_error(e, context={"operation": "description"}) print(f"Error recorded with ID: {error_id}")
测试和调试
测试驱动开发
该项目遵循测试驱动开发(TDD)原则:
先写一个失败的测试(红色)
编写最少的代码以使测试通过(绿色)
重构干净的代码,同时保持测试通过(重构)
我们的 TDD 文档可以在docs/tdd/workflow.md中找到。
调试框架
我们使用 Agans 的 9 条调试规则:
了解系统
让它失败
停止思考,看看
分而治之
一次改变一件事
保留审计线索
检查插头
获得全新视角
如果你没有修复它,它就没有修复
在docs/debuggers/agans_9_rules.md中了解有关我们的调试方法的更多信息。
文档
贡献
欢迎大家贡献!详情请参阅我们的贡献指南。
执照
该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅LICENSE文件。
支持
Related MCP Servers
- AsecurityAlicenseAqualityA Model Context Protocol server that enables AI agents to retrieve and understand entire codebases at once, providing tools to analyze local workspaces or remote GitHub repositories.Last updated -353MIT License
- AsecurityFlicenseAqualityA comprehensive Model Context Protocol server for advanced code analysis that provides tools for syntax analysis, dependency visualization, and AI-assisted development workflow support.Last updated -284
- AsecurityAlicenseAqualityA Model Context Protocol server that helps large language models process code repositories by providing file tree generation, code merging, and code analysis capabilities.Last updated -322MIT License
CodeAlive MCPofficial
-securityAlicense-qualityA Model Context Protocol server that enhances AI agents by providing deep semantic understanding of codebases, enabling more intelligent interactions through advanced code search and contextual awareness.Last updated -54MIT License