Logo van MemoryGraph

MemoryGraph

Organisatie
memory-graph

A graph DB-based MCP memory server for coding agents with intelligent relationship tracking

Uitgevermemory-graph
Repositorymemory-graph
TaalTypeScript
Forks
85
Sterren
246
Beschikbare tools
0
Transporttypestdio
Categorieën
LicentieMIT
Links
  • Koppel tools aan AI-workflows

    MemoryGraph biedt MCP-functionaliteit die compatibele AI-clients en agenten kunnen gebruiken.

  • 0 beschikbare tools

    Bekijk hieronder de aanroepbare acties, inclusief namen en beschrijvingen als de server die beschikbaar stelt.

  • Configuratie om direct te kopiëren

    Gebruik de installatievoorbeelden om deze server in je favoriete MCP-client te configureren.

  • Indicatoren van opensource-interesse

    246 sterren en 85 forks in de gekoppelde repository.


Using with Coding Agents

Coding agents already execute shell commands, so they can use MemoryGraph directly. Two steps: install globally, then add instructions.

Install

bash
cd memory-graph/ts && bun install && bun link
# or: bun build src/cli.ts --compile --outfile ~/.local/bin/memorygraph
memorygraph stats  # verify

memorygraph is now available from any directory. Data persists in ~/.memorygraph/.

Add Agent Instructions

Paste this into your agent's instruction file (~/.claude/CLAUDE.md, .cursorrules, .windsurfrules, or AGENTS.md):

markdown
## Memory
`memorygraph` CLI is installed. Use it for persistent memory across sessions.

Before work: `memorygraph recall --query "<task>" --limit 10` and `memorygraph briefing`
On decisions/fixes: `memorygraph store --type solution --title "<title>" --content "<what>" --tags "<component>,fix"`
On errors: `memorygraph store --type error --title "<error>" --content "<details>" --tags "<component>,error"`
Link: `memorygraph link <from-id> <to-id> SOLVES --strength 0.8`
Session end: `memorygraph store --type conversation --title "Session: <topic>" --content "<summary>" --tags "<tags>"`
Types: solution | problem | code_pattern | fix | error | workflow | command | technology
Tags: lowercase, hyphenated, include component (auth, database, cli), 2-5 per memory
Do NOT wait to be asked. Store automatically on triggers.

Example Session

bash
# Start: load context
memorygraph recall --query "authentication redis" --limit 10
memorygraph briefing

# Fix a bug: store problem + solution, link them
memorygraph store --type problem --title "Auth token expiry too short" --content "Tokens expiring after 1h" --tags "auth,bug"
# → abc-123
memorygraph store --type solution --title "Extend token expiry to 24h" --content "Changed JWT expiry, added refresh rotation" --tags "auth,fix" --importance 0.8
# → def-456
memorygraph link def-456 abc-123 SOLVES --strength 0.9

# End: store summary
memorygraph store --type conversation --title "Session: auth token fix" --content "Fixed token expiry, added refresh rotation" --tags "auth,session-summary"

Multi-Project Setup

All projects share ~/.memorygraph/falkordblite.db by default. To isolate per project:

bash
export MEMORY_FALKORDBLITE_PATH=~/.memorygraph/my-project.falkor
# or tag memories with project name and filter:
memorygraph search --query "auth" --tags my-project

Troubleshooting

  • Agent not using commands: Use "REQUIRED"/"MUST" in instructions, include exact commands
  • Command not found: bun link from ts/, or ensure ~/.local/bin is on PATH
  • Memories not persisting: memorygraph config to check path, memorygraph health to verify

Why MemoryGraph?

Graph Relationships Make the Difference

Flat storage (CLAUDE.md, vector stores) keeps memories as isolated entries. Graph storage connects them:

[timeout_fix] --CAUSES--> [memory_leak] --SOLVED_BY--> [connection_pooling]
     |                                                        |
     +------------------SUPERSEDED_BY------------------------+

Query: "What happened with retry logic?" returns the full causal chain, not just individual memories.

When to Use What

Use CLAUDE.md / AGENTS.md ForUse MemoryGraph For
"Always use 2-space indentation""Last time we used 4-space, it broke the linter"
"Run tests before committing""The auth tests failed because of X, fixed by Y"
Static rules, prime directivesDynamic learnings with relationships

CLI Commands

Memory Operations

CommandPurposeExample
storeStore a new memorystore --type solution --title "Fix" --content "..." --tags redis,fix
getGet a memory by IDget <memory-id>
updateUpdate an existing memoryupdate <id> --title "New title"
deleteDelete a memorydelete <memory-id>
searchSearch with filterssearch --query "timeout" --tags redis --limit 10
recallNatural language recallrecall --query "authentication security"
relatedGet related memoriesrelated <id> --types SOLVES,CAUSES --max-depth 2
linkCreate a relationshiplink <from-id> <to-id> SOLVES --strength 0.8

