Claude Error Collector
The Claude Error Collector is an MCP server that helps Claude learn from user corrections by recording them as rules in CLAUDE.md files.
Record corrections (
record_error): Saves what was wrong, the correct approach, and a derived rule into the appropriateCLAUDE.md, with optional category taggingAutomatic file selection: Intelligently writes to a project-specific
CLAUDE.mdor the global~/.claude/CLAUDE.mdbased on contextList learned rules (
list_errors): Displays all recorded rules with filtering by category and grouping optionsDelete rules: Remove specific rules by index or substring match
Update rules: Modify the text, date, and/or category of existing rules
Review rules: Assess rule age to assist with lifecycle management
Duplicate detection: Prevents redundant rules via server-side substring matching and semantic evaluation by Claude
Legacy format support: Compatible with existing
CLAUDE.mdfiles that lack metadata
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Claude Error CollectorRecord that I prefer async/await over .then() chains for all API calls"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
You correct Claude during a coding session
Claude recognizes the correction and calls the
record_errortoolThe server derives a rule and writes it to the appropriate
CLAUDE.mdClaude 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).
Related MCP server: claude-memory-mcp
Tools
record_error
Records a correction and saves it as a learned rule with metadata (date, category).
Parameter | Type | Required | Description |
| string | yes | What was wrong |
| string | yes | What is correct |
| string | yes | Derived guideline, e.g. "ALWAYS use X instead of Y" |
| string | no | Rule category (e.g. "n8n", "bash", "google-workspace"). Auto-detected if omitted. |
| 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 |
| string | no | Filter rules by category |
| boolean | no | Group rules by category with headings |
| string | no | Current working directory |
delete_rule
Deletes a learned rule by index or substring match.
Parameter | Type | Required | Description |
| number | no* | 1-based index of the rule to delete |
| string | no* | Substring to match (must match exactly one rule) |
| 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 |
| number | no* | 1-based index of the rule to update |
| string | no* | Substring to match (must match exactly one rule) |
| string | yes | The new rule text |
| string | no | New category (keeps existing if omitted) |
| 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 |
| number | no | Threshold in days to consider "old" (default: 30) |
| 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 <!-- @date:2026-02-15 @category:n8n -->
### Bash
- NEVER embed large JSON inline in Bash commands <!-- @date:2026-02-20 @category:bash -->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:
If
project_diris provided: walk up the directory tree looking forCLAUDE.mdIf found and not in the home directory: use it (project-level rules)
Fallback:
~/.claude/CLAUDE.md(global rules)
Duplicate Detection
Duplicate detection works on two levels:
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.
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 whether it's a duplicate, offering options to add alongside, consolidate, or skip
License
MIT
Available Tools
2 toolslist_errorsC
List all learned rules from the CLAUDE.md file.
| Name | Required | Description | Default |
|---|---|---|---|
| project_dir | No | Current working directory (to find project CLAUDE.md) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool lists rules but doesn't clarify if this is a read-only operation, what permissions are needed, how the output is formatted, or any limitations (e.g., file size constraints). This leaves significant behavioral gaps for the agent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, straightforward sentence that efficiently conveys the core purpose without unnecessary words. It's front-loaded with the main action, making it easy to parse, though it could be slightly more structured for clarity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what 'learned rules' are, how they're formatted in the output, or any error handling (e.g., if CLAUDE.md is missing). For a tool with no structured support, this leaves the agent under-informed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, with the single parameter 'project_dir' clearly documented in the schema. The description adds no additional parameter semantics beyond what the schema provides, so it meets the baseline score of 3 for high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb ('List') and resource ('learned rules from the CLAUDE.md file'), which clarifies what the tool does. However, it doesn't distinguish from its sibling 'record_error' (which presumably records errors rather than listing rules), leaving some ambiguity about the tool's unique role.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention the sibling tool 'record_error' or explain scenarios where listing rules is appropriate versus recording errors, leaving the agent without contextual usage cues.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
record_errorA
Record a correction from the user and save it as a learned rule in CLAUDE.md. Call this whenever the user corrects you.
| Name | Required | Description | Default |
|---|---|---|---|
| error_description | Yes | What was wrong | |
| correction | Yes | What is correct | |
| rule | Yes | Derived guideline, e.g. "ALWAYS use X instead of Y" | |
| project_dir | No | Current working directory (to find project CLAUDE.md) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It states the tool saves corrections as learned rules, implying persistence and mutation, but lacks details on permissions, file overwrite behavior, error handling, or response format. It adequately describes the core behavior but misses operational specifics.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two concise sentences that are front-loaded with the core purpose and usage trigger. Every word serves a clear function with zero waste, making it highly efficient and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no annotations and no output schema, the description adequately covers the tool's purpose and usage but lacks details on behavioral traits like file I/O specifics, error responses, or system impacts. For a mutation tool with 4 parameters, it provides a functional overview but could be more complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema fully documents all parameters. The description adds no additional parameter semantics beyond what the schema provides, such as format examples or interdependencies. This meets the baseline for high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('Record a correction'), the resource ('save it as a learned rule in CLAUDE.md'), and the precise trigger ('whenever the user corrects you'). It distinguishes from the sibling 'list_errors' by focusing on recording rather than listing.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit usage guidance with 'Call this whenever the user corrects you,' establishing a clear context for when to invoke this tool. It implicitly distinguishes from 'list_errors' by focusing on correction recording rather than error listing.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
2 tool updates
v1.0.0- First observed
list_errors - First observed
record_error
TDQS
The two tools have completely distinct purposes: list_errors retrieves existing rules, while record_error adds new rules. There is no overlap in functionality, making it impossible to confuse them.
Both tools follow a consistent verb_noun pattern (list_errors, record_error) with clear action-object naming. The style is uniform throughout the set.
With only 2 tools, the server feels thin for error collection and learning. While it covers basic listing and recording, typical error management systems would benefit from additional operations like updating rules, deleting outdated ones, or searching/filtering errors.
The tools provide minimal CRUD coverage: create (record_error) and read (list_errors) are present, but update and delete operations are missing. This creates a dead-end where rules cannot be modified or removed once recorded, limiting practical utility.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
- mcpOAuthai.butlerbrain
Persistent memory for AI assistants. Save once; recall from Claude, ChatGPT, or any MCP client.
- TaprootOAuthcom.taproothq
Persistent memory layer for AI tools. Save and recall notes across Claude and other MCP clients.
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
Related MCP Servers
- AlicenseAqualityAmaintenanceAn MCP server that gives Claude persistent, locally-stored memory with verification-gated lessons and a Pattern Oracle to prevent unverified guesses from becoming ingrained facts.13731MIT
- AlicenseNot gradedqualityCmaintenanceAn MCP server that gives Claude Code cross-session memory persisted to a plain .claude-memory.md file in your repo.MIT
- AlicenseNot gradedqualityDmaintenancePersistent memory MCP server for Claude Code that captures and recalls project context across sessions, eliminating the need to re-explain architecture and decisions daily.1371MIT
- AlicenseAqualityBmaintenanceAn MCP server that lets Claude Code recall the context of past conversations from any project on demand.5522MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/henningziech/claude-error-collector-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server