Code Analysis

Provides code analysis through file operations, code search, and structure analysis via an MCP server.
  • python

0

GitHub Stars

python

Language

5 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "zeocax-code-mcp": {
      "command": "python",
      "args": [
        "/absolute/path/to/code-mcp/server.py"
      ]
    }
  }
}

You have a modular MCP (Model Context Protocol) server for code analysis that provides file operations, code search, and code structure analysis. It lets you read files, inspect project structure, search with regex, and locate definitions across your codebase, all through a lightweight protocol that works with compatible clients.

How to use

To use this MCP server, connect your MCP client (such as Claude Desktop or Continue.dev) to the local Python server you run from the provided entry point. You will issue commands to read files, list files, fetch file metadata, search code, find symbol definitions, and analyze code structure. The server exposes a simple set of tools that you can call from your client to interact with your codebase.

How to install

# Prerequisites
# - Git
# - Python 3.8+ (virtual environments recommended)

# Clone the repository
git clone https://github.com/yourusername/code-mcp.git
cd code-mcp

# Create a virtual environment
python -m venv venv

# Activate the environment
# Unix/macOS
source venv/bin/activate
# Windows
venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

Configure a client to run the server

Configure your MCP client to launch the code analysis server by pointing it at the Python script that runs the MCP server. The following example shows how to reference the server script as the command with its path. You can place this in your client’s configuration file under mcpServers.

{
  "mcpServers": {
    "code-analyzer": {
      "command": "python",
      "args": ["/absolute/path/to/code-mcp/server.py"]
    }
  }
}

Start and use the server with a client

After configuring, start your client and connect to the local server. Use the available tools to read files, list directories, inspect file metadata, search code, locate definitions, and analyze the code structure. Each tool returns structured results you can feed into your development workflow.

Available tools

read_file

Read the contents of a file by path with optional encoding.

list_files

List files in a directory with optional pattern matching and recursion.

file_info

Get detailed information about a file, including size and type.

search_code

Search code files for patterns using regular expressions with optional directory and file pattern filters.

find_definition

Find where a symbol is defined, such as functions, classes, or variables.

analyze_structure

Analyze the code structure, including imports, classes, and functions.

update_with_architecture

Compare old and new architecture versions and intelligently update the target file.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational