About π§ MCP Code Assistant
π§ MCP Code Assistant analyzes codebases for coding agents, scanning projects, inspecting Python code, and finding common issues. Its capabilities are available through a CLI and Python library; a full MCP server mode is listed as a roadmap item.
Key features
- 01Scan project structure and code files
- 02Extract Python classes, functions, and imports
- 03Search code with regular expressions
- 04Detect common Python issues
- 05Update file contents programmatically
Use cases
- 01Map project structure and source files
- 02Inspect code elements in Python files
- 03Search patterns and check for potential bugs
MCP support
The project provides structured analysis for LLM consumption and can be used as an MCP tool backend. Full MCP server mode and JSON-RPC tool registration are listed on its roadmap.
Configuration
Local server config is the same for every client. Copy it into your clientβs MCP config file.
We havenβt collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEπ§ MCP-Based AI Code Analysis Tool
An AI-powered developer tool built on the Model Context Protocol (MCP) that enables LLM agents to interact with, analyze, and debug codebases via structured MCP tool calls β scanning project structure, extracting code elements, and detecting Python anti-patterns.
π Overview
MCP-Based AI Code Analysis Tool bridges the gap between LLM agents and real codebases. It exposes project structure, file contents, class/function maps, and bug detection as structured MCP-compatible tool calls β allowing AI agents (Claude, GPT-4, etc.) to reason about and navigate codebases without manual context injection.
Key capabilities:
- π MCP Tool Integration: Exposes codebase operations as structured tools consumable by LLM agents
- π Project Scanning: Maps your entire project structure and identifies all code files
- π§ Code Analysis: Extracts classes, functions, imports, and global variables from Python files
- π Pattern Searching: Searches your entire codebase for specific patterns using regex
- π Bug Detection: Identifies common Python bugs and anti-patterns
- π File Management: Updates file content programmatically
π Requirements
Python 3.6 or higher β No external libraries required (uses only Python standard library)
π§ Installation
git clone https://github.com/kiranimmadi2/MCP-Server.git
cd MCP-Server
π Usage
Command Line Interface
python mcp.py /path/to/your/project [options]
| Option | Description |
|---|---|
--scan | Scan the project directory |
--structure | Print the project structure |
--analyze <file> | Analyze a specific Python file |
--search <regex> | Search for a regex pattern in code |
--bugs | Find potential bugs in Python files |
Examples
# Scan and show structure
python mcp.py /path/to/project --scan --structure
# Analyze a file
python mcp.py /path/to/project --analyze path/to/file.py
# Find bugs
python mcp.py /path/to/project --bugs
π§© Using as a Python Library / MCP Tool Backend
from mcp import MCP
mcp = MCP("/path/to/your/project")
mcp.scan_project()
mcp.print_structure()
# Structured output for LLM consumption
analysis = mcp.analyze_python_file("path/to/file.py")
results = mcp.search_code(r"class\s+[A-Z][a-zA-Z0-9_]*")
bugs = mcp.find_bugs()
π£οΈ Roadmap
- Full MCP server mode with JSON-RPC tool registration
- LLM agent integration examples (Claude + LangChain)
- Support for JavaScript and TypeScript
- Code complexity scoring
π License
MIT License β see the LICENSE file for details.
Built with pure Python. Designed for the AI-native developer workflow.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.