mcp-architect
mcp-architect is an MCP server that gives AI assistants a structured, local, and private architectural understanding of any codebase — no API keys, network calls, or external models required.
architecture_overview– Get a high-level map of a repository: detected languages, frameworks, file count, lines of code, top-level structure, and entry points. The best starting point for understanding an unfamiliar codebase.dependency_graph– Analyze how internal modules import each other, identify the most-depended-upon architectural hub modules, and detect circular dependencies. Supports Python and JavaScript/TypeScript with auto-detection.hotspots– Find files most deserving attention based on size, complexity, git change frequency, or combined risk score (configurable, default top 10 per category).explain– Deep-dive into a specific folder or file: lists its sub-files, public classes/functions, and external dependencies.Impact analysis – Determine what breaks if a specific component changes, including direct importers, transitive blast radius, and hub risk.
Runs entirely locally using Python's standard library (ast, os, re), with no heavy dependencies. Compatible with Claude Desktop, Cursor, Windsurf, Cline, and any MCP client.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-architect Give me an architecture overview, dependency graph, and hotspots for ~/code/my-app."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
🏛️ mcp-architect
Stop pasting your file tree into Claude. Give any AI assistant real architectural understanding of a codebase — local, private, zero‑config.
AI coding assistants are great at files but blind to architecture. Every session you re‑explain the structure, paste the file tree, and hope it guesses your module boundaries right. mcp-architect is an MCP server that hands your assistant a structured map of any codebase — tech stack, dependency graph, hotspots, and module summaries — computed 100% locally with no API keys and no model required.
It works with Claude Desktop, Cursor, Windsurf, Cline, or any MCP client.
Why
Without mcp-architect | With mcp-architect |
"Here's my file tree, please figure out the structure…" |
|
AI guesses how modules relate |
|
"Which files matter?" |
|
Re‑explaining a package every time |
|
Everything runs on your machine. Your code never leaves it.
Related MCP server: Code-Index-MCP
Quickstart
Install
pip install mcp-architect…or skip the install entirely and let your MCP client fetch it on demand with uvx (shown below).
1. Add it to your MCP client
Claude Desktop — edit claude_desktop_config.json:
{
"mcpServers": {
"architect": {
"command": "uvx",
"args": ["mcp-architect"]
}
}
}Prefer pip?
pip install mcp-architect. Or run the latest straight from source:{ "mcpServers": { "architect": { "command": "uvx", "args": ["--from", "git+https://github.com/kannajune/mcp-architect", "mcp-architect"] } } }
Restart your client. That's it — no keys, no model download.
2. Ask your assistant
"Use the architect tools to give me an overview of
~/code/my-app, then show me its dependency graph and the highest‑risk files."
What you get
# Architecture Overview — my-app
**151 files · 17,368 lines of code**
## Languages
- **Python** — 93 files, 13,683 LOC
- **TypeScript** — 23 files, 3,120 LOC
## Frameworks / key libraries
- FastAPI
- React
- Tailwind CSS
## Entry points
- main.py# Dependency Graph — my-app
**118 modules · 172 internal import edges**
## Most depended-upon (architectural hubs)
- `app.signals.signal_parser` — imported by 12 modules
- `app.core.integrations_registry` — imported by 11 modules
## Circular dependencies
✅ no circular dependencies foundTools
Tool | What it tells the AI |
| Languages, frameworks, ecosystems, size, top‑level structure, entry points |
| Internal import graph, architectural hubs, circular dependencies |
| What breaks if you change X — direct importers + transitive blast radius, hub risk |
| Largest / most complex / most‑changed (git) / highest‑risk files |
| Deep‑dive a folder or file: classes, functions, external deps |
Design principles
Zero heavy dependencies. Pure Python standard library for all analysis (
ast,os,re). The only runtime dep is the MCP SDK itself. Installs in seconds.Local & private. No network calls, no telemetry, no LLM. Your source never leaves your machine.
Language‑aware. Full AST parsing for Python; import parsing for JavaScript/TypeScript; file/LOC stats for 25+ languages.
Decoupled core. The analysis layer (
mcp_architect.analysis) is importable and testable on its own — use it as a plain Python library too.
from mcp_architect.analysis import get_overview, get_dependency_graph
print(get_overview("~/code/my-app")["frameworks"])The dependency and complexity analysis is heuristic — designed to give an AI useful, fast situational awareness, not to replace a full static analyzer.
Pin to one project (optional)
Set MCP_ARCHITECT_ROOT so tools default to a fixed repo and you can omit paths:
{ "mcpServers": { "architect": {
"command": "uvx", "args": ["mcp-architect"],
"env": { "MCP_ARCHITECT_ROOT": "/Users/you/code/my-app" }
} } }How it compares
mcp-architect isn't a semantic search engine or a context packer — it's a structural lens any AI assistant can call on demand. It's designed to complement the tools below, not replace them:
Tool / approach | Great at | What mcp-architect adds |
Cursor codebase indexing | Semantic snippet retrieval, inside Cursor | Works in any MCP client (Claude Desktop, Cline, Windsurf, Cursor…), 100% local (no cloud embeddings), and returns architecture — dependency graph, cycles, hotspots — not just relevant snippets |
Serena (LSP-based code agent) | Precise symbol-level navigation & edits | Zero-config, zero heavy deps (stdlib — no language servers to install) and a high-level architectural map instead of symbol-by-symbol operations |
RepoPrompt (context packing) | Hand-picking files into a prompt | The assistant pulls structured architecture on demand via tools — no manual file selection, no token-budget juggling |
In one line: Cursor and Serena help the AI read your code; mcp-architect helps it understand the architecture — locally, in any client. They stack well together.
Roadmap
Layered‑architecture / boundary‑violation detection
Go, Rust & Java import graphs
Optional local‑LLM (Ollama) narrative summaries
comparetool for before/after architecture diffs
Contributions welcome — see CONTRIBUTING.
Contributing
PRs and issues welcome! Run the tests with:
pip install -e ".[dev]"
pytestLicense
MIT © Kannan Dharmalingam
Available Tools
5 toolsarchitecture_overviewA
High-level map of a codebase: languages, frameworks, size, structure, and entry points. Start here to understand an unfamiliar repo.
Args: path: Repo path to analyze. Relative to the server's working directory (or MCP_ARCHITECT_ROOT if set). Defaults to the whole project.
Inputs: path. Returns: result
dependency_graphA
Map how internal modules import each other, the most-depended-upon modules, and any circular dependencies. Use to understand coupling.
Args: path: Repo path to analyze. language: 'auto', 'python', or 'js'/'ts'.
Inputs: path, language. Returns: result
explainA
Deep-dive a single folder or file: its files, public classes/functions, and external dependencies.
Args: path: Repo root. module: Sub-path within the repo (folder or file) to explain.
Inputs: path, module. Returns: result
hotspotsA
Find the files most worth attention: largest, most complex, most frequently changed (git), and highest combined risk.
Args: path: Repo path to analyze. top: How many files per category (default 10).
Inputs: path, top. Returns: result
impact_analysisA
What could break if you change target? Walks the import graph backwards
to list direct importers and the full transitive blast radius, and flags
whether the target is a high-risk hub. Use before editing/refactoring a module.
Args: target: Module or file to analyze, e.g. "app/core/db.py" or "app.core.db". If omitted, returns the highest-impact modules to pick from. path: Repo root. language: 'auto', 'python', or 'js'/'ts'.
Inputs: target, path, language. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool targets a distinct aspect of code analysis: high-level overview, dependency mapping, deep-dive explanation, complexity hotspots, and impact analysis. There is no overlap in purpose.
Four tools use descriptive noun phrases (architecture_overview, dependency_graph, hotspots, impact_analysis), but 'explain' is a single verb, breaking the pattern. The naming is still clear and mostly consistent.
Five tools cover the essential code analysis tasks without being excessive or insufficient. The set is well-scoped for a codebase exploration and refactoring server.
The tools cover the main analysis needs: high-level orientation, dependency understanding, detailed module explanation, risk identification, and change impact. No obvious gaps for the intended use cases.
Maintenance
Related MCP Connectors
Codebase intelligence for AI agents — dead code, blast radius, ownership.
Give your AI agent a persistent map of your project's structure, dependencies, and bugs.
Project memory for every AI. Pick up where you left off in Claude, ChatGPT or Cursor, with a team.
Your own memory for every AI: Claude, ChatGPT, Cursor, Zed and more. Brings in 20+ sources.
Related MCP Servers
- AlicenseAqualityDmaintenanceA coding agent toolkit that provides IDE-like semantic code retrieval and editing tools, enabling LLMs to efficiently navigate and modify codebases at the symbol level rather than working with entire files.29MIT
- AlicenseNot gradedqualityBmaintenanceLocal-first code indexer that provides deep code understanding for Claude and other LLMs with symbol/text search across 48+ languages, semantic search capabilities, and real-time index updates through the Model Context Protocol.60MIT
- AlicenseNot gradedqualityAmaintenanceSemantic code indexer with GraphRAG knowledge graph. Index your codebase, search in natural language, and expose everything via MCP so AI agents understand architecture — not just files.523Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables AI coding tools to query your live codebase for routes, import graph, domain context, and blast radius, eliminating hallucinations about project structure.37 npm80MIT