# MemoryMesh

> MCP Server

MemoryMesh is a knowledge graph server for AI models, ideal for text-based RPGs and interactive storytelling, helping AI maintain consistent, structured memory across conversations for richer interactions. MemoryMesh is a

## Overview

- **Category:** AI
- **Language:** TypeScript
- **Stars:** 351
- **Forks:** 20
- **Owner:** CheMiguel23
- **GitHub:** https://github.com/CheMiguel23/MemoryMesh
- **Created:** 2024-12-06T00:50:19+00:00
- **Updated:** 2025-03-28T00:51:19+00:00
- **Source:** https://model-context-protocol.com/servers/knowledge-graph-server-ai-model-memory

## Setup

## Setup

1.  **Clone the Repository:**

    ```bash
    git clone https://github.com/CheMiguel23/memorymesh.git
    cd memorymesh
    ```

2.  **Install Dependencies:**

    ```bash
    npm install
    ```

3.  **Build the Project:**

    ```bash
    npm run build
    ```
   This command compiles the TypeScript code into JavaScript in the `dist` directory and copies sample schema and data files into it as well.

4.  **Verify File Copy (Optional):**

    *   The build process should automatically copy the `data` folder to `dist`.
    *   **Check** that `dist/data` exists and contains `.json` files. Also verify that `dist/data/schemas` exists and contains `.schema.json` files.

5.  **Configure Claude Desktop:**

   Open your Claude Desktop configuration file:

    * **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
    * **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
    * Add an entry for `memorymesh` to the `mcpServers` section. You can choose **one** of the following configuration options:

    ```json
    "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** to your `memorymesh` project directory.
    *   **Example (macOS):**
        ```json
        "command": "node",
        "args": ["/Users/yourusername/Projects/memorymesh/dist/index.js"]
        ```
    *   **Example (Windows):**
        ```json
        "command": "node",
        "args": ["C:\\Projects\\memorymesh\\dist\\index.js"]
        ```

6.  **Restart Claude Desktop:** Completely restart Claude Desktop for the changes to take effect.

## Tools

## Available Tools

1.  **Knowledge Graph Server:** Designed for AI models, focusing on text-based RPGs and interactive storytelling.
2.  **Dynamic Schema-Based Tools:** Automatically generates tools for data management based on defined schemas.
3.  **SchemaManager Tool:** Simplifies schema creation and editing with a visual interface.
4.  **Memory Viewer:** Visualizes and inspects the contents of the knowledge graph.
5.  **Event Support:** Tracks operations, providing insights into how the knowledge graph is being modified.
6.  **Pre-built Schemas:** Includes 11 pre-built schemas designed for text-based RPGs.
7.  **Dynamic Tools:** Automatically generated tools from schema definitions for adding, updating, and deleting entities.