Context Search

CommandPurpose
context-searchSearch relationships by type, strength, or context text
contextual-searchSearch within a memory's related items

Intelligence

CommandPurpose
entitiesExtract entities (files, functions, classes, technologies) from a memory
patternsFind similar problems and suggest patterns
contextGet intelligent context retrieval with entity and keyword matching

Analytics

CommandPurpose
statsDatabase statistics (memory count, types, relationships)
activityRecent activity summary with unresolved problems
visualizeGraph visualization data (nodes and edges)
similarityAnalyze solution similarity for a given memory
learningRecommend learning paths for a topic
gapsIdentify knowledge gaps (unsolved problems, missing connections)

Proactive

CommandPurpose
briefingGenerate a session briefing with recent activity and open issues
predictPredict what might be needed based on current context
warnWarn about potential issues (deprecated approaches, known errors)
outcomeRecord an outcome for a memory (success/failure tracking)

Integration

CommandPurpose
captureCapture task context from current environment
analyze-projectAnalyze the current project codebase
workflowTrack or suggest workflow improvements

Temporal

CommandPurpose
as-ofQuery relationships as they existed at a specific time
historyGet full relationship history for a memory
changesShow relationship changes since a timestamp

Data Management

CommandPurpose
exportExport to JSON or Markdown
importImport from JSON
migrateMigrate between backends
healthRun a health check
configShow current configuration

Backends

BackendTypeConfigNative GraphZero-ConfigBest For
falkordblite (default)EmbeddedFile pathCypherYesDefault, graph queries without server
sqliteEmbeddedFile pathSimulatedYesZero-dependency fallback
falkordbClient-serverHost:portCypherNoHigh-performance production
memgraphClient-serverBolt URICypherNoReal-time analytics
cloudCloudAPI KeyCypherNoMulti-device sync, team sharing

Backend Configuration

bash
# Use FalkorDBLite (default, zero-config)
bun run src/cli.ts stats

# Use SQLite
MEMORY_BACKEND=sqlite bun run src/cli.ts stats

# Use FalkorDB (client-server)
MEMORY_BACKEND=falkordb MEMORY_FALKORDB_HOST=localhost MEMORY_FALKORDB_PORT=6379 bun run src/cli.ts stats

# Use Memgraph
MEMORY_BACKEND=memgraph MEMORY_MEMGRAPH_URI=bolt://localhost:7687 bun run src/cli.ts stats

# Use Cloud
MEMORY_BACKEND=cloud MEMORYGRAPH_API_KEY=mg_your_key bun run src/cli.ts stats

Environment Variables

VariableDescriptionDefault
MEMORY_BACKENDBackend typefalkordblite
MEMORY_FALKORDBLITE_PATHFalkorDBLite database path~/.memorygraph/falkordblite.db
MEMORY_SQLITE_PATHSQLite database path~/.memorygraph/memory.db
MEMORY_FALKORDB_HOSTFalkorDB server hostlocalhost
MEMORY_FALKORDB_PORTFalkorDB server port6379
MEMORY_MEMGRAPH_URIMemgraph Bolt URIbolt://localhost:7687
MEMORYGRAPH_API_KEYCloud API key-
MEMORYGRAPH_API_URLCloud API URLhttps://graph-api.memorygraph.dev
MEMORY_TOOL_PROFILETool profile (core or extended)core
MEMORY_LOG_LEVELLog levelINFO

Memory Types

TypeUse Case
taskTasks and action items
code_patternRecurring code patterns or conventions
problemProblems or challenges encountered
solutionSolutions, decisions, or approaches chosen
projectProject context, environment, setup info
technologyTechnology choices and evaluations
errorErrors discovered
fixFixes applied to errors
commandUseful commands or CLI snippets
file_contextContext about specific files
workflowWorkflow or process descriptions
generalGeneral purpose memories
conversationConversation summaries

Relationship Types

TypeMeaning
RELATED_TOGeneral connection
BUILDS_ONNew memory extends an older one
CONTRADICTSNew memory supersedes or invalidates an older one
CONFIRMSNew memory provides evidence for an older one
SOLVESA solution solves a problem
CAUSESOne memory causes another
REQUIRESOne memory depends on another
IMPROVESAn improvement over an existing approach
REPLACESReplaces an older approach
DEPENDS_ONWorkflow dependency

Memory Best Practices

Session Workflow

bash
# Start of session: recall recent context
bun run src/cli.ts recall --query "recent work" --limit 10

# During work: store decisions and patterns
bun run src/cli.ts store \
  --type solution \
  --title "Use JWT for auth" \
  --content "JWT tokens with 24h expiry, refresh token rotation" \
  --tags "auth,security,api" \
  --importance 0.8

