code-explainer
Cloudflare Workers MCP server: code-explainer
Should I use this
Quality & Safety
Based on automated analysis of tool definitions and protocol compliance.
Context Cost
This is the approximate number of tokens consumed each time the server's tools are loaded into a model's context. Higher counts reduce the attention available for other tasks.
Install
One-Click Install
Add this to your `claude_desktop_config.json` file:
{
"mcpServers": {
"code-explainer": {
"url": "https://api.lazy-mac.com/code-explainer/mcp"
}
}
}Remote endpoints
https://api.lazy-mac.com/code-explainer/mcpstreamable-httpWhat it can do
Tool inventory
Tools (6)
⚪detect_language(code)
Detect the programming language of a code snippet. Returns the detected language and confidence level.
Input Schema
{
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "The code snippet to analyze"
}
},
"required": [
"code"
]
}🟢explain_code(code, language)
Generate a natural language explanation of a code snippet including structural analysis, features, and summary.
Input Schema
{
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "The code snippet to explain"
},
"language": {
"type": "string",
"description": "Programming language (optional, auto-detected if omitted)"
}
},
"required": [
"code"
]
}⚪generate_docstring(code, language)
Generate JSDoc, Python docstring, Go godoc, or Rust doc comments for functions in the provided code.
Input Schema
{
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "The code snippet containing functions to document"
},
"language": {
"type": "string",
"description": "Programming language (optional, auto-detected if omitted)"
}
},
"required": [
"code"
]
}🟢analyze_complexity(code, language)
Analyze code complexity including cyclomatic complexity, cognitive complexity, nesting depth, and maintainability index.
Input Schema
{
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "The code snippet to analyze"
},
"language": {
"type": "string",
"description": "Programming language (optional, auto-detected if omitted)"
}
},
"required": [
"code"
]
}🟢suggest_refactor(code, language)
Get prioritized refactoring suggestions for code quality improvements.
Input Schema
{
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "The code snippet to review for refactoring opportunities"
},
"language": {
"type": "string",
"description": "Programming language (optional, auto-detected if omitted)"
}
},
"required": [
"code"
]
}🟢analyze_all(code, language)
Run all five analyses in one call: language detection, natural-language explanation, docstring generation, complexity metrics, and refactoring suggestions.
Input Schema
{
"type": "object",
"properties": {
"code": {
"type": "string",
"description": "The code snippet to analyze"
},
"language": {
"type": "string",
"description": "Programming language (optional, auto-detected if omitted)"
}
},
"required": [
"code"
]
}Community
Evidence