feat: Capture all MCP tool usage (exclude only claude-mem's own MCP tools) #110
Labels
No labels
good first issue
has-pr
help wanted
idea
priority
critical
priority
high
priority
low
priority
medium
status
blocked
status
in-progress
status
needs-review
status
ready
type
bug
type
docs
type
enhancement
type
feature
type
refactor
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
customable/claude-mem#110
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Claude-mem currently captures observations from native Claude Code tools (Read, Write, Bash, Grep, etc.) but may not capture tool usage from other MCP servers.
As users increasingly rely on MCP servers for specialized functionality (databases, APIs, browser automation, etc.), these interactions represent valuable context that should be preserved in memory.
Current Behavior
The PostToolUse hook likely only processes:
mcp__forgejo__*(Forgejo/Gitea operations)mcp__playwright__*(Browser automation)mcp__context7__*(Documentation lookup)Desired Behavior
Capture all tool usage EXCEPT claude-mem's own MCP tools:
✅ Include:
❌ Exclude:
mcp__plugin_claude-mem_mcp-search__*(claude-mem's own search tools)Implementation Strategy
1. Update Tool Filtering Logic
Current skip list in
save-hook.ts:Enhanced filtering:
2. Handle MCP Tool Structure
MCP tools may have different input/output structures than native tools. Ensure the observation pipeline handles:
3. Observation Classification
MCP tools should be properly categorized:
This metadata could be stored in observations for future filtering/analysis.
Benefits
Example Use Cases
Forgejo MCP:
Playwright MCP:
Context7 MCP:
Testing Strategy
Related Issues
Open Questions
Implemented in
packages/hooks/src/handlers/post-tool-use.ts.Changes:
shouldCaptureToolUse()function for cleaner filtering logicmcp__plugin_claude-mem_*tools to avoid circular observationsIGNORED_TOOLSto skip meta-tools:AskUserQuestionListMcpResourcesToolSlashCommandSkillResult: All external MCP tools (Forgejo, Playwright, Context7, custom servers) are now captured as observations.