Moth
Mothは、プロジェクトローカルなバグ修正分析と検証済み修正メモリのための軽量なMCPサーバーです。
Mothの機能
MothはMCPを通じてエラー出力を受け取り、機密情報を秘匿化し、障害を正規化し、可能性の高いスタックを検出し、プロジェクトローカルな修正メモリを確認し、構造化された修正概要を返します。
Mothはコードの編集、シェルコマンドの実行、リポジトリのクロール、バックエンドの要求、グローバルなバグデータベースの維持は行いません。
Related MCP server: looplens-mcp
なぜMothなのか?
バグ修正のコンテキストは、多くの場合プロジェクト固有のものです。失敗したコマンド、使用しているフレームワーク、周辺の設定、そしてそのリポジトリですでに機能した、あるいは失敗した修正などが該当します。
Mothはそのワークフローを小さく、明示的に保ちます。提供されたエラーコンテキストを分析し、最初の最適な修正案を提示し、検証済みの修正結果のみをプロジェクトローカルなメモリに記録します。
クイックスタート
Node.js 18以上が必要です。
直接実行する場合:
npx -y @stfade/moth moth-mcpまたはグローバルにインストールする場合:
npm install -g @stfade/moth
moth-mcp一般的なMCP設定
{
"mcpServers": {
"moth": {
"command": "npx",
"args": ["-y", "@stfade/moth", "moth-mcp"]
}
}
}使用例
MothをサポートされているAIエージェントで使用する場合、エラーと一緒に以下のような簡単なプロンプトを含めることができます。
"Use Moth to analyze this error before fixing it."
サポートされているクライアント
クライアント | ステータス | セットアップ |
Codex | ローカルプラグイン対応 | |
Claude Code | ローカルプラグイン対応 | |
Cursor | プラグイン構成 | |
Gemini CLI | 拡張機能構成 | |
Gemini Antigravity | MCP設定対応 | |
OpenCode | MCP設定対応 | |
Generic MCP | 設定対応 |
「ローカルプラグイン対応」とは、統合ラッパーが含まれており、ローカルでテスト可能であることを意味します。マーケットプレイスへの提出と承認はまだ含まれていません。
ツール
Mothは正確に2つのMCPツールを公開しています。
analyze_error
修正を試みる前に、提供されたエラー出力を分析します。
入力フィールド:
error_outputcommand?cwd?package_context?relevant_files?environment?
出力フィールド:
analysis_idfingerprintstacklikely_causebest_first_fixverificationprior_project_fixesavoidconfidence
remember_fix_result
検証済みのプロジェクトローカルな修正メモリを記録します。
入力フィールド:
analysis_idfingerprintstackfix_attemptedverification_commandverification_result: "passed" | "failed"notes?
公開されている worked 入力は拒否されます。 worked は verification_result から導出されます。
検証済みメモリのライフサイクル
analyze_error
→ apply/attempt fix
→ run verification command
→ remember_fix_resultremember_fix_result を呼び出すのは、以下の場合のみです:
修正/変更が実際に試みられた場合
検証コマンドが実際に実行された場合
結果が明確に
passedまたはfailedである場合
提案、スキップされた変更、検証の欠如、曖昧な結果、または推測に対しては呼び出さないでください。
ローカルメモリ
検証済みのプロジェクトローカルな修正メモリは以下に保存されます:
.moth/fix-memory.jsonlMothは、MCPサーバーの再起動後に remember_fix_result が analysis_id を正しいプロジェクトパスにマッピングできるように、プロジェクト外にMoth独自の小さな分析レジストリを保持します。
スキル
Mothには、互換性のあるエージェント向けの簡潔なスキルが含まれています:
moth-debug-first-fixmoth-source-backed-researchmoth-verify-fix
Mothサーバー自体はライブWebリサーチを実行しません。互換性のあるエージェントは、外部ソースが必要な場合、Mothのスキルに導かれて独自の検索ツールを使用する場合があります。
安全性
デフォルトで読み取り専用
ソースの編集なし
シェル実行なし
リポジトリ全体のスキャンなし
バックグラウンド監視なし
外部サービスの要求なし
分析、応答、メモリ書き込みの前に機密情報を秘匿化
開発
pnpm install
pnpm test
pnpm build
pnpm dev
npm pack --dry-runライセンス
MIT
Available Tools
2 toolsanalyze_errorAnalyze ErrorC
Analyze provided error output and return a deterministic project-local fix brief.
Inputs: error_output (required), command, cwd, package_context, +2 more. Returns: analysis_id, fingerprint, stack, likely_cause, +5 more
remember_fix_resultRemember Fix ResultA
Record verified project-local fix memory only after a fix/change was actually attempted, the verification command was actually run, and the result is clearly passed or failed.
Inputs: analysis_id (required), fingerprint (required), stack (required), fix_attempted (required), +3 more. Returns: recorded, memory_path, timestamp
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools have clearly distinct purposes: analyze_error generates a fix brief from error output, while remember_fix_result records the outcome of a fix attempt. There is no overlap or ambiguity.
Both tool names follow a consistent verb_noun pattern in snake_case: analyze_error and remember_fix_result. The naming is clear and predictable.
With only 2 tools, the server feels under-scoped for a typical error analysis workflow. While it may be intentionally minimal, a more comprehensive set would include tools for retrieving fix history or clearing memory.
The tool set lacks retrieval capabilities (e.g., listing or searching past fix results) and memory management (e.g., clearing or updating records). These are notable gaps that could hinder agent workflows.
Maintenance
Related MCP Connectors
Shared debugging memory for AI coding agents
Agent Replay Debugger MCP — record every agent step + deterministic replay. Step-debugger for
Structured failure knowledge for AI agents — dead ends, workarounds, error chains
Failure-memory layer for coding agents: search evidence-rated failure lessons by error text.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceShared debugging memory for AI coding agents. Agents search, report, patch, and verify bug fixes through 5 MCP tools. Verified by proof, not upvotes.1Business Source 1.1
- AlicenseBqualityDmaintenanceAn MCP server for detecting retry loops and analyzing iteration patterns in agentic coding workflows, providing structured debugging intelligence to improve repair attempts.164MIT
- AlicenseNot gradedqualityDmaintenanceA deterministic AST evidence engine that forces AI agents to debug using verified execution facts instead of pattern-matching symptoms, enabling hallucination-free debugging for MCP-compatible agents.Business Source 1.1
- AlicenseAqualityBmaintenanceEnables AI agents to debug errors by providing root cause analysis and ranked fixes with code patches. Supports any MCP client.2117 npmMIT