read_fileLABSCO SUMMARY
Read-only code navigation, plus one tool that writes.
The search and structure tools are the useful core — they let an agent locate a symbol and read a file's shape without loading the tree into context. update_with_architecture is different in kind: it calls a model and edits a file on disk, so it wants a key and a moment's thought before you point it anywhere.
What it is
A code-analysis server in three groups: file access, regex search across the tree, and structural analysis of a single file.
What you get
- read_file returns a file's contents; list_files lists a directory with glob matching and optional recursion; file_info reports size, type and line count
- search_code runs a regex over the tree, filtered by file pattern and optionally case-insensitive
- find_definition locates where a function, class or variable is declared, with a language hint for Python or JavaScript
- analyze_structure reports a file's imports, classes and functions, optionally including docstrings
- update_with_architecture compares an old and a new version of a module and rewrites the new one to match, taking a backup first
- Parsing covers Python, JavaScript and TypeScript, Java, C and C++, Go, Rust and Ruby among others
- File access is restricted against directory traversal and search results are capped, so one bad query cannot flood the context
Requirements
Python with the project's dependencies installed, run as a local process. The rewrite tool calls out to a model and needs a key for either OpenAI or Anthropic, chosen by configuration; everything else runs offline.
Setup effort
Build from source — git clone https://github.com/zeocax/code-mcp
USE CASES
Finding where something is defined in an unfamiliar repo
Look up the symbol directly, and fall back to a regex sweep when the declaration is not where you expected.
Getting a file's shape before reading it
List its imports, classes and functions, and check how long it actually is, before deciding to read the whole thing.
Hunting down every leftover marker or deprecated call
Run one regex across the matching files in the tree and get the hits with their locations.
Porting a module to a newer architecture
Point the rewrite tool at the old and new versions and let it reconcile them, with the original backed up first.
7 tools
Listed in project docs. Your client may show a different list.
list_filesfile_infosearch_codefind_definitionanalyze_structureupdate_with_architectureBEFORE YOU INSTALL
What to know first
Tools you get
7 tools named in the project's documentation.
Where it runs
Both documented clients run the server on your machine.
INSTALLATION
Connect your client
Server setup
# Clone the repository
git clone https://github.com/zeocax/code-mcp
cd code-mcp
# Create virtual environment
python -m venv venv
# Activate environment
source venv/bin/activate # On Unix/macOS
venv\Scripts\activate # On Windows
# Install dependencies
pip install -r requirements.txtMCP Clients
Claude Desktop
{
"mcpServers": {
"code-analyzer": {
"command": "python",
"args": [
"<YOUR_PATH_TO_CODE_MCP>/server.py"
]
}
}
}Continue
{
"models": [],
"mcpServers": {
"code-analyzer": {
"command": "python",
"args": [
"<YOUR_PATH_TO_CODE_MCP>/server.py"
]
}
}
}