About stevepridemore/graph-memory
stevepridemore/graph-memory is an MCP server published by stevepridemore in the RAG category: device use across Claude Code, Desktop, web, and iOS. Conduid read 32 tools from its source: delete_file, graph_alias, graph_audit, graph_boost, graph_build_context, graph_communities and 26 more. No package is published for it, so it installs from a source checkout.
The repository has 3 stars and 0 forks, and its last commit was on 26 Nov 2026. Conduid has no tagged release on record for it. Its topics include agent-memory, ai-memory, graphrag, knowledge-graph, llm-memory and local-ai.
Install
git clone https://github.com/stevepridemore/graph-memoryTools (32)
delete_fileDelete one file under ~/graph-memory. Folders can't be deleted.| Parameter | Type | Description |
|---|---|---|
| path * | string |
graph_aliasAdd or remove alternate names for an entity, so future writes and lookups using those names resolve to it instead of creating a duplicate node. Use when the user says two names refer to the same person or thing: a nickname, a maiden or married name, a first name used alone. Case-insensitive. An exact entity name always takes precedence over an alias. With neither add nor remove, lists the current aliases.| Parameter | Type | Description |
|---|---|---|
| add | array | Names to add as aliases |
| entity * | string | Entity name or ID to attach the aliases to |
| remove | array | Aliases to remove |
graph_auditAppend a structured event to the dream process audit log (logs/dream-audit.jsonl). Call this during the dream process to record run_start, run_end, transcript_start, transcript_end, entity_created, entity_resolved, edge_created, edge_modified, merge_flagged, contradiction_found, ingest_start, ingest_end, decay_applied, format_warning, or error events. entity_resolved is the audit trail for entity-resolution decisions during dream — every time the dream picks between matching an existing entity, creating a new one, or flagging an ambiguous candidate, log it here so a later graph_unmerge can reconstruct why a merge happened.| Parameter | Type | Description |
|---|---|---|
| data * | object | Event payload — fields vary by event type. Always include relevant names/IDs. |
| event * | string | Event type |
graph_boostIncrease an edge's weight when the user confirms recalled information. Call this when the user says 'yes', 'exactly', or confirms something you retrieved from the graph. Persists immediately; weight clamps at 1.0 so repeated boosts saturate rather than overflow. Returns the previous and new weight.| Parameter | Type | Description |
|---|---|---|
| amount | number | Boost amount (default: 0.15) |
| from_name * | string | Source entity name or ID |
| reason | string | Why boosting |
| relation * | string | Relationship type (e.g. WORKS_ON, PREFERS) |
| to_name * | string | Target entity name or ID |
graph_build_contextSingle tool call that bundles a session's worth of context: graph health, pending work, last dream run summary, recent additions, top knowledge hubs, unresolved contradictions, and (optionally) a topic neighbourhood. Use this at session start instead of running graph_stats / graph_query / graph_contradictions separately. Cuts 4-5 round trips to one.| Parameter | Type | Description |
|---|---|---|
| hub_count | number | Number of top knowledge hubs to include (default 5). |
| include_contradictions | boolean | Include unresolved contradictions (default true). |
| max_recent | number | Max recent entities to list (default 15). |
| project_cwd | string | Optional project directory for affinity scoring on the topic neighbourhood. |
| recent_days | number | Window in days for 'recently added' entities (default 7). |
| topic | string | Optional topic to fetch a neighbourhood for (uses graph_query under the hood). |
graph_communitiesFind clusters of densely-interconnected entities in the graph. Uses greedy seed-based BFS through edges above the weight threshold — works without GDS or APOC. Each entity is assigned to at most one community (the first that reaches it from a high-degree seed). Useful for understanding knowledge neighbourhoods (e.g. "everything related to infrastructure"). Returns `{communities, coverage}`. `communities` holds at most `max_communities` clusters in seed order (highest-degree seed first), each shaped `{id, seed_name, seed_id, member_count, dominant_type, members: [{id, name, type}]}` with at most 30 members listed; communities below `min_size` are left out. `coverage` is `{total_entities, assigned, unassigned}`. Use graph_query or graph_search instead when you have a specific entity to start from.| Parameter | Type | Description |
|---|---|---|
| max_communities | number | Maximum number of communities to return (default 10). |
| max_hops | number | BFS depth from each seed (default 3, capped at 4). |
| min_size | number | Minimum members for a community to be returned (default 2). |
| weight_threshold | number | Only traverse edges with weight strictly greater than this (default 0.4). |
graph_contradictionsFind facts that contradict each other in the memory graph — pairs connected by a CONTRADICTS edge. Use during reviews, before a graph_decay run, or when the user asks about conflicting information. Returns `{contradictions: [{node_a, node_b, description, detected_date, resolved}], count}` ordered by most-recently detected. By default only unresolved pairs are surfaced; set include_resolved=true to audit historical resolutions. Resolve a contradiction by graph_weaken on the wrong edge or by graph_relate with relation=SUPERSEDES on the new fact.| Parameter | Type | Description |
|---|---|---|
| include_resolved | boolean | Include resolved contradictions (default: false) |
graph_cypherExecute a read-only Cypher query against the memory graph. You generate the Cypher — this tool just runs it. Enforced read-only via Neo4j executeRead(). Use for custom queries not covered by other tools. Admin-only (must be the bootstrap tenant) — non-admin tenants would otherwise be able to bypass tenant filtering by writing raw Cypher.| Parameter | Type | Description |
|---|---|---|
| cypher * | string | Cypher query to execute (read-only) |
| params | object | Query parameters |
graph_decayApply time-based decay to every node confidence and edge weight using per-type half-lives (preferences ~693d, events ~99d, etc.). Called by the dream process during maintenance. Always preview with dry_run=true first — decay is irreversible without restoring from a graph_export backup. Rule-subtype nodes and edges touching them are exempt. Returns totals, not per-type counts: `{nodes_decayed, edges_decayed, nodes_flagged_for_pruning}` (with dry_run, edges_decayed is always 0).| Parameter | Type | Description |
|---|---|---|
| dry_run | boolean | Preview only, don't apply changes (default: false) |
graph_deletePermanently delete an entity node and all its edges by ID. Use for removing duplicate or erroneous nodes. Cannot be undone.| Parameter | Type | Description |
|---|---|---|
| id * | string | Entity ID to delete |
graph_entitiesBrowse or search the entity catalog. Use to check if an entity exists before creating one with graph_relate, or to list entities of a given type. For relationship-aware lookups (entity + its neighbors) use graph_query instead. Returns up to `limit` entities ordered by `sort_by`; pagination is single-page (raise `limit` if you need more).| Parameter | Type | Description |
|---|---|---|
| limit | number | Max results (default: 20) |
| min_confidence | number | Min confidence threshold |
| search | string | Full-text search query |
| sort_by | string | Sort order (default: confidence) |
| type | string | Filter by entity type (Person, Project, Concept, etc.) |
graph_exportExport all graph nodes and edges to a timestamped JSONL backup file in the backups/ directory. Run this before any risky operation, or on a weekly schedule. Old backups are pruned automatically.| Parameter | Type | Description |
|---|---|---|
| keep | number | Number of backup files to keep (default 14, ~2 weeks of daily backups). |
| label | string | Optional label appended to the filename, e.g. 'pre-prune' → backup-2026-05-05-pre-prune.jsonl |
graph_ingestQueue a document for asynchronous extraction into the memory graph (mode='queue'), or check the ingest backlog (mode='status'). Use this when you have a file the user wants summarized into the graph but doesn't need it reflected in the same conversation — the nightly dream process picks queued documents up. For inline assertions during a conversation, call graph_relate directly instead. Idempotent: queueing the same file twice overwrites the prior copy in the pending dir. Remote callers (e.g. a cloud session collecting its own transcripts) can't name a file on this machine, so they pass content + file_name instead of file_path (admin tenant only). status also returns session_cursors: for each cloud session queued with meta.source='claude-code-cloud', the newest meta.through already queued or dreamed.| Parameter | Type | Description |
|---|---|---|
| action * | string | queue: add file to pending. status: check queue. |
| content | string | Document text to queue inline, for callers that can't reach the server's filesystem. Requires file_name. Admin tenant only. |
| file_name | string | Name for inline content in the pending dir: plain basename ending .md, .txt or .json. |
| file_path | string | Path to a file on the server to queue. For queue, give file_path or content + file_name. |
| meta | object | Cloud session this document came from (with source='claude-code-cloud') |
graph_mergeConsolidate two entities into one — moves source's edges onto target, adopts source properties for keys target doesn't have, then deletes source. Inverse of graph_unmerge. Use after graph_merge_suggestions surfaces a duplicate pair, or whenever you've confirmed two nodes refer to the same thing. Same-tenant only; refuses to merge an entity with itself. Edges directly between source and target are dropped (would become self-loops). When source and target both have the same edge to a third node, the edge is consolidated and the higher weight wins. Target's embedding is cleared so the next graph_reembed will re-derive it from the merged state. Logged to logs/merge-audit.jsonl with `reason`. DESTRUCTIVE — always preview with dry_run=true first; recovery requires a graph_export backup or graph_unmerge with the original edge layout.| Parameter | Type | Description |
|---|---|---|
| dry_run | boolean | Preview only, don't apply changes (default: false) |
| reason * | string | Why merging (logged in audit) |
| source_id * | string | Entity ID to merge from (will be deleted) |
| target_id * | string | Entity ID to merge into (will absorb source) |
graph_merge_suggestionsSurface candidate pairs of entities likely to be duplicates. Read-only — never auto-merges. Combines embedding similarity, shared-neighbor overlap, and name-token Jaccard. Same-type only. Use to triage entity-explosion before running graph_merge (destructive consolidation) or graph_relate with ALIAS_OF (soft alias).| Parameter | Type | Description |
|---|---|---|
| entity_id | string | Scope to one entity's potential duplicates |
| entity_type | string | Scope to one entity type (Person, Project, etc.) |
| limit | number | Max suggestions to return (default 20, max 100) |
| log_to_audit | boolean | Emit merge_flagged audit events for surfaced pairs (default true) |
| min_embedding_similarity | number | Embedding-similarity floor for candidates (default 0.85) |
| min_score | number | Combined-score threshold to surface (default 0.8) |
| weights | object | Override default weights (0.4 / 0.4 / 0.2) |
graph_pruneRemove entities and edges that have decayed below threshold. DESTRUCTIVE — always preview first. Requires user confirmation before execute mode.| Parameter | Type | Description |
|---|---|---|
| edge_threshold | number | Prune edges below this weight (default: 0.05) |
| include_orphans | boolean | Also prune orphaned nodes (default: true) |
| max_age_days | number | Max age for orphan pruning (default: 30) |
| mode | string | preview (default) or execute |
| node_threshold | number | Prune nodes below this confidence (default: 0.1) |
graph_queryQuery the memory graph by canonical entity name. Use when you know the entity name or close-to-canonical form (e.g. "Steve", "graph-memory"); for natural-language phrasing or synonyms (e.g. "the knowledge graph project") prefer graph_search. Returns up to `limit` matching nodes plus the edges that connect them within `max_hops`, with per-edge weight and source provenance.| Parameter | Type | Description |
|---|---|---|
| context_level | string | Response detail level (default: full) |
| current_only | boolean | Only current facts, exclude superseded (default: true) |
| entities * | array | Entity names to search for |
| entity_types | array | Filter results to these entity types |
| limit | number | Max results (default: 20) |
| max_hops | number | Max traversal depth (default: 2, capped at 4) |
| min_weight | number | Min edge weight to traverse (default: 0.3) |
| project_context | string | Project directory or name for affinity scoring |
graph_read_transcriptRead and parse a Claude Code JSONL transcript file through the canonical transcript parser. Returns normalized messages with text content extracted. Use this instead of reading raw JSONL directly — if the transcript format changes, only this tool needs updating.| Parameter | Type | Description |
|---|---|---|
| file_path | string | Absolute path to the .jsonl file. Takes precedence over session_id. |
| session_id | string | Session UUID (filename without .jsonl). Searches ~/.claude/projects/ for a match. |
| text_only | boolean | If true (default), return only messages that have extractable text content. |
graph_reembedRegenerate semantic-search embeddings for entities. By default only fills missing embeddings (idempotent, fast). With force=true, re-embeds every entity — use after changing the embed-text recipe (e.g. when richer fields are added). At ~10ms per entity, full re-embed of a few hundred nodes finishes in seconds.| Parameter | Type | Description |
|---|---|---|
| force | boolean | Re-embed every entity, even ones that already have an embedding. Default false. |
graph_relateCreate or strengthen a relationship between entities. Creates the endpoint entities if they don't exist, matching existing ones by name, case-insensitive name, or alias first. Use single mode (from_name/to_name/relation) for one fact at a time. Use batch mode when extracting from a transcript or document: it runs in one transaction, so a database failure keeps nothing, while an invalid item is skipped and reported without blocking the rest. Types and relations must use the documented vocabulary (see GRAPH_SCHEMA.md); an unknown relation is stored as RELATED_TO with the original kept in proposed_relations, and an unknown type as Object with proposed_type. Idempotent: re-asserting an existing edge strengthens it (capped at 1.0) and reports action "strengthened".| Parameter | Type | Description |
|---|---|---|
| batch | object | Batch mode: create multiple entities and relationships atomically |
| evidence | string | Why this relationship exists |
| from_name | string | Source entity name (single mode) |
| from_type | string | Source entity type (single mode) |
| properties | object | Additional properties |
| relation | string | Relationship type (single mode) |
| source_session | string | Session ID for provenance |
| source_transcript | string | Transcript path for provenance |
| source_type | string | Source type: conversation, ingest, manual, bootstrap |
| to_name | string | Target entity name (single mode) |
| to_type | string | Target entity type (single mode) |
| valid_at | string | ISO-8601 date this fact became true. Also REPLACES the previous value: other edges of this type from the same source are marked invalid as of this date. Omit it for facts that can hold several values at once. FAMILY_OF, KNOWS, COLLABORATES_WITH, MENTOR_OF, ALIAS_OF, CONTRADICTS and RELATED_TO never supersede. |
| weight | number | Edge weight 0.0-1.0 |
graph_searchFind entities semantically similar to a natural-language query, then optionally expand via graph traversal. Uses local sentence embeddings (bge-small-en, 384-dim) — no external API. Best when the user's wording doesn't match canonical entity names (e.g. "containers" → Docker, "AI tools" → Claude Code/Anthropic SDK). If the embedder is unavailable it returns an error; use graph_query instead. Expansion follows the top 5 seeds only, capped at 30 edges.| Parameter | Type | Description |
|---|---|---|
| entity_types | array | Restrict results to these entity types. |
| expand | boolean | If true (default), also return the immediate graph neighbours of each seed. |
| expand_min_weight | number | Min edge weight when expanding (default 0.3). |
| min_similarity | number | Minimum cosine similarity threshold (default 0.5). |
| query * | string | Natural-language query (any phrasing — synonyms and paraphrases work). |
| top_k | number | How many semantically similar entities to retrieve as seeds (default 10). |
graph_statsGraph health dashboard — node/edge counts by type, average weight, orphan count, unresolved contradictions, stale entries, schema version, and pending ingest backlog. Returns aggregate counts only; for individual entities use graph_entities. Call at session start to size up the graph before deeper queries, after graph_decay or graph_prune to verify the result, or when debugging unexpected query output. No parameters.graph_unmergeSplit a falsely merged entity back into two separate entities, redistributing specified edges. Use when entity resolution made a mistake (e.g. merged 'Anna' and 'Anne'). The original entity keeps every edge not listed in `edges_to_move`; the new entity gets the listed edges plus a fresh embedding stub (re-derive with graph_reembed). Logged to the audit trail with `reason`. Returns the IDs of both entities.| Parameter | Type | Description |
|---|---|---|
| edges_to_move * | array | Entity on the other end of the edge |
| entity_id * | string | The merged entity ID to split |
| new_entity_name * | string | Name for the split-off entity |
| new_entity_type * | string | Type label for the split-off entity |
| reason * | string | Why splitting (logged in audit) |
graph_validateScan recently extracted entities and edges for quality issues: generic names, reference language, isolated low-confidence entities, and near-duplicate names. Call this after a dream process extraction batch to catch bad data before it settles into the graph. Returns `{total_issues, by_severity, scope, issues}`, where `issues` holds up to `max_issues` records of shape `{entity_id, name, type, issue, severity}` and severity is high/medium/low. Read-only — pair with graph_delete or graph_unmerge to act on flagged items.| Parameter | Type | Description |
|---|---|---|
| max_issues | number | Maximum number of issues to return (default 50). |
| source_session | string | Limit checks to entities extracted in this session. Omit to scan the whole graph. |
graph_weakenDecrease an edge's weight when the user corrects a recalled fact. Call this when the user says 'no', 'that's wrong', or corrects something from the graph. Persists immediately; weight clamps at 0.0. Returns an error if the edge doesn't exist — use graph_delete to remove an entity outright. To replace a fact rather than weaken it, prefer graph_relate with the new fact and SUPERSEDES.| Parameter | Type | Description |
|---|---|---|
| amount | number | Weaken amount (default: 0.3) |
| from_name * | string | Source entity name or ID |
| reason | string | Why weakening |
| relation * | string | Relationship type |
| to_name * | string | Target entity name or ID |
list_dirList a directory. Returns one entry per line: type, size in bytes, modified time (ISO), name. Paths may start with ~/ (e.g. ~/graph-memory/ingest/pending, ~/.claude/projects).| Parameter | Type | Description |
|---|---|---|
| path * | string | |
| recursive | boolean | Walk subfolders too (max depth 3). Default false. |
move_fileMove or rename a file within ~/graph-memory. Parent folders of the target are created.| Parameter | Type | Description |
|---|---|---|
| from * | string | |
| to * | string |
read_fileRead a UTF-8 text file. Returns up to 'limit' characters (default ${DEFAULT_READ_LIMIT})starting at character 'offset', with a header saying the total length so you can read on.| Parameter | Type | Description |
|---|---|---|
| limit | integer | |
| offset | integer | |
| path * | string |
read_transcriptRead a pending transcript's text messages a page at a time, through the canonical transcript parser (tool calls, tool results and thinking already stripped). Pass 'since' (the item's previous_processed_at) for delta items so only new messages come back. Keep calling with next_offset until it is null.| Parameter | Type | Description |
|---|---|---|
| offset | integer | Index into the (filtered) message list. Default 0. |
| session_id * | string | |
| since | string | ISO timestamp; only messages after it are returned. |
stat_fileSize in bytes, modified time and, for text files, line count. Use it for manifest watermarks.| Parameter | Type | Description |
|---|---|---|
| path * | string |
update_manifestRecord a transcript as processed in ~/graph-memory/processed/manifest.json (Step 4h). The runner fills in path, processed_at, file_size_bytes and line_count from when it read the file, and sets last_dream_run. Call it once per transcript as soon as you finish it, including skipped or empty-delta ones.| Parameter | Type | Description |
|---|---|---|
| edges_created * | integer | |
| entities_extracted * | integer | |
| note | string | Optional, e.g. 'skipped: unknown format'. |
| session_id * | string |
write_fileCreate or overwrite a text file under ~/graph-memory. Parent folders are created.| Parameter | Type | Description |
|---|---|---|
| content * | string | |
| path * | string |
Security checks
6 checks have not been run yet.