MemoryMesh
MemoryMesh is a knowledge graph server designed for AI models, particularly for text-based RPGs and interactive storytelling. Its capabilities include:
Schema-Based Data Management: Define custom data structures and automatically generate tools for adding, updating, and deleting data.
Node & Edge Operations: Manage entities (nodes) and relationships (edges) in the knowledge graph with properties, types, and weights.
Domain-Specific Management: Handle game elements like artifacts, currencies, factions, inventories, locations, NPCs, player characters, quests, skills, temporal events, and transportation.
Search & Retrieval: Query the graph and retrieve specific nodes by name.
Visualization: Explore and visualize the knowledge graph through the Memory Viewer tool.
AI Integration: Connect with AI models (e.g., Claude Desktop) via MCP for AI interaction with the graph.
Event Tracking: Monitor knowledge graph modifications through an event system.
Schema Management: Use SchemaManager for visual schema creation and editing.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MemoryMesh add a new NPC named Elara with the class of wizard and affiliation to the Arcane Council"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MemoryMesh
MemoryMesh is an MCP server that gives AI models a structured, long-term memory in the form of a knowledge graph. You describe the kinds of things you want to remember in small schema files (people, projects, characters, locations, books...), and MemoryMesh turns each one into tools the AI uses to add, update and delete that information, linking related items as it goes.
It works for anything you can describe as things and the connections between them: a text-based RPG world, the people and teams at your company, a personal CRM, or your reading notes.
Based on the Knowledge Graph Memory Server from the MCP servers repository.
How it works
The memory is a graph of nodes and edges:
A node is a thing:
{"name": "Mara", "nodeType": "npc", "metadata": ["role: Blacksmith", "status: injured"]}An edge is a connection between two nodes:
{"from": "Mara", "to": "Riverton", "edgeType": "located_in"}. Edges can have an optionalweightfrom 0 to 1 (strength or confidence; treated as 1 when not set).
A schema describes one type of node. For a schema named add_npc, MemoryMesh creates three tools:
add_npccreates an NPC. Fields marked as relationships also create edges to the nodes they name.update_npcchanges the fields you pass and keeps everything else. Passingmetadatareplaces the whole list.delete_npcremoves the NPC and its edges.
Every call is all-or-nothing: if anything is wrong (a missing required field, a link to a node that doesn't exist), nothing is saved, and the AI gets a clear error it can act on.
Schema format
Each schema is a JSON file ending in .schema.json. This is the npc example that ships with MemoryMesh:
{
"name": "add_npc",
"description": "Add a new character (NPC) to the knowledge graph",
"properties": {
"name": { "type": "string", "description": "The character's unique name", "required": true },
"description": { "type": "string", "description": "Who the character is", "required": true },
"status": { "type": "string", "description": "Current condition", "enum": ["alive", "injured", "dead", "missing"] },
"traits": { "type": "array", "description": "Personality traits" },
"currentLocation": {
"type": "string",
"description": "Where the character is now",
"relationship": { "edgeType": "located_in", "description": "Where the character is now (must already exist)" }
}
},
"additionalProperties": true
}Key | Meaning |
| Must start with |
| Description of the |
| The fields. Each has a |
↳ |
|
↳ | A list of allowed values. |
↳ | Creates an edge ( |
|
|
If a schema file is invalid, MemoryMesh skips it, logs the reason, and starts with the others.
The SchemaManager lets you create and edit schemas visually (guide).
Example schema sets
MemoryMesh ships with two small examples, npc and location. Ready-made sets for different uses are shared in Discussions:
People & organization: people, teams, projects, places and events (who reports to whom, who's responsible for what, who went where, birthdays)
Personal CRM: contacts, companies, interactions and follow-ups
Research & reading notes: sources, authors, concepts and notes
RPG & storytelling: the full set of 11 schemas for text-based games
Feel free to share your own.
Built-in tools
These are always available, whatever schemas you use:
Tool | Purpose |
| Return the whole graph |
| Find nodes by name, type or metadata, with their direct neighbours |
| Return specific nodes by name, with their direct neighbours |
| Work with nodes of any type |
| Work with edges |
| Add or remove individual metadata entries |
Related MCP server: ainative-memory-mcp
Installation
You need Node.js 18 or newer and an MCP client such as Claude Desktop.
Download and build MemoryMesh:
git clone https://github.com/CheMiguel23/MemoryMesh.gitcd MemoryMeshnpm installnpm installalso builds the project intodist/.Add MemoryMesh to Claude Desktop. Open Settings → Developer → Edit Config and add:
{ "mcpServers": { "memorymesh": { "command": "node", "args": ["/ABSOLUTE/PATH/TO/MemoryMesh/dist/index.js"] } } }On Windows, double every backslash:
"C:\\Projects\\MemoryMesh\\dist\\index.js".Fully quit and restart Claude Desktop. MemoryMesh and its tools (
add_npc,read_graph, ...) appear in the tools menu of the chat box.
Updating
git pullnpm installThen restart your MCP client. Updating keeps your memory file and any schemas you edited.
Configuration
Environment variable | What it sets | Default |
| Path of the memory file |
|
| Folder containing |
|
Set them in your Claude Desktop config:
"memorymesh": {
"command": "node",
"args": ["/ABSOLUTE/PATH/TO/MemoryMesh/dist/index.js"],
"env": {
"MEMORYMESH_MEMORY_FILE": "/ABSOLUTE/PATH/TO/my-project/memory.json",
"MEMORYMESH_SCHEMAS_DIR": "/ABSOLUTE/PATH/TO/my-project/schemas"
}
}Keeping your schemas and memory in a folder of your own keeps them separate from the MemoryMesh code. You can also run several MemoryMesh entries with different folders, for example one per campaign or project.
Docker: docker build -t memorymesh . then docker run -i --rm -v memorymesh-data:/data memorymesh. The memory file is /data/memory.json inside the container.
Viewing your memory
The memory file stores one JSON object per line. The MemoryViewer displays it as a searchable table with stats (guide): open it in Chrome or Edge, click Select Memory File, and pick your memory.json.
Tips
Tell the AI what the memory is for, for example in a Claude Project's instructions: "Use the memorymesh tools to record every person, team and project I mention, and check the graph before answering questions about them."
The AI can be hesitant to delete things. Ask explicitly when you want something removed.
When information conflicts, the latest update wins. To keep both versions, record the source or date in metadata (
"source: tavern gossip","as of: chapter 3"), or store competing claims as separate nodes.
Troubleshooting
MemoryMesh doesn't appear in Claude Desktop: check that the path in the config is absolute and points to
dist/index.js(with doubled backslashes on Windows), and thatnpm installfinished without errors.Tools are missing: check that your schema files end in
.schema.jsonand that theirnamestarts withadd_.Check the log, where MemoryMesh reports which schemas it loaded and why any were skipped:
macOS:
~/Library/Logs/Claude/mcp-server-memorymesh.logWindows: the
logsfolder inside%APPDATA%\Claude
Development
npm install # also builds
npm test # runs the test suite
npm run watch # recompiles on changeFile | Purpose |
| Entry point: loads schemas and starts the server on stdio |
| Lists tools and routes each tool call to its handler |
| Definitions of the built-in tools |
| Loads schema files and implements the generated |
| The graph operations themselves, with input validation |
| Reads and writes the memory file, one change at a time |
| Paths and version |
| Shared types |
Contributing
Contributions, feedback, ideas and schema sets are welcome. Open an issue, start a discussion, or send a pull request.
Available Tools
44 toolsadd_artifactC
Add a new artifact or unique item to the knowledge graph
Inputs: artifact (required).
add_currencyD
Represents a type of currency in the game world.
Inputs: currency (required).
add_edgesC
Add multiple new edges between nodes in the knowledge graph. Edges should be in active voice
Inputs: edges (required).
add_factionD
A faction or organization operating within the game world.
Inputs: faction (required).
add_inventoryD
A collection of items or equipment belonging to a character, entity, or location.
Inputs: inventory (required).
add_locationC
Add a new location to the knowledge graph
Inputs: location (required).
add_metadataC
Add new metadata to existing nodes in the knowledge graph
Inputs: metadata (required).
add_nodesC
Add multiple new nodes in the knowledge graph
Inputs: nodes (required).
add_npcC
Add a new Non-Player Character (NPC) to the knowledge graph
Inputs: npc (required).
add_player_characterC
Add a new Player Character to the knowledge graph
Inputs: player_character (required).
add_questC
Add a new Quest to the knowledge graph
Inputs: quest (required).
add_skillsC
Defines list of skills or abilities a character can possess.
Inputs: skills (required).
add_temporalD
Represents a specific point in time and its associated environmental conditions.
Inputs: temporal (required).
add_transportationD
Represents a transportation owned or used by a character or entity.
Inputs: transportation (required).
delete_artifactC
Delete an existing artifact from the knowledge graph
Inputs: delete_artifact (required).
delete_currencyC
Delete an existing currency from the knowledge graph
Inputs: delete_currency (required).
delete_edgesC
Delete multiple edges from the knowledge graph
Inputs: edges (required).
delete_factionC
Delete an existing faction from the knowledge graph
Inputs: delete_faction (required).
delete_inventoryC
Delete an existing inventory from the knowledge graph
Inputs: delete_inventory (required).
delete_locationC
Delete an existing location from the knowledge graph
Inputs: delete_location (required).
delete_metadataC
Delete specific metadata from nodes in the knowledge graph
Inputs: deletions (required).
delete_nodesC
Delete multiple nodes and their associated edges from the knowledge graph
Inputs: nodeNames (required).
delete_npcC
Delete an existing npc from the knowledge graph
Inputs: delete_npc (required).
delete_player_characterC
Delete an existing player_character from the knowledge graph
Inputs: delete_player_character (required).
delete_questC
Delete an existing quest from the knowledge graph
Inputs: delete_quest (required).
delete_skillsC
Delete an existing skills from the knowledge graph
Inputs: delete_skills (required).
delete_temporalC
Delete an existing temporal from the knowledge graph
Inputs: delete_temporal (required).
delete_transportationC
Delete an existing transportation from the knowledge graph
Inputs: delete_transportation (required).
open_nodesC
Open specific nodes in the knowledge graph by their names
Inputs: names (required).
read_graphB
Read the entire knowledge graph
Inputs: no named parameters.
search_nodesC
Search for nodes in the knowledge graph based on a query
Inputs: query (required).
update_artifactC
Update an existing artifact in the knowledge graph
Inputs: update_artifact (required).
update_currencyC
Update an existing currency in the knowledge graph
Inputs: update_currency (required).
update_edgesC
Update existing edges in the knowledge graph
Inputs: edges (required).
update_factionC
Update an existing faction in the knowledge graph
Inputs: update_faction (required).
update_inventoryC
Update an existing inventory in the knowledge graph
Inputs: update_inventory (required).
update_locationC
Update an existing location in the knowledge graph
Inputs: update_location (required).
update_nodesC
Update existing nodes in the knowledge graph
Inputs: nodes (required).
update_npcC
Update an existing npc in the knowledge graph
Inputs: update_npc (required).
update_player_characterC
Update an existing player_character in the knowledge graph
Inputs: update_player_character (required).
update_questC
Update an existing quest in the knowledge graph
Inputs: update_quest (required).
update_skillsD
Update an existing skills in the knowledge graph
Inputs: update_skills (required).
update_temporalC
Update an existing temporal in the knowledge graph
Inputs: update_temporal (required).
update_transportationC
Update an existing transportation in the knowledge graph
Inputs: update_transportation (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 44 tools
Each tool has a clearly distinct purpose targeting specific entity types (e.g., artifact, currency, faction) or graph operations (e.g., add_edges, read_graph, search_nodes). The CRUD pattern per entity eliminates ambiguity, as tools are differentiated by both action (add/update/delete) and target resource.
All tools follow a consistent verb_noun pattern with snake_case, using verbs like add, delete, update, read, search, and open paired with specific nouns. This uniformity makes the tool set predictable and easy to navigate, with no deviations in naming conventions.
With 44 tools, the count is excessive for the server's purpose of managing a knowledge graph for game worlds. While the tools cover many entities, the high number could overwhelm agents and suggests over-specialization, as similar operations are duplicated across numerous entity types rather than generalized.
The tool set provides comprehensive CRUD coverage for all key game world entities (e.g., artifacts, currencies, factions, NPCs) and essential graph operations (e.g., add/update/delete nodes/edges, read, search). No obvious gaps exist; agents can fully manage the knowledge graph lifecycle without dead ends.
Maintenance
Related MCP Connectors
Repository knowledge graph MCP server for codebase understanding and debugging.
MCP server for querying BrainKB, a knowledge base for neuroscience knowledge graphs.
Personal knowledge graph as an AI memory layer over MCP - read, save, and link your memories.
Personal knowledge base MCP server with semantic search, auto-categorization, metadata extraction
Related MCP Servers
- AlicenseBqualityBmaintenanceAn enhanced fork of the official MCP memory server that enables persistent knowledge graph storage with automatic timestamps, tags, importance levels, date range search, comprehensive statistics, and multi-format export (JSON, CSV, GraphML).24160 npm3MIT
- AlicenseAqualityCmaintenanceEnhanced MCP knowledge graph memory server with cloud persistence and semantic search, acting as a drop-in replacement for the standard memory server.10207 npmMIT
- AlicenseNot gradedqualityCmaintenanceA universal MCP server providing persistent, structured memory through a knowledge graph with graph storage, semantic vector search, and multi-hop traversal for AI agents and IDEs.18 PyPI1MIT
- AlicenseNot gradedqualityFmaintenanceKnowledge-graph memory server for MCP-compatible AI tools, providing persistent, connected memory with typed relationships and auto-consolidation.34 npmMIT