MemoryMesh
A knowledge graph server that uses the Model Context Protocol (MCP) to provide structured memory persistence for AI models.
claude mcp add --transport stdio chemiguel23-memorymesh node dist/index.js \ --env NODE_ENV="production" \ --env MEMORYMESH_CONFIG="dist/config.json"
How to use
MemoryMesh is a local knowledge graph server designed to help AI models maintain structured memory across conversations, with a focus on text-based RPGs and interactive storytelling. It automatically generates dynamic tools from your schemas, enabling the AI to add, update, and link nodes and edges in a graph. The server includes a SchemaManager tool for creating and editing schemas via a visual interface, and ships with pre-built RPG-focused schemas to accelerate setup. To use MemoryMesh, start the server and interact with the generated tools (e.g., add_npc, update_npc, add_location) through MCP-compliant clients. The server emits events for memory changes, which you can monitor to gain insights into how the knowledge graph evolves during gameplay or conversations. Be sure to place your schema files in the expected dist/data/schemas directory so MemoryMesh can discover and generate the corresponding tools on startup.
How to install
Prerequisites:
- Node.js (18+ recommended) and npm
- Git
Install and run locally:
- Clone the repository: git clone https://github.com/CheMiguel23/MemoryMesh.git
- Navigate to the project directory: cd MemoryMesh
- Install dependencies: npm install
- Build the project (if a build step is required by the project): npm run build
- Start the MemoryMesh MCP server:
npm run start
or directly: node dist/index.js
Notes:
- If you update schemas or dependencies, re-run the build and restart the server.
- Ensure your schemas are located in dist/data/schemas after build, as MemoryMesh auto-detects them on startup.
Additional notes
Tips and considerations:
- The MCP SDK was updated to v1.25.2 (as of v0.3.0) to align with the latest MCP specification. After updating, run npm install to fetch updated dependencies.
- The default schema location changed in v0.2.7 to dist/data/schemas; migrate any older schema files to this path.
- MemoryMesh auto-generates tools from schemas (e.g., add_npc, update_npc, delete_npc). You can customize tool descriptions and constraints through the schema’s description, properties, and relationships.
- The SchemaManager tool provides a visual interface for schema creation and editing and helps avoid writing JSON manually.
- For best results with AI memory guidance, leverage metadata, enumerated types, and explicit relationship edges (e.g., located_in, owns) within your schemas.
- When deploying with clients (Claude Desktop, ChatGPT, Cursor, Gemini, VS Code), ensure the MCP client and server versions are compatible with the 2025-11-25 MCP specification.
- If you encounter path or schema loading issues, verify that dist/data/schemas contains valid .schema.json files and that the server has read access to the dist directory.
Related MCP Servers
CanvasMCPClient
Canvas MCP Client is an open-source, self-hostable dashboard application built around an infinite, zoomable, and pannable canvas. It provides a unified interface for interacting with multiple MCP (Model Context Protocol) servers through a flexible, widget-based system.
docmole
Dig through any documentation with AI - MCP server for Claude, Cursor, and other AI assistants
obsidian
MCP server for Obsidian vault management - enables Claude and other AI assistants to read, write, search, and organize your notes
GameMaker
GameMaker MCP server for Cursor - Build GM projects with AI
xgmem
Global Memory MCP server, that manage all projects data.
mcp-turso
MCP server for interacting with Turso-hosted LibSQL databases