Labsco
MCP SERVER

MemoryMesh

by CheMiguel23

Give an AI a memory of your world — characters, places, artifacts — that stays consistent between sessions.

Agent Memory
Summary
You write the schema; the tools that write to it are generated from it.

That inversion is what keeps the graph coherent: a required field with a relationship means the AI creates both the node and its edge every time, and an enum means it picks from your list rather than inventing a race. Worth knowing before you build on it: conflicting information is last-write-wins, so track sources in metadata or split disputed facts into separate nodes.

What it is

A local knowledge graph server aimed at text-based RPGs and interactive storytelling, where the tools an AI gets are generated from schemas you write.

What you get
  • Nodes with a name, a nodeType you define, and metadata strings describing them
  • Edges between nodes with an edgeType such as owns or located_in, and an optional weight from 0 to 1
  • Tools generated from each schema: add, update and delete per entity type, so an npc schema yields add_npc, update_npc and delete_npc
  • Schema features that steer the model — required fields, enum choices, and relationship definitions that make it create the edge along with the node
  • 11 pre-built schemas for text-based RPGs, ready to start from
  • Error feedback returned to the AI, so it can correct a malformed write
  • A SchemaManager page for editing schemas visually, and a Memory Viewer for exploring the graph as a node-link diagram, table or raw JSON
Requirements

Node.js 18 or higher and npm. Clone, npm install, npm run build, then point your client at dist/index.js. Schema files ending in .schema.json go in dist/data/schemas and are picked up at startup; a schema's name must start with add_ to be recognised. Data lives in dist/data/memory.json, and MEMORY_FILE and SCHEMAS_DIR can move both.

Setup effort

One command — npx -y memorymesh