# Link it to a prior decision
bun run src/cli.ts link <new-id> <prior-id> BUILDS_ON --strength 0.9

# End of session: store summary
bun run src/cli.ts store \
  --type conversation \
  --title "Session: auth refactor" \
  --content "Refactored auth middleware, added JWT, fixed token refresh bug" \
  --tags "auth,session-summary"

# Export backup
bun run src/cli.ts export --format json --output session-backup.json

Add to CLAUDE.md or AGENTS.md

markdown
## Memory Protocol

### REQUIRED: Before Starting Work
You MUST use `recall` before any task. Query by project, tech, or task type.

### REQUIRED: Automatic Storage Triggers
Store memories on ANY of:
- Git commit: what was fixed/added
- Bug fix: problem + solution
- Architecture decision: choice + rationale
- Pattern discovered: reusable approach

### Memory Fields
- Type: solution | problem | code_pattern | fix | error | workflow
- Title: Specific, searchable
- Content: Accomplishment, decisions, patterns
- Tags: project, tech, category (required)
- Importance: 0.8+ critical, 0.5-0.7 standard, 0.3-0.4 minor
- Relationships: Link related memories when they exist

Architecture

Project Structure

memory-graph/
├── ts/
│   ├── src/
│   │   ├── cli.ts              # CLI entry point (35+ commands)
│   │   ├── index.ts            # Library exports
│   │   ├── config.ts           # Configuration management
│   │   ├── database.ts         # Database interface
│   │   ├── models.ts           # Data models and schemas
│   │   ├── backends/           # Backend implementations
│   │   │   ├── falkordb-shared.ts  # Shared FalkorDB base class
│   │   │   ├── falkordblite.ts     # Embedded FalkorDBLite
│   │   │   ├── falkordb.ts         # Client-server FalkorDB
│   │   │   ├── bolt-shared.ts      # Shared Bolt protocol base
│   │   │   ├── memgraph.ts         # Memgraph (Bolt protocol)
│   │   │   ├── sqlite.ts           # SQLite fallback
│   │   │   ├── cloud.ts            # Cloud REST API
│   │   │   └── factory.ts          # Backend factory
│   │   ├── tools/              # CLI tool handlers
│   │   ├── intelligence/       # Entity extraction, pattern recognition, context retrieval
│   │   ├── analytics/          # Graph visualization, similarity, learning paths
│   │   ├── proactive/          # Session briefing, predictions, outcome learning
│   │   ├── integration/        # Context capture, project analysis, workflow tracking
│   │   ├── migration/          # Backend-to-backend migration
│   │   ├── sdk/                # Cloud API client SDK
│   │   └── utils/              # Export/import, validation, helpers
│   ├── tests/                  # 97 tests
│   └── package.json
├── docs/                       # Documentation
└── CLAUDE.md                   # Agent instructions

Building

bash
cd ts
bun install
bun test                    # Run tests
npx tsc --noEmit            # Type check
bun build src/cli.ts --compile --outfile memorygraph  # Compile binary

Import / Migration

bash
# Import from JSON export
bun run src/cli.ts import --input backup.json --skip-duplicates

# Migrate between backends
bun run src/cli.ts migrate --to sqlite --to-path ./local.db
bun run src/cli.ts migrate --to falkordblite --to-path ./graph.falkor --no-verify
bun run src/cli.ts migrate --to memgraph --to-uri bolt://localhost:7687

SDK

The TypeScript SDK provides a client for the MemoryGraph Cloud API:

typescript
import { MemoryGraphClient } from "memorygraph/sdk";

const client = new MemoryGraphClient({ apiKey: "mg_..." });

const memory = await client.createMemory({
  type: "solution",
  title: "Fixed timeout issue",
  content: "Used exponential backoff with retries",
  tags: ["redis", "timeout"],
});

License

MIT License - see LICENSE.


Start simple. Upgrade when needed. Never lose context again.

Installatie

TypingMind
{
  "mcpServers": {
    "memory-graph": {
      "command": "memorygraph",
      "args": []
    }
  }
}

Gebruik MemoryGraph MCP met meerdere AI-modellen

TypingMind koppelt MCP-tools aan de werkruimte. Zodra MemoryGraph is verbonden, kun je deze dus met verschillende AI-modellen in TypingMind gebruiken, zonder de verbinding voor elk model apart in te stellen. Deze MCP-integratie draait lokaal via de TypingMind MCP-connector op je apparaat.

Installatiehandleiding voor de lokale connector

Gebruik dit als de MCP-server toegang nodig heeft tot lokale bestanden, apps of privébronnen op je computer.

1

Open de MCP-instellingen

