claude-memory/graph/solutions/converted-memorygraph-mcp-to-claude-code-skill-8e2d19.md
Cal Corum b140d4d82a migrate: 313 memories from MemoryGraph
- 313 new markdown files created
- 30 relationships embedded
- 313 entries indexed
- State initialized with usage data
2026-02-13 11:11:48 -06:00

33 lines
1.4 KiB
Markdown

---
id: 8e2d1904-24e0-41df-95f2-2edc4407b9f3
type: solution
title: "Converted MemoryGraph MCP to Claude Code Skill"
tags: [pai, claude-code, memorygraph, skills, architecture, migration]
importance: 0.9
confidence: 0.8
created: "2025-12-07T06:50:12.011310+00:00"
updated: "2025-12-07T06:50:12.011310+00:00"
relations:
- target: ebc3e5af-b3d1-486b-9751-8ece841aa93f
type: RELATED_TO
direction: outgoing
strength: 0.5
context: "Both part of PAI skills infrastructure improvements in same session"
---
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.