Skip to main content
Glama
ai-1st

DeepView MCP

by ai-1st

DeepView MCP

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

PyPI 版本 铁匠徽章

特征

  • 从单个文本文件加载整个代码库(例如,使用 repomix 等工具创建)

  • 使用 Gemini 的大型上下文窗口查询代码库

  • 连接到支持 MCP 协议的 IDE,例如 Cursor 和 Windsurf

  • 可通过命令行参数配置 Gemini 模型选择

Related MCP server: @lex-tools/codebase-context-dumper

先决条件

安装

通过 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 )

A
license - permissive license
Not graded
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

View all related MCP servers

Related MCP Connectors

  • A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…

  • A Model Context Protocol server for Wix AI tools

  • An MCP server that gives your AI access to the source code and docs of all public github repos

View all MCP Connectors

Latest Blog Posts

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/ai-1st/deepview-mcp'

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