MCPInstall
MCP-Server logo

MCP-Server

by kiranimmadi2 1 stars kiranimmadi2/MCP-Server

MCP Code Assistant: A Python tool that scans project folders, analyzes code structure, and helps with debugging to improve developer productivity.

READMEmain

🧠 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]
OptionDescription
--scanScan the project directory
--structurePrint the project structure
--analyze <file>Analyze a specific Python file
--search <regex>Search for a regex pattern in code
--bugsFind 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.

More Developer Tools MCP servers

Similar servers from the same category.

Sourcebot

sourcebot-dev

Enables code search across multiple repository hosts including GitHub, GitLab, Gitea, Gerrit, and Bitbucket with advanced filtering options for exploring large codebases through natural language queries.

searchgit

CodeAlive

codealive-ai

Provides a bridge to CodeAlive's platform for semantic code search, repository exploration, and context-aware chat completions that leverage deep understanding of entire codebases including documentation and dependencies.

search

Provides a secure, sandboxed environment for executing Python, Node.js, and shell commands in ephemeral containers with file management capabilities for code testing, visualization, and data analysis.

filesystemdatabase

NovaCV

lightbaby

Integrates with NovaCV API to generate, analyze, and convert resumes in various formats without dealing with complex document formatting

PDFSupport+5