stfade/moth

πŸ’» Developer Tools
0 Views
0 Installs

πŸ“‡ 🏠 - A lightweight MCP server for structured bug-fix analysis and project-local verified fix memory for AI agents.

Quick Install

One-Click IDE Configuration
claude_desktop_config.json
{
  "mcpServers": {
    "stfade-moth": {
      "command": "npx",
      "args": [
        "-y",
        "stfade-moth"
      ]
    }
  }
}
Or

Using an AI coding agent (Claude Code, Cursor, etc.)? Copy a ready-made prompt that tells it to fetch the setup instructions and install this server for you.

Documentation Overview

Moth Logo

Moth

npm version License: MIT

Moth is a lightweight MCP server for project-local bug-fix analysis and verified fix memory.

What Moth Does

Moth receives error output through MCP, redacts likely secrets, normalizes the failure, detects the likely stack, checks project-local fix memory, and returns a structured fix brief.

Moth does not edit code, run shell commands, crawl repositories, require a backend, or maintain a global bug database.

Why Moth?

Bug-fix context is often local to a project: the command that failed, the framework in use, nearby configuration, and fixes that have already worked or failed in that repo.

Moth keeps that workflow small and explicit. It analyzes provided error context, suggests a best first fix, and records only verified fix outcomes in project-local memory.

Quick Start

Requires Node.js 18+.

Run directly:

npx -y @stfade/moth moth-mcp

Or install globally:

npm install -g @stfade/moth
moth-mcp

Generic MCP config

{
  "mcpServers": {
    "moth": {
      "command": "npx",
      "args": ["-y", "@stfade/moth", "moth-mcp"]
    }
  }
}

Usage Example

When using Moth with a supported AI agent, you can include a simple prompt like this along with your error:

"Use Moth to analyze this error before fixing it."

Supported Clients

ClientStatusSetup
CodexLocal plugin-readySetup
Claude CodeLocal plugin-readySetup
CursorPlugin scaffoldSetup
Gemini CLIExtension scaffoldSetup
Gemini AntigravityMCP config-readySetup
OpenCodeMCP config-readySetup
Generic MCPConfig-readySetup

β€œLocal plugin-ready” means the integration wrapper is included and can be tested locally. Marketplace submission and approval are not included yet.

Tools

Moth exposes exactly two MCP tools.

analyze_error

Analyzes provided error output before a fix is attempted.

Input fields:

  • error_output
  • command?
  • cwd?
  • package_context?
  • relevant_files?
  • environment?

Output fields:

  • analysis_id
  • fingerprint
  • stack
  • likely_cause
  • best_first_fix
  • verification
  • prior_project_fixes
  • avoid
  • confidence

remember_fix_result

Records verified project-local fix memory.

Input fields:

  • analysis_id
  • fingerprint
  • stack
  • fix_attempted
  • verification_command
  • verification_result: "passed" | "failed"
  • notes?

The public worked input is rejected. worked is derived from verification_result.

Verified Memory Lifecycle

analyze_error
β†’ apply/attempt fix
β†’ run verification command
β†’ remember_fix_result

Call remember_fix_result only when:

  1. a fix/change was actually attempted
  2. the verification command actually ran
  3. the result is clearly passed or failed

Do not call it for suggestions, skipped changes, missing verification, ambiguous results, or guesses.

Local Memory

Verified project-local fix memory is stored at:

.moth/fix-memory.jsonl

Moth keeps a small Moth-owned analysis registry outside the project so remember_fix_result can map analysis_id back to the correct project path after an MCP server restart.

Skills

Moth includes concise skills for compatible agents:

  • moth-debug-first-fix
  • moth-source-backed-research
  • moth-verify-fix

The MCP server itself does not perform live web research. Compatible agents may use their own search tools, guided by Moth skills, when external sources are needed.

Safety

  • read-only by default
  • no source edits
  • no shell execution
  • no repo-wide scan
  • no background watcher
  • no external service required
  • redacts likely secrets before analysis, responses, and memory writes

Development

pnpm install
pnpm test
pnpm build
pnpm dev
npm pack --dry-run

License

MIT

Related MCP Servers

Moxie-Docs-MCPβ˜… Featured

MCP & Agent Skills for Automated Documentation, and codebase conventions + context

πŸ’» Developer Tools2 views
3KniGHtcZ/codebeamer-mcp

πŸ“‡ ☁️ 🍎 πŸͺŸ 🐧 - Codebeamer ALM integration for managing work items, trackers, and projects. Provides 17 tools for reading and writing items, associations, references, comments, and risk management data via Codebeamer REST API v3.

πŸ’» Developer Tools1 views
21st-dev/Magic-MCP

Create crafted UI components inspired by the best 21st.dev design engineers.

πŸ’» Developer Tools0 views
a-25/ios-mcp-code-quality-server

πŸ“‡ 🏠 🍎 - iOS code quality analysis and test automation server. Provides comprehensive Xcode test execution, SwiftLint integration, and detailed failure analysis. Operates in both CLI and MCP server modes for direct developer usage and AI assistant integration.

πŸ’» Developer Tools0 views

Engagement

Views
0
Installs
0
Upvotes
0

Views and upvotes are unique per visitor network (hashed IP). Installs count copy actions.

Status

Health: Not checked yet

We have not completed a health check for this listing yet.

No check timestamp yet.

Unclaimed listing (imported or pending owner verification). Claim it β†’
β˜… Spotlight Slot

Feature Your MCP Server

Get maximum visibility for your server across our directory, search results, and detail pages.

Spotlight Your Server

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to get the verified badge and attach your website.

Claim this listing

Promote this listing

Optional paid placement. Free listings stay free forever.

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.