SuperAPI AI Directory

MemoryMesh

Graph-based memory focused on AI role-play and story generation.

Open website

About this tool

MemoryMesh is a knowledge graph server designed for AI models, with a focus on text RPGs and interactive storytelling. It helps AI maintain consistent, structured memory across conversations, enabling richer and more dynamic interactions. The project is based on the Knowledge Graph Memory Server in the MCP servers repository and retains its core functionality.

Main Uses and Applicable Scenarios

MemoryMesh is a local knowledge graph server used to build and manage structured information for AI models. It is especially suitable for text RPGs, but its adaptable design is also applicable to social network simulations, organizational planning, or any scenario involving structured data.

Main Capabilities

  • Dynamic schema tools: Define data structures through schemas, and MemoryMesh automatically generates tools for adding, updating, and deleting data.
  • Intuitive schema design: Create schemas to guide AI in generating and connecting nodes, supporting required fields, enum types, and relationship definitions.
  • Metadata guides AI: Use metadata to provide context and structure, helping AI understand the meaning and relationships of data.
  • Relationship handling: Define relationships in schemas, encouraging AI to create connections (edges) between related data points (nodes).
  • Information feedback: Provide error feedback to AI so it can learn from mistakes and improve its interactions with the knowledge graph.
  • Event support: The event system tracks operations, providing insight into knowledge graph modifications.
  • Built-in 11 prebuilt schemas designed specifically for text RPGs.
  • Provides the SchemaManager tool, simplifying schema creation and editing through a visual interface.
  • Provides the Memory Viewer standalone web app for visually inspecting the knowledge graph.

Core Concepts

  • Nodes: Represent entities or concepts in the knowledge graph. Each node has name (unique identifier), nodeType (node type, such as npc, artifact, location, defined by the schema), metadata (array of descriptive strings), weight (optional, a numeric value between 0 and 1, representing relationship strength, default 1).
  • Edges: Represent relationships between nodes. Each edge has from (source node name), to (target node name), edgeType (relationship type, such as owns, located_in).
  • Schema: The core of MemoryMesh, defining data structures and driving automatic tool generation. Schema files (.schema.json) are placed in the dist/data/schemas directory of the built project and are automatically detected and processed at startup. The filename format is [name].schema.json, and name must start with add_.

Dynamic Tool System

MemoryMesh reads schema definitions, analyzes entity attributes and their relationships, and automatically creates the following for each entity type:

  • add_<entity>: creates a new entity instance.
  • update_<entity>: modifies an existing entity.
  • delete_<entity>: deletes an entity. These tools are provided through a central hub for use by any connected client or AI.

Data Storage and Viewing

By default, data is stored in the JSON file dist/data/memory.json. Memory Viewer is a standalone tool used to visualize and inspect the contents of the knowledge graph. Features include:

  • Graph visualization: view the knowledge graph as an interactive node-link diagram.
  • Node inspection: select a node to view its nodeType, metadata, and connected edges.
  • Edge exploration: inspect the relationships between nodes, including edgeType and direction.
  • Search and filtering: quickly find specific nodes or filter by type.
  • Table view: conveniently find and inspect specific nodes and edges.
  • Raw JSON view: view the raw JSON data of the memory file.
  • Statistics panel: provides metrics such as total node count, total edge count, node types, and edge types.

When using Memory Viewer, click the "Select Memory File" button, navigate to the project directory, and select the memory.json file (by default at dist/data/memory.json) to load and display the contents of the knowledge graph.

Installation and Configuration

Environment requirements:

  • Node.js version 18 or higher.
  • npm (usually provided with Node.js).
  • The latest version of Claude for Desktop (download from claude.ai/download).

Installation steps:

  1. Clone the repository: git clone https://github.com/CheMiguel23/memorymesh.git cd memorymesh
  2. Install dependencies: npm install
  3. Build the project: npm run build. This command compiles TypeScript to JavaScript into the dist directory and copies the sample schema and data files.
  4. Verify file copying (optional): check that dist/data contains .json files and dist/data/schemas contains .schema.json files.
  5. Configure Claude Desktop: open the configuration file (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json; Windows: %APPDATA%\Claude\claude_desktop_config.json), and add a memorymesh entry in the mcpServers section:
"mcpServers": {
  "memorymesh": {
    "command": "node",
    "args": ["/ABSOLUTE/PATH/TO/YOUR/PROJECT/memorymesh/dist/index.js"]
  }
}

Replace /ABSOLUTE/PATH/TO/YOUR/PROJECT/ with the actual absolute path. macOS example:

"command": "node",
"args": ["/Users/yourusername/Projects/memorymesh/dist/index.js"]

Windows example:

"command": "node",
"args": ["C:\\Projects\\memorymesh\\dist\\index.js"]
  1. Restart Claude Desktop for the configuration to take effect.

Verify the installation: launch Claude Desktop, open a new chat, look at the MCP plugin icon in the upper-right corner, and click it. You should see "memorymesh" in the list of connected servers, with tools listed (such as add_npc, update_npc, etc.).

Note: back up the dist/data directory before updating to avoid losing memory data.

Version Updates

v0.3.0 update: the MCP SDK was updated from v1.0.4 to v1.25.2 to comply with the current Model Context Protocol specification (2025-11-25). This major update brings compatibility with the latest MCP clients, including Claude Desktop, ChatGPT, Cursor, Gemini, and VS Code. After updating, run npm install to fetch the new dependencies. Since v0.2.7, the default schema location has changed to dist/data/schemas and is not expected to change in the future. If updating from an older version, make sure to move the schema files to the new location.

Limitations and Notes

The materials do not mention fees, pricing, or platform restrictions. Back up data before use. Troubleshooting: if the server does not appear in Claude, check whether the absolute path in the configuration file is correct, confirm that the dist directory exists and contains the compiled JavaScript files (including index.js), and check the Claude Desktop logs (macOS: ~/Library/Logs/Claude/mcp-server-memorymesh.log and mcp.log; Windows: possibly in the Logs folder under %AppData%\Claude). If the tools do not appear, make sure npm run build completes without errors, the schema files are correctly placed in dist/data/schemas and follow the naming convention (add_[entity].schema.json), and check the server console output or logs.