MemoryGraph exposes these MCP tools to your AI assistant.
Core Tools
store_memory
Store a new memory in the knowledge graph.
store_memory(
type: string, # Memory type: solution, problem, pattern, error, fix, etc.
title: string, # Short, searchable title
content: string, # Detailed content
tags?: string[], # Optional tags for categorization
importance?: float, # 0.0-1.0, default 0.5
context?: object # Optional context (project_path, etc.)
) Example:
store_memory(
type="solution",
title="Redis connection timeout fix",
content="Increased pool size to 20 and added retry logic...",
tags=["redis", "timeout", "production"],
importance=0.8
) recall_memories
Search for memories by query. Recommended for most recall operations.
recall_memories(
query: string, # Natural language search query
memory_types?: string[], # Filter by types
limit?: int, # Max results (default 20)
project_path?: string # Filter by project
) Example:
recall_memories(
query="timeout solutions",
memory_types=["solution", "fix"],
limit=10
) search_memories
Advanced search with fine-grained control.
search_memories(
query?: string, # Text search
terms?: string[], # Multiple search terms
match_mode?: "any" | "all", # OR vs AND matching
memory_types?: string[], # Filter by types
tags?: string[], # Filter by tags
min_importance?: float, # Minimum importance
search_tolerance?: string, # strict, normal, fuzzy
limit?: int
) get_memory
Retrieve a specific memory by ID.
get_memory(
memory_id: string,
include_relationships?: bool # Include related memories
) Relationship Tools
create_relationship
Link two memories with a typed relationship.
create_relationship(
from_memory_id: string,
to_memory_id: string,
relationship_type: string, # SOLVES, CAUSES, RELATED_TO, etc.
context?: string, # Description of relationship
strength?: float # 0.0-1.0
) Relationship Types (35 total, organized by category):
Causal
CAUSES- Direct cause of an effectTRIGGERS- Initiates or starts somethingLEADS_TO- Results in a consequencePREVENTS- Stops something from happeningBREAKS- Causes failure or malfunction
Solution
SOLVES- Solution resolves a problemADDRESSES- Handles or deals with an issueALTERNATIVE_TO- Different approach to same goalIMPROVES- Enhances or makes betterREPLACES- Supersedes or substitutes
Context
OCCURS_IN- Happens within a contextAPPLIES_TO- Relevant to a domainWORKS_WITH- Compatible or integrates withREQUIRES- Needs as a prerequisiteUSED_IN- Employed within something
Knowledge
BUILDS_ON- Extends or develops fromCONTRADICTS- Conflicts withCONFIRMS- Validates or supportsGENERALIZES- Broader version ofSPECIALIZES- More specific version of
Similarity
SIMILAR_TO- Resembles or is likeVARIANT_OF- Variation or version ofRELATED_TO- General associationANALOGY_TO- Comparable in structureOPPOSITE_OF- Inverse or contrary to
Workflow
FOLLOWS- Comes after in sequenceDEPENDS_ON- Requires for operationENABLES- Makes possibleBLOCKS- Prevents progressPARALLEL_TO- Concurrent with
Evaluation
EFFECTIVE_FOR- Works well for a purposeINEFFECTIVE_FOR- Does not work for a purposePREFERRED_OVER- Better choice thanDEPRECATED_BY- Replaced by newer approachVALIDATED_BY- Confirmed by evidence
get_related_memories
Find memories connected to a specific memory.
get_related_memories(
memory_id: string,
relationship_types?: string[], # Filter by relationship type
max_depth?: int # Traversal depth (default 1)
) Management Tools
update_memory
update_memory(
memory_id: string,
title?: string,
content?: string,
tags?: string[],
importance?: float
) delete_memory
delete_memory(memory_id: string) get_recent_activity
Get summary of recent memory activity.
get_recent_activity(
days?: int, # Look back period (default 7)
project?: string # Filter by project
) Memory Types
| Type | Use Case |
|---|---|
solution | Solutions to problems |
problem | Issues encountered |
error | Error messages and stack traces |
fix | Bug fixes |
code_pattern | Reusable code patterns |
workflow | Process documentation |
task | Work items and completed tasks |
project | Project-level context and metadata |
technology | Technology stack and tools |
command | CLI commands and scripts |
file_context | File-specific context and notes |
general | General notes |