DeepView MCP

Integrations

  • References repomix from GitHub for preparing codebases in AI-friendly formats (XML, JSON, or TXT)

  • Uses Gemini's large context window to analyze codebases, requiring a Gemini API key from Google AI Studio

  • Supports loading codebases formatted as XML files, particularly when created with tools like repomix

DeepView MCP

DeepView MCP 是一个模型上下文协议服务器,它使 Cursor 和 Windsurf 等 IDE 能够使用 Gemini 的广泛上下文窗口分析大型代码库。

特征

  • 从单个文本文件加载整个代码库(例如,使用 repomix 等工具创建)
  • 使用 Gemini 的大型上下文窗口查询代码库
  • 连接到支持 MCP 协议的 IDE,例如 Cursor 和 Windsurf
  • 可通过命令行参数配置 Gemini 模型选择

先决条件

安装

通过 Smithery 安装

要通过Smithery自动为 Claude Desktop 安装 DeepView:

npx -y @smithery/cli install @ai-1st/deepview-mcp --client claude

使用 pip

pip install deepview-mcp

用法

启动服务器

注意:您无需手动启动服务器。这些参数可以在 IDE 的 MCP 设置中配置(见下文)。

# Basic usage with default settings deepview-mcp [path/to/codebase.txt] # Specify a different Gemini model deepview-mcp [path/to/codebase.txt] --model gemini-2.0-pro # Change log level deepview-mcp [path/to/codebase.txt] --log-level DEBUG

代码库文件参数是可选的。如果未提供,则需要在查询时指定。

命令行选项

  • --model MODEL :指定要使用的 Gemini 模型(默认值:gemini-2.0-flash-lite)
  • --log-level {DEBUG,INFO,WARNING,ERROR,CRITICAL} :设置日志级别(默认值:INFO)

与 IDE (Cursor/Windsurf/...) 一起使用

  1. 打开 IDE 设置
  2. 导航至 MCP 配置
  3. 添加一个新的 MCP 服务器,配置如下:
    { "mcpServers": { "deepview": { "command": "/path/to/deepview-mcp", "args": [], "env": { "GEMINI_API_KEY": "your_gemini_api_key" } } } }

设置代码库文件是可选的。如果您使用相同的代码库,则可以使用以下配置设置默认代码库文件:

{ "mcpServers": { "deepview": { "command": "/path/to/deepview-mcp", "args": ["/path/to/codebase.txt"], "env": { "GEMINI_API_KEY": "your_gemini_api_key" } } } }

以下是指定要使用的 Gemini 版本的方法:

{ "mcpServers": { "deepview": { "command": "/path/to/deepview-mcp", "args": ["--model", "gemini-2.5-pro-exp-03-25"], "env": { "GEMINI_API_KEY": "your_gemini_api_key" } } } }
  1. 重新加载 MCP 服务器配置

可用工具

服务器提供了一个工具:

  1. deepview :询问有关代码库的问题
    • 必需参数: question - 有关代码库的问题
    • 可选参数: codebase_file - 查询前要加载的代码库文件的路径

准备代码库

DeepView MCP 需要一个包含您整个代码库的文件。您可以使用repomix以 AI 友好的格式准备您的代码库。

使用 repomix

  1. 基本用法:在项目目录中运行 repomix 以创建默认输出文件:
# Make sure you're using Node.js 18.17.0 or higher npx repomix

这将生成一个包含您的代码库的repomix-output.xml文件。

  1. 自定义配置:创建配置文件来自定义打包的文件和输出格式:
npx repomix --init

这将创建一个repomix.config.json文件,您可以编辑该文件以:

  • 包含/排除特定文件或目录
  • 更改输出格式(XML、JSON、TXT)
  • 设置输出文件名
  • 配置其他包装选项

repomix 配置示例

以下是repomix.config.json文件的示例:

{ "include": [ "**/*.py", "**/*.js", "**/*.ts", "**/*.jsx", "**/*.tsx" ], "exclude": [ "node_modules/**", "venv/**", "**/__pycache__/**", "**/test/**" ], "output": { "format": "xml", "filename": "my-codebase.xml" } }

有关 repomix 的更多信息,请访问repomix GitHub 存储库

执照

麻省理工学院

作者

德米特里·杰格蒂亚列夫 ( ddegtyaev@gmail.com )

-
security - not tested
A
license - permissive license
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

模型上下文协议服务器使 Cursor 和 Windsurf 等 IDE 能够使用 Gemini 的广泛上下文窗口分析大型代码库。

  1. Features
    1. Prerequisites
      1. Installation
        1. Installing via Smithery
        2. Using pip
      2. Usage
        1. Starting the Server
        2. Command-line Options
        3. Using with an IDE (Cursor/Windsurf/...)
        4. Available Tools
      3. Preparing Your Codebase
        1. Using repomix
        2. Example repomix Configuration
      4. License
        1. Author

          Related MCP Servers

          • -
            security
            A
            license
            -
            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 -
            1
            Python
            MIT License
            • Apple
            • Linux
          • -
            security
            F
            license
            -
            quality
            A server component of the Model Context Protocol that provides intelligent analysis of codebases using vector search and machine learning to understand code patterns, architectural decisions, and documentation.
            Last updated -
            4
            Python
          • -
            security
            A
            license
            -
            quality
            A Model Context Protocol (MCP) server designed to easily dump your codebase context into Large Language Models (LLMs).
            Last updated -
            0
            JavaScript
            Apache 2.0
          • 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
            6
            JavaScript
            MIT License

          View all related MCP servers

          ID: doiqobc4w3