DevInsight MCP

DevInsight MCP

Enables Claude to inspect, analyze, and grade local Git repositories with tools for stats, TODO scanning, git history, large file detection, health scores, and tech stack fingerprinting.

Category
访问服务器

README

DevInsight MCP

License: MIT Python 3.10+ MCP

A lightweight Model Context Protocol (MCP) server that gives Claude the ability to inspect, analyze, and grade local Git repositories.

Built with Anthropic's official Python MCP SDK, DevInsight demonstrates all three MCP primitives — Tools, Resources, and Prompts — through practical developer workflows: language stats, TODO tracking, git history, large-file detection, an overall repo health score, and technology-stack fingerprinting.


Demo

DevInsight demo

A live session driving the DevInsight tools against this very repository — repo stats, TODO scan, and large-file detection.


✨ Features

  • 📊 Repository statistics — languages, file counts, line counts
  • 📝 Scan projects for TODO, FIXME, HACK, and XXX
  • 📜 Summarize recent Git commits (author, date, message, +/- lines)
  • 📁 Detect oversized source files that are due for a refactor
  • 🩺 Score overall repository health (README/LICENSE/tests/git, TODO density, file size) with concrete recommendations
  • 🧰 Fingerprint a project's tech stack — languages, frameworks, databases, package managers, CI/CD, deployment
  • 🌳 Browse repositories through an MCP Resource
  • 🤖 Review and prioritize TODOs using an MCP Prompt

Scanning automatically skips noise: .git, .github, node_modules, virtualenvs, build/cache directories, lock files, and binary assets — see Repository Scanning below.


Why DevInsight?

Developers spend a surprising amount of time manually inspecting repositories:

  • searching for TODOs
  • checking Git history
  • counting files
  • finding oversized modules
  • judging whether a project is in good shape before diving in

DevInsight exposes these tasks as MCP tools so Claude can perform them for you, directly in conversation.

Instead of manually searching your project, you can simply ask:

"Summarize the last 10 commits."

"Find every TODO and tell me which ones are most important."

"Which files are becoming too large?"

"How healthy is this repo, and what should I fix first?"

"What's the tech stack of this project?"


Installation

Clone the repository

git clone https://github.com/AzamHosseinian/devinsight-mcp.git
cd devinsight-mcp

Create a virtual environment

python3 -m venv .venv
source .venv/bin/activate

Windows:

.venv\Scripts\activate

Install dependencies

pip install -r requirements.txt

Try it with the MCP Inspector

The easiest way to test the server standalone is with the official MCP Inspector:

mcp dev server.py

The Inspector lets you invoke every Tool, inspect Resources, test Prompts, and debug raw responses — all in the browser, no client app required.


Claude Desktop Setup

Add DevInsight to your claude_desktop_config.json:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "devinsight": {
      "command": "/absolute/path/to/devinsight-mcp/.venv/bin/python3",
      "args": [
        "/absolute/path/to/devinsight-mcp/server.py"
      ]
    }
  }
}

Using the virtual environment's Python interpreter (rather than a bare python) ensures Claude Desktop finds the mcp package regardless of what's active in your shell.

Fully quit and reopen Claude Desktop afterwards — it only reads this file on startup. Then try:

Use repo_stats on ~/projects/my-app

or

Review all TODOs in this repository.


Available Tools

Primitive Name Purpose
Tool repo_stats Language and line-count breakdown
Tool find_todos Find TODO / FIXME / HACK / XXX comments
Tool git_log_summary Summarize recent Git activity
Tool find_large_files Detect files exceeding a configurable size
Tool repo_health Overall 0-100 health score with recommendations
Tool tech_stack Detect languages, frameworks, databases, package managers, CI/CD, deployment
Resource repo://tree/{path} Render the repository tree
Prompt review_todos Ask Claude to prioritize TODOs

Usage examples

repo_stats(path="~/projects/my-app")
→ { "total_files": 142, "total_lines": 18734,
    "by_extension": { ".ts": {...}, ".tsx": {...}, ... } }

find_todos(path=".", max_results=50)
→ [ { "file": "src/api.ts", "line_number": 42,
      "tag": "TODO", "text": "handle retry backoff" }, ... ]

git_log_summary(path=".", count=5)
→ { "commits": [ { "hash": "a1b2c3d4", "author": "...", 
      "date": "2026-07-10", "message": "...", 
      "insertions": 12, "deletions": 3 }, ... ] }

find_large_files(path=".", threshold_lines=300)
→ [ { "file": "src/legacy/parser.py", "lines": 812 }, ... ]

repo_health(path=".")
→ { "score": 78,
    "checks": { "has_git": true, "has_readme": true,
                "has_license": true, "has_tests": false },
    "recommendations": [ "Add a test suite ..." ] }

tech_stack(path=".")
→ { "languages": ["Python"], "frameworks": ["FastAPI"],
    "databases": ["PostgreSQL"], "package_managers": ["pip"],
    "ci_cd": ["GitHub Actions"], "deployment": ["Docker"] }

Repository Scanning

Statistics tools (repo_stats, find_todos, find_large_files, repo_health) walk the repo while pruning directories as they go — ignored subtrees are never descended into.

Ignored directories: .git, .github, node_modules, venv, .venv, env, __pycache__, dist, build, .next, .nuxt, .svelte-kit, .idea, .vscode, target, coverage, htmlcov, .pytest_cache, .mypy_cache, .cache

Excluded from statistics: lock files (package-lock.json, pnpm-lock.yaml, yarn.lock, poetry.lock, Cargo.lock, Gemfile.lock, composer.lock, uv.lock, bun.lockb) and binary assets (.png, .jpg, .jpeg, .gif, .pdf, .zip, .exe, .dll) — these are real project content, but noise in line/size stats.

tech_stack looks at these same files directly, since a lock file's mere presence is a useful package-manager signal.


Architecture

               Claude Desktop
                      │
                      ▼
             DevInsight MCP Server
                      │
      ┌───────────────┼───────────────┐
      ▼               ▼               ▼
 Git Repository   File System     Git History

Project Structure

devinsight-mcp/
├── server.py
├── requirements.txt
├── pyproject.toml
├── README.md
├── docs/
│   ├── demo.gif
│   ├── demo.tape
│   └── demo_cli.py
└── .gitignore

Roadmap

  • [x] Repository statistics
  • [x] TODO scanner
  • [x] Git history summaries
  • [x] Large file detection
  • [x] Repository tree resource
  • [x] TODO review prompt
  • [x] Overall repo health score
  • [x] Tech stack detection
  • [ ] Lint summary tool
  • [ ] GitHub Issues integration
  • [ ] Dependency vulnerability analysis
  • [ ] Pull request insights

Tech Stack

  • Python
  • Anthropic MCP Python SDK
  • Git
  • Claude Desktop
  • Model Context Protocol (MCP)

Contributing

Contributions, suggestions, and feedback are welcome.

If you'd like to improve DevInsight, feel free to open an issue or submit a pull request.


License

MIT — see LICENSE.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选