Ga in TypingMind naar Instellingen, Geavanceerde instellingen en vervolgens Model Context Protocol. Kies daar Connector instellen.

  1. Open TypingMind in je browser.
  2. Klik op het pictogram Instellingen.
  3. Ga naar Geavanceerde instellingen.
  4. Open het gedeelte Model Context Protocol.
  5. Klik op Connector instellen en kies Dit apparaat.
Instelscherm voor de TypingMind MCP-connector met Dit apparaat geselecteerd
2

Voer de connectoropdracht uit

Kies Dit apparaat, kopieer de opdracht uit TypingMind en voer deze uit in Terminal. Laat het proces draaien zolang je MCP gebruikt.

  1. Kopieer de installatieopdracht die TypingMind toont.
  2. Open Terminal op macOS of Windows Terminal op Windows.
  3. Plak de opdracht en voer deze uit.
  4. Keur de pakketinstallatie goed als Terminal vraagt of je wilt doorgaan.
  5. Laat het proces in het Terminal-venster draaien zolang je MCP-tools gebruikt.
3

Voeg MemoryGraph toe als server

Klik op Servers bewerken zodra de connectorstatus Gereed is en plak de MCP-serverconfiguratie.

  1. Wacht tot de connectorstatus Gereed aangeeft.
  2. Klik op Servers bewerken.
  3. Plak de MCP-serverconfiguratie van MemoryGraph.
  4. Sla de serverlijst op.
  5. Vernieuw om te controleren of de connector nog steeds klaar is voor gebruik.
MCP-instellingen van TypingMind met een actieve server en de knop Servers bewerken
{
  "mcpServers": {
    "memory-graph": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Gebruik de verbinding met verschillende modellen

Sla de serverlijst op, open Plug-ins en schakel de MCP-tools van MemoryGraph in. Selecteer vervolgens een ondersteund AI-model in TypingMind en gebruik de tools in de chat of wijs ze toe aan een AI-agent.

  1. Open de pagina Plug-ins in TypingMind.
  2. Schakel de MCP-tools van MemoryGraph in.
  3. Start een chat en kies het AI-model dat je wilt gebruiken.
  4. Gebruik de MCP-tools in een chat of wijs ze toe aan een AI-agent.
  5. Schakel wanneer nodig over naar een ander AI-model zonder opnieuw verbinding te maken met MCP.
TypingMind-chat met ingeschakelde MCP-tools en een geselecteerd AI-model
Kun je MemoryGraph gebruiken om me hiermee te helpen?
MemoryGraph
Zeker. Ik heb het gelezen.
Dit vond ik met MemoryGraph.

Veelgestelde vragen

Waarvoor wordt de MCP-server MemoryGraph gebruikt?

MemoryGraph is een MCP-server waarmee compatibele AI-clients verbinding kunnen maken met externe tools en context. In TypingMind hoef je deze MCP-server maar één keer toe te voegen om de tools beschikbaar te maken in je AI-werkruimte.

Kan ik MemoryGraph MCP met meerdere AI-modellen in TypingMind gebruiken?

Ja. TypingMind verbindt MCP-tools op werkruimteniveau. Daardoor kun je MemoryGraph gebruiken met verschillende AI-modellen, zoals Claude, ChatGPT, Gemini of andere modellen die je in TypingMind hebt ingesteld, zonder de MCP-server voor elk model afzonderlijk in te stellen.

Waarom MemoryGraph MCP gebruiken met TypingMind?

TypingMind is een van de beste interfaces voor chats met LLM's, omdat het meerdere AI-modellen, prompts, plug-ins, AI-agenten, API-sleutels en MCP-tools samenbrengt in één werkruimte. Als MemoryGraph verbonden is, kun je de MCP-tools ervan gebruiken met je favoriete modellen en je chatworkflow overzichtelijk houden in TypingMind.

Hoe verbind ik MemoryGraph MCP met TypingMind?

MemoryGraph werkt via de lokale MCP-connector van TypingMind. Dit is de beste optie als de MCP-server toegang nodig heeft tot lokale bestanden, desktopapps, opdrachtregeltools of privébronnen op je computer.

Welke tools biedt MemoryGraph MCP in TypingMind?

MemoryGraph biedt MCP-functies die je kunt inschakelen via de pagina Plug-ins in TypingMind. Je kunt ze gebruiken in chats of toewijzen aan AI-agenten.

Moet ik mijn API-sleutels delen met TypingMind om MemoryGraph MCP te gebruiken?

Nee. TypingMind werkt in de eerste plaats lokaal en laat je de controle houden over je modelaanbieders, API-sleutels, prompts en MCP-configuratie. Als MemoryGraph authenticatie vereist, voeg je bij het maken van de verbinding de vereiste headers, OAuth-instellingen of lokale configuratie voor die MCP-server toe.

Gerelateerde MCP-servers

Toon alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