# CheMiguel23/MemoryMesh [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/CheMiguel23/MemoryMesh  
**GitHub Stars:** 355  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/chemiguel23-memorymesh

## Description
Enhanced graph-based memory with a focus on AI role-play and story generation

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/CheMiguel23/MemoryMesh), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
git clone https://github.com/CheMiguel23/MemoryMesh.git
```

2. Install:

```sh
npm install
```

3. Install:

```sh
docker build -t memorymesh .
```

4. Start the server:

```sh
docker run -i --rm -v memorymesh-data:/data memorymesh
```

5. Install:

```sh
npm install     # also builds
```

## Documentation

## What CheMiguel23/MemoryMesh does

CheMiguel23/MemoryMesh exposes a long-term knowledge graph to AI models through the Model Context Protocol. The graph stores nodes such as people, characters, projects, locations, books, or companies, along with edges that describe how those nodes relate. Metadata can hold additional attributes, while relationships preserve links such as a character being located in a place.

The server is suited to structured memory rather than free-form conversation history. Example applications include text-based RPG campaigns, story-generation data, people and organization records, personal CRM information, and research or reading notes.

## How it works

MemoryMesh represents each node with a name, node type, and optional metadata. An edge connects two named nodes and has an edge type; it may also include a weight between 0 and 1 for strength or confidence. Graph data is stored in a JSON file, with one JSON object per line.

Schemas are JSON files ending in `.schema.json`. A schema whose name begins with `add_` defines the node type and causes MemoryMesh to create matching `add_`, `update_`, and `delete_` tools. Schema properties can be required, restricted to an enum, or marked as relationships. Relationship properties create edges to existing nodes. Invalid schema files are skipped with a logged reason, and potentially confusing configurations such as reused relationship edge types produce warnings.

Operations are transactional: validation errors, missing required fields, or references to nonexistent nodes prevent the change from being saved. Updating a node changes only supplied fields, although an empty array clears a field and replacing `metadata` replaces the complete metadata list.

## Setup and configuration

MemoryMesh requires Node.js 22 or newer. Clone the repository, run `npm install`, and start the generated `dist/index.js` through an MCP client's stdio configuration. Claude Desktop can be configured with a `node` command and the absolute path to that file, followed by a full client restart.

`MEMORYMESH_MEMORY_FILE` selects the memory file and defaults to `.memorymesh/memory.json` in the user's home directory. `MEMORYMESH_SCHEMAS_DIR` selects the schema directory and defaults to `dist/data/schemas`. Separate directories allow different projects or campaigns to use independent memories and schemas. Docker is also supported, with the container memory file at `/data/memory.json` when using the documented volume setup.

## Tools and capabilities

Built-in graph tools include:

- `read_graph` to return the complete graph.
- `search_nodes` to find nodes matching every word in a query and include direct neighbors.
- `open_nodes` to inspect named nodes and their direct neighbors.
- `add_nodes`, `update_nodes`, and `delete_nodes` for generic node operations. Renaming through `update_nodes` updates connected edges and linked-node metadata that refers to the old name.
- `add_edges`, `update_edges`, and `delete_edges` for relationship management.
- `add_metadata` and `delete_metadata` for individual metadata entries.

Schema-generated tools provide typed operations for custom node categories. The included examples cover NPCs and locations, while additional schema sets cover organizations, personal CRM records, research notes, and RPG storytelling.

## Limitations and notes

Relationship targets must already exist before a relationship field can create an edge. Each relationship field should use its own edge type because updating that field replaces all outgoing edges of that type. Setting `additionalProperties` to `false` rejects fields absent from the schema; the default behavior preserves extra fields as metadata.

Multiple MCP clients can share one memory file because writes briefly lock the file. Existing files in the older `dist/data/memory.json` location remain usable but should be moved to `.memorymesh/memory.json` before removing the build directory.

_Full upstream README: https://allmcps.com/mcp/chemiguel23-memorymesh/readme_

