error2fix

error2fix

Provides coding agents with compressed failure context via MCP, reducing the need to parse full raw logs.

Category
Visit Server

README

error2fix

error2fix turns noisy terminal failures into compact, structured debugging context.

The project has two complementary entry points:

  • A post-failure CLI that records failed shell commands and summarizes the latest failure for humans.
  • An MCP server that lets coding agents request compressed failure context instead of reading full raw logs directly.

The core product goal is to reduce the amount of irrelevant log text that a developer or LLM has to inspect before reaching the useful failure signal.

Why it exists

Terminal failures are usually noisy, repetitive, and hard to hand over to an AI assistant cleanly. Developers often have to copy a long log, explain what command ran, mention the working directory, and then ask the model to find the real signal.

error2fix keeps that workflow smaller:

  1. The CLI captures normal command failures after they happen.
  2. The diagnosis pipeline extracts the useful error signal from raw output.
  3. The MCP server gives agents compact failure context before they ask for more evidence.

This is especially important for LLM workflows, where reading an entire raw log can waste tokens before the model reaches the actual error.

CLI Installation

Install the CLI package:

npm install -g @error2fix/cli

Initialize shell integration once:

e2f init

After that, keep using your terminal normally. When a command fails, run:

e2f

The CLI stores local failure data under ~/.e2f.

MCP Installation

Install the MCP server package:

npm install -g @error2fix/mcp

The package exposes:

e2f-mcp

Configure your MCP client to start e2f-mcp as a stdio server.

VS Code style configuration:

{
  "servers": {
    "error2fix": {
      "type": "stdio",
      "command": "e2f-mcp"
    }
  }
}

Cursor, Claude Desktop, Cline, and other mcpServers-style clients usually use:

{
  "mcpServers": {
    "error2fix": {
      "command": "e2f-mcp"
    }
  }
}

Product Direction

error2fix is built around a post-failure workflow. Users should not have to wrap every command with a special runner. A normal command fails, then error2fix helps inspect what happened.

For agent workflows, the goal is stricter: the model should not need to ingest an entire terminal log before it can reason about the failure. The MCP server is designed to expose a small loop:

  1. Return the most valuable compressed failure brief.
  2. Cache the failure as a session.
  3. Let the agent query focused evidence only when the brief is not enough.
  4. Return client-provided runtime context on demand.

This keeps raw logs outside the model context as much as the host client allows.

MCP Workflow

The MCP server currently exposes:

  • e2f_get_latest_failure_brief: accepts stdout, stderr, and optional command metadata, then returns the compact diagnosis, evidence IDs, token policy metadata, and a sessionId.
  • e2f_query_failure_evidence: expands specific evidence from the cached session without returning the raw log.
  • e2f_get_runtime_context: returns client-provided command, workspace, shell, OS, git, or safe environment context from the cached session.

The intended agent flow is:

failed command output
  -> e2f_get_latest_failure_brief
  -> answer if sufficient
  -> e2f_query_failure_evidence only if more detail is needed
  -> e2f_get_runtime_context only if environment context matters

Benchmark

The repository includes an early MCP benchmark dataset under benchmarks/failures. Each case stores the original downloaded failure log as raw.log, so anyone can rerun the same compression workflow locally.

Current frontend benchmark snapshot:

  • Cases: 7
  • Signal matches: 21/26
  • Average reduction: 60.9%
  • Average total MCP ratio: 39.1%
  • Tool calls: 1 per case in the current run
  • Report: benchmarks/reports/report.md

This dataset is intentionally small and currently includes several short logs. Short-log cases expose response-shape overhead, so the MCP brief uses a smaller compact output shape for small raw logs.

Run the benchmark with:

pnpm benchmark:mcp

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured