Memory MCP Server

SSE

by okooo5km

107 1.1k downloads Not rated yet

About

A Model Context Protocol server that provides knowledge graph management capabilities.

Details

Transport
SSE

Explore

Knowledge Graph Storage: Maintain a persistent graph of entities and their relationships
Entity Management: Create, retrieve, update, and delete entities with custom types
Relation Tracking: Define and manage relationships between entities in active voice
Observation System: Add and remove observations about entities over time
Powerful Search: Find relevant nodes by name, type, or observation content
Persistent Storage: Data persists between sessions in a simple JSON format

The easiest way to install is with the one-line installer, which automatically downloads the latest version and installs it to ~/.local/bin in your home directory:

curl -fsSL https://raw.githubusercontent.com/okooo5km/memory-mcp-server/main/install.sh | bash

The installer will:

Create ~/.local/bin if it doesn't exist
Add this directory to your PATH (in .zshrc or .bashrc)
Download and install the latest version
Make the binary executable

mkdir -p ~/.local/bin
cp $(swift build -c release --show-bin-path)/memory-mcp-server ~/.local/bin/


Make sure ~/.local/bin is in your PATH by adding to your shell configuration file:

bash
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc # or ~/.bashrc
source ~/.zshrc # or source ~/.bashrc

The server supports the following environment variables:

MEMORY_FILE_PATH: Custom path for storing the knowledge graph (optional)
If not specified, defaults to memory.json in the current working directory
* Can be an absolute path or relative to the current working directory

You can check the configured file path in the server logs when starting the server.

bash
export MEMORY_FILE_PATH="/path/to/your/memory.json"

Add to your Claude settings:

json
"mcpServers": {
"memory": {
"command": "memory-mcp-server",
"env": {
"MEMORY_FILE_PATH": "/path/to/your/memory.json"
}
}
}

Add the following configuration to your Cursor editor's Settings - mcp.json:

json
{
"mcpServers": {
"memory": {
"command": "memory-mcp-server",
"env": {
"MEMORY_FILE_PATH": "/path/to/your/memory.json"
}
}
}
}
```

cursor-settings

Add the memory MCP server to your Chatwise Settings - Tools.

chatwise-settings-tools

create_entities

Create multiple new entities in the knowledge graph

entities

(array, required): Array of entity objects to create

name

(string): The name of the entity

entityType

(string): The type of the entity

observations

(array of strings): Observations associated with the entity

create_relations

Create multiple new relations between entities

relations

(array, required): Array of relation objects

from

(string): The name of the entity where the relation starts

to

(string): The name of the entity where the relation ends

relationType

(string): The type of the relation (in active voice)

add_observations

Add new observations to existing entities

entityName

(string): The name of the entity to add observations to

contents

(array of strings): The observations to add

delete_entities

Delete multiple entities and their associated relations

entityNames

(array, required): Array of entity names to delete

delete_observations

Delete specific observations from entities

deletions

(array, required): Array of observation deletions

delete_relations

Delete multiple relations from the knowledge graph

read_graph

Read the entire knowledge graph

search_nodes

Search for nodes in the knowledge graph based on a query

query

(string, required): Search query to match against entity names, types, and observations

open_nodes

Open specific nodes in the knowledge graph by their names

names

(array, required): Array of entity names to retrieve

create_entities - Create multiple new entities in the knowledge graph
entities (array, required): Array of entity objects to create
name (string): The name of the entity
entityType (string): The type of the entity
observations (array of strings): Observations associated with the entity

create_relations - Create multiple new relations between entities
relations (array, required): Array of relation objects
from (string): The name of the entity where the relation starts
to (string): The name of the entity where the relation ends
relationType (string): The type of the relation (in active voice)

add_observations - Add new observations to existing entities
observations (array, required): Array of observation additions
entityName (string): The name of the entity to add observations to
contents (array of strings): The observations to add

delete_entities - Delete multiple entities and their associated relations
entityNames (array, required): Array of entity names to delete

delete_observations - Delete specific observations from entities
deletions (array, required): Array of observation deletions
entityName (string): The name of the entity containing the observations
observations (array of strings): The observations to delete

delete_relations - Delete multiple relations from the knowledge graph
relations (array, required): Array of relation objects to delete
from (string): The source entity name
to (string): The target entity name
relationType (string): The relation type

read_graph - Read the entire knowledge graph
No parameters required

search_nodes - Search for nodes in the knowledge graph based on a query
query (string, required): Search query to match against entity names, types, and observations

open_nodes - Open specific nodes in the knowledge graph by their names
* names (array, required): Array of entity names to retrieve

> A Model Context Protocol server that provides knowledge graph management capabilities. This server enables LLMs to create, read, update, and delete entities and relations in a persistent knowledge graph, helping AI assistants maintain memory across conversations. This is a Swift implementation of the official TypeScript Memory MCP Server.

Note: This Swift version requires macOS 14.0 or later. For broader platform support (including Windows, Linux, and macOS 11.0+), check out the Go language implementation: memory-mcp-server-go.

Swift Platform
License

✨ Features

Knowledge Graph Storage: Maintain a persistent graph of entities and their relationships
Entity Management: Create, retrieve, update, and delete entities with custom types
Relation Tracking: Define and manage relationships between entities in active voice
Observation System: Add and remove observations about entities over time
Powerful Search: Find relevant nodes by name, type, or observation content
Persistent Storage: Data persists between sessions in a simple JSON format

Available Tools

create_entities - Create multiple new entities in the knowledge graph
entities (array, required): Array of entity objects to create
name (string): The name of the entity
entityType (string): The type of the entity
observations (array of strings): Observations associated with the entity

create_relations - Create multiple new relations between entities
relations (array, required): Array of relation objects
from (string): The name of the entity where the relation starts
to (string): The name of the entity where the relation ends
relationType (string): The type of the relation (in active voice)

add_observations - Add new observations to existing entities
observations (array, required): Array of observation additions
entityName (string): The name of the entity to add observations to
contents (array of strings): The observations to add

delete_entities - Delete multiple entities and their associated relations
entityNames (array, required): Array of entity names to delete

delete_observations - Delete specific observations from entities
deletions (array, required): Array of observation deletions
entityName (string): The name of the entity containing the observations
observations (array of strings): The observations to delete

delete_relations - Delete multiple relations from the knowledge graph
relations (array, required): Array of relation objects to delete
from (string): The source entity name
to (string): The target entity name
relationType (string): The relation type

read_graph - Read the entire knowledge graph
No parameters required

search_nodes - Search for nodes in the knowledge graph based on a query
query (string, required): Search query to match against entity names, types, and observations

open_nodes - Open specific nodes in the knowledge graph by their names
names (array, required): Array of entity names to retrieve

Installation

Option 1: One-Line Installation (curl)

The easiest way to install is with the one-line installer, which automatically downloads the latest version and installs it to ~/.local/bin in your home directory:

curl -fsSL https://raw.githubusercontent.com/okooo5km/memory-mcp-server/main/install.sh | bash

The installer will:

Create ~/.local/bin if it doesn't exist
Add this directory to your PATH (in .zshrc or .bashrc)
Download and install the latest version
Make the binary executable

Option 2: Build from Source

1. Clone the repository:

   git clone https://github.com/okooo5km/memory-mcp-server.git
   cd memory-mcp-server
   

2. Build the project:

   swift build -c release
   

3. Install the binary:

   # Install to user directory (recommended, no sudo required)
   mkdir -p ~/.local/bin
   cp $(swift build -c release --show-bin-path)/memory-mcp-server ~/.local/bin/
   

Make sure ~/.local/bin is in your PATH by adding to your shell configuration file:

   echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc  # or ~/.bashrc
   source ~/.zshrc  # or source ~/.bashrc
   

Command Line Arguments

The server supports the following command line arguments:

-h, --help: Display help information about the server, its usage, and available options

  • -v, --version: Display the version number of the memory-mcp-server


Example usage:

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

No reviews posted yet.

Videos about Memory MCP Server

Relevant YouTube tutorials, setups, and demos