code-explainer
Cloudflare Workers MCP server: code-explainer
使うべきか
品質と安全性
ツール定義とプロトコルへの準拠に関する自動分析に基づいています。
コンテキストコスト
これは、サーバーのツールがモデルのコンテキストに読み込まれるたびに消費されるおおよそのトークン数です。数が多いほど、ほかのタスクに使える注意が減ります。
インストール
ワンクリックインストール
これを `claude_desktop_config.json` ファイルに追加してください:
{
"mcpServers": {
"code-explainer": {
"url": "https://api.lazy-mac.com/code-explainer/mcp"
}
}
}リモートエンドポイント
https://api.lazy-mac.com/code-explainer/mcpstreamable-httpできること
ツール一覧
ツール(6)
⚪detect_language(code)
Detect the programming language of a code snippet. Returns the detected language and confidence level.
入力スキーマ
{
"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.
入力スキーマ
{
"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.
入力スキーマ
{
"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.
入力スキーマ
{
"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.
入力スキーマ
{
"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.
入力スキーマ
{
"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"
]
}コミュニティ
エビデンス