Back to MCP Catalog

MemoryMesh MCP Server

Knowledge & MemoryTypeScript
A knowledge graph server for structured memory persistence in AI models
Available Tools

add_node

Add a new node to the knowledge graph based on the defined schema

update_node

Update an existing node in the knowledge graph

delete_node

Delete a node from the knowledge graph

add_edge

Create a relationship (edge) between two nodes

search

Search for nodes in the knowledge graph

get_schema

Retrieve the schema definition for a specific node type

MemoryMesh is a knowledge graph server that implements the Model Context Protocol (MCP) to provide structured memory persistence for AI models. It excels at maintaining consistent, structured information across conversations, with particular strength in text-based RPGs and interactive storytelling applications. The server enables dynamic schema-based tools that automatically generate methods for adding, updating, and deleting data in the knowledge graph. With intuitive schema design and relationship handling, MemoryMesh helps AI models understand connections between data points and maintain contextual awareness throughout interactions.

Installation

Prerequisites

  • Node.js (latest LTS version recommended)
  • npm or yarn

Setup Instructions

  1. Clone the repository:
git clone https://github.com/CheMiguel23/MemoryMesh.git
cd MemoryMesh
  1. Install dependencies:
npm install
  1. Build the project:
npm run build
  1. Start the server:
npm start

The server will start on port 3000 by default. You can access the Schema Manager at http://localhost:3000/SchemaManager.html and the Memory Viewer at http://localhost:3000/MemoryViewer.html.

Docker Installation

Alternatively, you can use Docker:

docker build -t memorymesh .
docker run -p 3000:3000 memorymesh

Configuration

Schema Management

MemoryMesh uses schemas to define the structure of your data. Schemas should be placed in the dist/data/schemas directory after building the project.

Each schema file should follow the naming convention add_[type].schema.json, for example add_npc.schema.json.

Schema structure:

{
  "name": "add_npc",
  "description": "Add a non-player character to the memory",
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the NPC"
    },
    "metadata": {
      "type": "array",
      "description": "Descriptive details about the NPC",
      "items": {
        "type": "string"
      }
    }
  },
  "required": ["name", "metadata"],
  "relationships": [
    {
      "type": "located_in",
      "description": "The location where this NPC can be found",
      "target": "location"
    }
  ]
}

Using the Schema Manager

The Schema Manager provides a web interface for creating and managing schemas. Access it at http://localhost:3000/SchemaManager.html after starting the server.

  1. Enter a schema name (must start with add_)
  2. Add properties with their types and descriptions
  3. Mark required properties
  4. Define relationships to other node types
  5. Save the schema

Using the Memory Viewer

The Memory Viewer allows you to visualize and interact with the knowledge graph. Access it at http://localhost:3000/MemoryViewer.html.

Features include:

  • Viewing all nodes and edges in the graph
  • Filtering by node type
  • Searching for specific nodes
  • Viewing node details and relationships
  • Exporting the graph data

Integration with AI Models

To integrate MemoryMesh with your AI model, you'll need to configure your AI client to use the MCP server. The server exposes endpoints that follow the Model Context Protocol.

When properly configured, the AI model will have access to tools for:

  • Adding nodes to the graph
  • Updating existing nodes
  • Deleting nodes
  • Searching for nodes
  • Creating relationships between nodes

The schema-based approach ensures that the AI model understands the structure of your data and can maintain consistency across interactions.

Related MCPs

Knowledge Graph Memory
Knowledge & MemoryTypeScript

A persistent memory system using a local knowledge graph

Cognee
Knowledge & MemoryPython

Knowledge management and retrieval system with code graph capabilities

Wolfram Alpha
Knowledge & MemoryPython

Connect your chat to Wolfram Alpha computational intelligence

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.