Featured

Deploy OpenClaw in 60 seconds β€” 20% off logoDeploy OpenClaw in 60 seconds β€” 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger β†’
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger β†’
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free β†’
6,000+ web scrapers for your AI agent, start free logo6,000+ web scrapers for your AI agent, start free

Apify gives your agent live web data: 6,000+ prebuilt scrapers and actors, MCP-ready. Sign up free with $5 in usage credits.

Try Apify free β†’
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data β€” no proxies, no parsers, no maintenance.

Start building free β†’
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it β€” secured from day one.

Get it set up for you β†’
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free β†’
Reach 48,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here β†’

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

stfade/moth MCP server](https://glama.ai/mcp/servers/stfade/moth/badges/score.svg)](https://glama.ai/mcp/servers/stfade/moth) πŸ“‡ 🏠 - A lightweight MCP server for structured bug-fix analysis and project-local verified fix memory for AI agents.

README.md

<p align="center"> <img src="https://github.com/stfade/moth/blob/main/assets/moth-logo.png?raw=true" width="120" alt="Moth Logo" /> </p>

<h1 align="center">Moth</h1>

<p align="center"> <a href="https://www.npmjs.com/package/@stfade/moth"><img src="https://badge.fury.io/js/@stfade%2Fmoth.svg" alt="npm version"></a> <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT"></a> </p>

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

| Client | Status | Setup | | --- | --- | --- | | Codex | Local plugin-ready | Setup | | Claude Code | Local plugin-ready | Setup | | Cursor | Plugin scaffold | Setup | | Gemini CLI | Extension scaffold | Setup | | Gemini Antigravity | MCP config-ready | Setup | | OpenCode | MCP config-ready | Setup | | Generic MCP | Config-ready | Setup |

β€œ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

See related servers & alternatives β†’

Related MCP servers

Browse all β†’

Related guides

Hand-picked reading to help you choose and use Vector & Memory servers.