CheMiguel23/MemoryMesh
A knowledge graph server that uses the Model Context Protocol (MCP) to provide structured memory persistence for AI models.
What it solves
Large language models have no native long-term memory - they forget everything after a conversation ends. MemoryMesh gives AI models a structured, persistent memory in the form of a knowledge graph. Instead of trying to remember raw text, the AI can add, update, and delete factual nodes and their connections using tools you define.
How it works
MemoryMesh is an MCP (Model Context Protocol) server. You write small JSON schema files that describe the kinds of things you want to remember - people, projects, characters, locations, books, and so on. Each schema generates three tools for the AI: add, update, and delete. For example, a schema named add_npc creates add_npc, update_npc, and delete_npc.
The memory itself is a graph of nodes (things) and edges (connections). Nodes have a name, a type, and optional metadata. Edges link two nodes and can have a weight from 0 to 1. Any field marked as a relationship in a schema automatically creates an edge to the named node.
Every call is all-or-nothing: if anything is invalid (missing required field, linking to a nonexistent node), nothing is saved and the AI gets a clear error. The server also includes built-in tools for reading the whole graph, searching nodes, adding edges, and managing metadata.
Who it's for
Anyone who wants a persistent, queryable memory for an AI assistant or agent. The README lists example uses: a text-based RPG world, company people and teams, a personal CRM, or your reading notes. You need Node.js 18 or newer and an MCP client like Claude Desktop to run it.
Highlights
- Schema-based memory: define your own node types and relationships in small JSON files
- Generates add/update/delete tools automatically for each schema
- Built-in tools for browsing, searching, and editing the graph at a lower level
- All-or-nothing operations with clear error messages
- Supports metadata on nodes and weights on edges
- Ships with example schemas (npc, location) and ready-made schema sets in Discussions
- Includes a visual SchemaManager and a MemoryViewer (HTML files you can open in a browser)
- Configurable memory file and schema folder, works with Docker
Related
- Project
- Project
- Project
- Project