# memory-mcp-server

> MCP Server

This Swift repository provides a Model Context Protocol (MCP) server for knowledge graph management, enabling LLMs to maintain memory across conversations by creating, reading, updating, and deleting entities and relations.

## Overview

- **Category:** AI
- **Language:** Swift
- **Stars:** 106
- **Forks:** 5
- **Owner:** okooo5km
- **GitHub:** https://github.com/okooo5km/memory-mcp-server
- **Created:** 2025-03-19T05:03:01+00:00
- **Updated:** 2025-03-28T23:25:47+00:00
- **Source:** https://model-context-protocol.com/servers/swift-knowledge-graph-mcp-server

## Setup

## Setup

**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:

```bash
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:

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

2.  Build the project:

    ```bash
    swift build -c release
    ```

3.  Install the binary:

    ```bash
    # 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:

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

## Tools

## Available Tools

1.  `Knowledge Graph Storage` (Maintain a persistent graph of entities and their relationships)
2.  `Entity Management` (Create, retrieve, update, and delete entities with custom types)
3.  `Relation Tracking` (Define and manage relationships between entities in active voice)
4.  `Observation System` (Add and remove observations about entities over time)
5.  `Powerful Search` (Find relevant nodes by name, type, or observation content)
6.  `Persistent Storage` (Data persists between sessions in a simple JSON format)
7.  `create_entities` (Create multiple new entities in the knowledge graph)
8.  `create_relations` (Create multiple new relations between entities)
9.  `add_observations` (Add new observations to existing entities)
10. `delete_entities` (Delete multiple entities and their associated relations)
11. `delete_observations` (Delete specific observations from entities)
12. `delete_relations` (Delete multiple relations from the knowledge graph)
13. `read_graph` (Read the entire knowledge graph)
14. `search_nodes` (Search for nodes in the knowledge graph based on a query)
15. `open_nodes` (Open specific nodes in the knowledge graph by their names)
