claude-memory/graph/solutions/converted-memorygraph-mcp-to-claude-code-skill-8e2d19.md
2026-02-28 22:10:46 -06:00

1.8 KiB

id type title tags importance confidence created updated relations
8e2d1904-24e0-41df-95f2-2edc4407b9f3 solution Converted MemoryGraph MCP to Claude Code Skill
pai
claude-code
memorygraph
skills
architecture
migration
0.9 0.8 2025-12-07T06:50:12.011310+00:00 2026-03-01T04:10:46.102709+00:00
target type direction strength context
ebc3e5af-b3d1-486b-9751-8ece841aa93f RELATED_TO outgoing 0.5 Both part of PAI skills infrastructure improvements in same session
target type direction strength edge_id
089f4cd8-4b2b-49a5-aac1-af2811b8ea7d RELATED_TO incoming 0.8 34b6ee00-1113-479b-8e28-e39f347c6bc0
target type direction strength edge_id
8023fae6-eec1-4c93-bac8-1bd85dd61bae BUILDS_ON incoming 0.74 b4b234af-a7be-4144-b965-75642070199f

Converted MemoryGraph from MCP server to Claude Code skill to reduce token cost. MCP tools were always in context (~45 tools eating tokens every turn). Skill loads on-demand only when triggered.

Implementation:

  • Created ~/.claude/skills/memorygraph/ with client.py (620 lines), SKILL.md, SCHEMA.md, feature.json
  • Direct SQLite access to ~/.memorygraph/memory.db bypassing MCP protocol
  • JSON-based search instead of FTS (existing FTS index wasn't populated)
  • CLI interface: store, recall, get, relate, search, update, delete, related, stats, recent

All 11 core operations implemented:

  • store_memory, recall_memories, get_memory, create_relationship (high priority)
  • search_memories, update_memory, delete_memory, get_related_memories (medium)
  • get_memory_statistics, get_recent_activity (low)

Updated ~/.claude/CLAUDE.md Memory Protocol to use CLI commands instead of MCP tools. Documentation saved to NoteDiscovery at reference/skills/memorygraph.