home / mcp / memorymesh mcp server
A knowledge graph server that uses the Model Context Protocol (MCP) to provide structured memory persistence for AI models.
Configuration
View docs{
"mcpServers": {
"chemiguel23-memorymesh": {
"command": "node",
"args": [
"/ABSOLUTE/PATH/TO/YOUR/PROJECT/memorymesh/dist/index.js"
]
}
}
}MemoryMesh is a local knowledge graph server that helps AI models maintain structured memory across conversations. It uses schemas to automatically generate tools for managing data, making it ideal for interactive storytelling, RPGs, and other applications that require consistent, connected memory.
Connect MemoryMesh to your MCP client to start interacting with the knowledge graph. You will access automatically generated tools that match your defined schemas, such as adding, updating, or deleting nodes and edges. Use Memory Mesh to train the AI to build coherent narratives, reference prior world state, and reason over structured relationships.
Key concepts you’ll work with include nodes (entities like characters, locations, items) and edges (relationships such as located_in or owns). You can explore the memory via the Memory Viewer to inspect nodes, edges, and their metadata, or use the dynamic tools to shape the graph as your story evolves.
Your MCP client should call the tools exposed by MemoryMesh through the central hub. Typical workflows include creating new entities at the start of a session, updating them as the story progresses, and pruning data when necessary. The tools are generated from your schemas, so they adapt to the data structures you define.
Prerequisites you need to prepare before installing MemoryMesh:
• Node.js version 18 or higher
• npm (usually installed with Node.js)
• Claude Desktop (latest version) to connect MemoryMesh via MCPnpx -y @smithery/cli install memorymesh --client claude1) Clone the project and install dependencies.
git clone https://github.com/CheMiguel23/memorymesh.git
cd memorymesh
npm install2) Build the project to generate the dist folder and copy sample data and schemas.
npm run build3) Verify the dist/data directories exist and contain JSON and schema files.
dist/data
dist/data/schemasAdd MemoryMesh as an MCP server in Claude Desktop. The configuration uses a local stdio server that runs Node.js with your built project’s entry point.
{
"type": "stdio",
"name": "memorymesh",
"command": "node",
"args": ["/ABSOLUTE/PATH/TO/YOUR/PROJECT/memorymesh/dist/index.js"]
}1) Start Claude Desktop and open a new chat.
2) Look for the MCP plugin icon in the top-right corner. If it appears, the client is connected.
3) Click the MCP plugin to see MemoryMesh listed. Click it again to view the available tools such as add_npc, update_npc, and delete_npc.
By default, your memory graph is stored in dist/data/memory.json.
Use the Memory Viewer to visualize the graph, inspect nodes and edges, and view metadata. You can select the memory file, explore the graph with a node-link diagram, and switch to table or raw JSON views for detailed inspection.
You can override default settings by editing the configuration file at /config/config.ts. Two commonly adjusted options are:
• MEMORY_FILE: Path to the JSON file that stores the knowledge graph data. Default is dist/data/memory.json.
• SCHEMAS_DIR: Path to the folder containing schema files. Default is dist/data/schemas/memory.json.
If you update MemoryMesh, back up your dist/data directory to avoid data loss.
Common issues include the server not appearing in Claude, missing tools, or build failures. Ensure the dist directory exists, the index.js file is present, and your schemas follow the naming convention add_<entity>.schema.json. Check client logs and the system console for errors.
Create a new NPC node with required fields defined by the NPC schema.
Update properties of an existing NPC node.
Remove an NPC node from the memory graph.
Create a new location node according to the location schema.
Modify details of an existing location node.
Remove a location node from the memory graph.
Add an artifact node as defined by its schema.
Update details of an artifact node.
Delete an artifact node from the knowledge graph.