Skip to main content
Glama

MCP Codebase Insight

by tosin2013

MCP 代码库洞察 - 开发中

🚧开发正在进行中

该项目正在积极开发中。功能和文档正在持续更新。

概述

MCP Codebase Insight 是一个通过语义分析、模式检测和文档管理来分析和理解代码库的系统。

目前发展状况

已完成的功能

  • ✅ 核心向量存储系统
  • ✅ 基础知识库
  • ✅ SSE 集成
  • ✅ 测试框架
  • ✅ TDD 和调试框架(rules_template 集成)

进行中

  • 🔄 文档管理系统
  • 🔄 高级模式检测
  • 🔄 性能优化
  • 🔄集成测试
  • 🔄 调试实用程序增强

计划

  • 📋 扩展 API 文档
  • 📋 自定义模式插件
  • 📋 高级缓存策略
  • 📋 部署指南
  • 📋 全面的错误跟踪系统

快速入门

  1. 安装
    pip install mcp-codebase-insight
  2. 基本用法
    from mcp_codebase_insight import CodebaseAnalyzer analyzer = CodebaseAnalyzer() results = analyzer.analyze_code("path/to/code")
  3. 运行测试
    # 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
  4. 调试实用程序
    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)原则:

  1. 先写一个失败的测试(红色)
  2. 编写最少的代码以使测试通过(绿色)
  3. 重构干净的代码,同时保持测试通过(重构)

我们的 TDD 文档可以在docs/tdd/workflow.md中找到。

调试框架

我们使用 Agans 的 9 条调试规则:

  1. 了解系统
  2. 让它失败
  3. 停止思考,看看
  4. 分而治之
  5. 一次改变一件事
  6. 保留审计线索
  7. 检查插头
  8. 获得全新视角
  9. 如果你没有修复它,它就没有修复

docs/debuggers/agans_9_rules.md中了解有关我们的调试方法的更多信息。

文档

贡献

欢迎大家贡献!详情请参阅我们的贡献指南

执照

该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅LICENSE文件。

支持

-
security - not tested
F
license - not found
-
quality - not tested

模型上下文协议的服务器组件,使用向量搜索和机器学习提供代码库的智能分析,以了解代码模式、架构决策和文档。

  1. 概述
    1. 目前发展状况
      1. 已完成的功能
      2. 进行中
      3. 计划
    2. 快速入门
      1. 测试和调试
        1. 测试驱动开发
        2. 调试框架
      2. 文档
        1. 贡献
          1. 执照
            1. 支持

              Related MCP Servers

              • A
                security
                A
                license
                A
                quality
                A Model Context Protocol (MCP) server that provides code analysis capabilities using tree-sitter, designed to give Claude intelligent access to codebases with appropriate context management.
                Last updated -
                26
                33
                Python
                MIT License
                • Apple
                • Linux
              • -
                security
                A
                license
                -
                quality
                A Model Context Protocol server that enables IDEs like Cursor and Windsurf to analyze large codebases using Gemini's extensive context window.
                Last updated -
                17
                Python
                MIT License
              • A
                security
                F
                license
                A
                quality
                A 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 -
                28
                3
                Python
              • A
                security
                A
                license
                A
                quality
                A 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 -
                3
                14
                JavaScript
                MIT License

              View all related MCP servers

              MCP directory API

              We provide all the information about MCP servers via our MCP API.

              curl -X GET 'https://glama.ai/api/mcp/v1/servers/tosin2013/mcp-codebase-insight'

              If you have feedback or need assistance with the MCP directory API, please join our Discord server