DeepView MCP server

Enables AI-powered code analysis by loading entire codebases into Gemini's large context window, allowing developers to query and understand complex repositories through natural language interactions.
Back to servers
Setup instructions
Provider
Dmitry Degtyarev
Release date
Mar 26, 2025
Language
Python
Package
Stats
3.5K downloads
47 stars

DeepView MCP is a Model Context Protocol server designed to enable IDEs like Cursor and Windsurf to analyze large codebases using Gemini's extensive context window. It lets you load an entire codebase from a single text file and query it using Gemini's AI capabilities.

Prerequisites

Installation

Using pip

pip install deepview-mcp

Usage

Starting the Server

Note: You typically don't need to start the server manually. These parameters are configured in your MCP setup in your IDE.

# 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

The codebase file parameter is optional. If not provided, you'll need to specify it when making queries.

Command-line Options

  • --model MODEL: Specify the Gemini model to use (default: gemini-2.0-flash-lite)
  • --log-level {DEBUG,INFO,WARNING,ERROR,CRITICAL}: Set the logging level (default: INFO)

Using with an IDE

To use DeepView MCP with an IDE like Cursor or Windsurf:

  1. Open your IDE settings
  2. Navigate to the MCP configuration
  3. Add a new MCP server with the following configuration:
{
  "mcpServers": {
    "deepview": {
      "command": "/path/to/deepview-mcp",
      "args": ["/path/to/codebase.txt"],
      "env": {
        "GEMINI_API_KEY": "your_gemini_api_key"
      }
    }
  }
}
  1. Reload MCP servers configuration

Available Tools

The server provides one tool:

  • deepview: Ask a question about the codebase
    • Required parameter: question - The question to ask about the codebase
    • Optional parameter: codebase_file - Path to a codebase file to load before querying

Preparing Your Codebase

DeepView MCP requires a single file containing your entire codebase. You can use repomix to prepare your codebase in an AI-friendly format.

Using repomix

# Make sure you're using Node.js 18.17.0 or higher
npx repomix

This will generate a repomix-output.xml file containing your codebase.

Custom Configuration

Create a configuration file to customize which files get packaged and the output format:

npx repomix --init

This creates a repomix.config.json file that you can edit to:

  • Include/exclude specific files or directories
  • Change the output format (XML, JSON, TXT)
  • Set the output filename
  • Configure other packaging options

Example repomix Configuration

Here's an example repomix.config.json file:

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

For more information on repomix, visit the repomix GitHub repository.

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

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

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

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

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

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

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later