Claude Error Collector MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
git clone https://github.com/henningziech/claude-error-collector-mcp.git
cd claude-error-collector-mcp
npm install
npm run build
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add claude-error-collector -- node "<FULL_PATH_TO_CLAUDE_ERROR_COLLECTOR_MCP>/dist/index.js"

Replace <FULL_PATH_TO_CLAUDE_ERROR_COLLECTOR_MCP>/dist/index.js with the actual folder you prepared in step 1.

README.md

An MCP server that learns from your corrections by recording rules in CLAUDE.md

Claude Error Collector

An MCP server for Claude Code that learns from your corrections. When you tell Claude "that was wrong" or "no, do it like this", it records the lesson as a rule in your CLAUDE.md - so the same mistake doesn't happen twice.

How It Works

  1. You correct Claude during a coding session
  2. Claude recognizes the correction and calls the record_error tool
  3. The server derives a rule and writes it to the appropriate CLAUDE.md
  4. Claude reads that rule in future sessions and avoids repeating the mistake

The server automatically detects whether you're in a project directory (writes to project CLAUDE.md) or your home directory (writes to ~/.claude/CLAUDE.md).

Tools

`record_error`

Records a correction and saves it as a learned rule with metadata (date, category).

Parameter Type Required Description
error_description string yes What was wrong
correction string yes What is correct
rule string yes Derived guideline, e.g. "ALWAYS use X instead of Y"
category string no Rule category (e.g. "n8n", "bash", "google-workspace"). Auto-detected if omitted.
project_dir string no Current working directory (for finding project CLAUDE.md)

`list_errors`

Lists all learned rules from the relevant CLAUDE.md. Supports filtering and grouping.

Parameter Type Required Description
category string no Filter rules by category
grouped boolean no Group rules by category with headings
project_dir string no Current working directory

`delete_rule`

Deletes a learned rule by index or substring match.

Parameter Type Required Description
index number no* 1-based index of the rule to delete
match string no* Substring to match (must match exactly one rule)
project_dir string no Current working directory

*Exactly one of index or match must be provided.

`update_rule`

Updates an existing rule's text, date, and optionally category.

Parameter Type Required Description
index number no* 1-based index of the rule to update
match string no* Substring to match (must match exactly one rule)
new_rule string yes The new rule text
category string no New category (keeps existing if omitted)
project_dir string no Current working directory

*Exactly one of index or match must be provided.

`review_rules`

Reviews all rules with their age for lifecycle management.

Parameter Type Required Description
older_than_days number no Threshold in days to consider "old" (default: 30)
project_dir string no Current working directory

Output Format

Rules are stored in a ## Learned Rules section in your CLAUDE.md with metadata as HTML comments:

## Learned Rules

- Legacy rule without metadata (still supported)

### N8n

- Bei n8n IMMER nodeId verwenden 

### Bash

- NEVER embed large JSON inline in Bash commands 

Metadata fields:

  • @date:YYYY-MM-DD — when the rule was created/updated
  • @category:name — rule category for grouping

Rules without metadata (legacy format) remain fully supported and appear at the top of the section without a category heading.

Installation

git clone https://github.com/henningziech/claude-error-collector-mcp.git
cd claude-error-collector-mcp
npm install && npm run build
claude mcp add error-collector -s user -- node "$PWD/dist/index.js"

Restart Claude Code after installation. No manual CLAUDE.md editing needed — the server provides its own instructions to Claude via MCP server metadata.

CLAUDE.md Resolution

The server finds the right CLAUDE.md using this logic:

  1. If project_dir is provided: walk up the directory tree looking for CLAUDE.md
  2. If found and not in the home directory: use it (project-level rules)
  3. Fallback: ~/.claude/CLAUDE.md (global rules)

Duplicate Detection

Duplicate detection works on two levels:

  1. Server-side: Before writing a rule, the server checks existing rules using case-insensitive substring matching. If the new rule is already covered by an existing one (or vice versa), it skips the write.

  2. Semantic (via instructions): The server instructs Claude to review existing learned rules for semantic equivalence before calling record_error — even if the wording differs. Claude will:

    • Skip silently if the rule clearly already exists
    • Record it if the rule is clearly new
    • Ask the user if a similar rule exists but it's not 100% clear w

Tools (5)

record_errorRecords a correction and saves it as a learned rule with metadata.
list_errorsLists all learned rules from the relevant CLAUDE.md file.
delete_ruleDeletes a learned rule by index or substring match.
update_ruleUpdates an existing rule's text, date, and optionally category.
review_rulesReviews all rules with their age for lifecycle management.

Configuration

claude_desktop_config.json
{"mcpServers": {"error-collector": {"command": "node", "args": ["/path/to/claude-error-collector-mcp/dist/index.js"]}}}

Try it

Record that I should always use the latest version of the API when writing integration tests.
List all learned rules for the bash category in this project.
Delete the rule that mentions using the deprecated library.
Review all rules that are older than 60 days to see if they are still relevant.
Update the rule about error handling to include the new logging format.

Frequently Asked Questions

What are the key features of Claude Error Collector?

Automatically records user corrections as persistent rules in CLAUDE.md. Supports both project-specific and global rule storage. Includes metadata like date and category for rule organization. Provides duplicate detection to prevent redundant rule entries. Allows for listing, updating, and deleting learned rules.

What can I use Claude Error Collector for?

Ensuring Claude remembers specific coding standards for a project. Preventing Claude from repeating common mistakes in specific frameworks like n8n. Managing project-specific guidelines without manual file editing. Cleaning up outdated or irrelevant rules using the review tool.

How do I install Claude Error Collector?

Install Claude Error Collector by running: git clone https://github.com/henningziech/claude-error-collector-mcp.git && cd claude-error-collector-mcp && npm install && npm run build

What MCP clients work with Claude Error Collector?

Claude Error Collector works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Claude Error Collector docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare