MCP Server

code-explainer

io.github.lazymac2x/code-explainer
Developer Tools Public & reachable MCP 2026-07-28

What this MCP does

Analyzes source code by detecting its language, explaining structure, generating documentation, measuring complexity, and suggesting refactoring.

analyze_all
Run all five analyses in one call: language detection, natural-language explanation, docstring generation, complexity metrics, and refactoring suggestions.
Input schema
{'type': 'object', 'required': ['code'], 'properties': {'code': {'type': 'string', 'description': 'The code snippet to analyze'}, 'language': {'type': 'string', 'description': 'Programming language (optional, auto-detected if omitted)'}}}
analyze_complexity
Analyze code complexity including cyclomatic complexity, cognitive complexity, nesting depth, and maintainability index.
Input schema
{'type': 'object', 'required': ['code'], 'properties': {'code': {'type': 'string', 'description': 'The code snippet to analyze'}, 'language': {'type': 'string', 'description': 'Programming language (optional, auto-detected if omitted)'}}}
detect_language
Detect the programming language of a code snippet. Returns the detected language and confidence level.
Input schema
{'type': 'object', 'required': ['code'], 'properties': {'code': {'type': 'string', 'description': 'The code snippet to analyze'}}}
explain_code
Generate a natural language explanation of a code snippet including structural analysis, features, and summary.
Input schema
{'type': 'object', 'required': ['code'], 'properties': {'code': {'type': 'string', 'description': 'The code snippet to explain'}, 'language': {'type': 'string', 'description': 'Programming language (optional, auto-detected if omitted)'}}}
generate_docstring
Generate JSDoc, Python docstring, Go godoc, or Rust doc comments for functions in the provided code.
Input schema
{'type': 'object', 'required': ['code'], 'properties': {'code': {'type': 'string', 'description': 'The code snippet containing functions to document'}, 'language': {'type': 'string', 'description': 'Programming language (optional, auto-detected if omitted)'}}}
suggest_refactor
Get prioritized refactoring suggestions for code quality improvements.
Input schema
{'type': 'object', 'required': ['code'], 'properties': {'code': {'type': 'string', 'description': 'The code snippet to review for refactoring opportunities'}, 'language': {'type': 'string', 'description': 'Programming language (optional, auto-detected if omitted)'}}}
Added
analyze_all
Sept. 17, 2026, 12:43 p.m.
Added
suggest_refactor
Sept. 17, 2026, 12:43 p.m.
Added
analyze_complexity
Sept. 17, 2026, 12:43 p.m.
Added
generate_docstring
Sept. 17, 2026, 12:43 p.m.
Added
explain_code
Sept. 17, 2026, 12:43 p.m.
Added
detect_language
Sept. 17, 2026, 12:43 p.m.