🧠 MCP Code Assistant

by kiranimmadi2

1 stars
277 downloads
Not rated
GitHub

About

MCP-Based AI Code Analysis Tool: 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.

Details

Author
kiranimmadi2
GitHub stars
1
Downloads
277
Categories
Developer Tools

- Scans entire project structure and identifies all code files
- Extracts classes, functions, imports, and global variables from Python files
- Searches codebase for patterns using regular expressions
- Detects common Python bugs and anti‑patterns
- Updates file content programmatically
- Works with pure Python standard library – no external dependencies

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name 🧠 MCP Code Assistant
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Clone the repository and run python mcp.py /path/to/your/project with command‑line options such as --scan, --structure, --analyze <file>, --search <regex>, or --bugs. It can also be imported as a Python library (from mcp import MCP) to produce structured outputs for LLM consumption.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "\ud83e\udde0 mcp code assistant": {
            "mcp-server-kiranimmadi2": {
                "command": "python",
                "args": [
                    "mcp.py",
                    "/path/to/your/project",
                    "[options]"
                ]
            }
        }
    }
}

McpServers

{
    "mcp-server-kiranimmadi2": {
        "command": "python",
        "args": [
            "mcp.py",
            "/path/to/your/project",
            "[options]"
        ]
    }
}

🧠 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.*

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.