memory
A Model Context Protocol server that provides knowledge graph management capabilities.
claude mcp add --transport stdio okooo5km-memory-mcp-server memory-mcp-server \ --env MEMORY_FILE_PATH="/path/to/your/memory.json"
How to use
The Memory MCP Server provides a persistent knowledge graph to help memory-enabled AI assistants maintain context across conversations. It exposes a set of tools to manage entities, their relationships, and observable facts, backed by a simple line-delimited JSON storage. You can create multiple entities with types and observations, define relationships between entities, add or remove observations over time, and search or open nodes to retrieve details. This enables LLMs to remember user preferences, facts, and interactions in a structured way and then query the graph to retrieve relevant context when needed.
To use the tools, call create_entities to add new nodes with a name, type, and optional observations. Use create_relations to connect entities with active-voice relation types. Add observations with add_observations to enrich existing entities over time. When you need to inspect the current state, read_graph pulls the entire graph, while search_nodes and open_nodes let you locate and retrieve specific nodes or groups of nodes by query or names. This combination gives you a flexible memory store that your prompts can consult before answering, helping your assistant stay consistent across sessions.
How to install
Prerequisites:
- macOS 14.0 or later (Swift 6.0+)
- Xcode command line tools (or Swift toolchain)
Option 1: One-Line Installation (if a prebuilt binary is published)
- Use the provided one-line installer to download and install memory-mcp-server to ~/.local/bin
# Optional: run directly from CI-provided installer if available
curl -fsSL https://raw.githubusercontent.com/okooo5km/memory-mcp-server/main/install.sh | bash
Option 2: Build from Source
- Clone the repository:
git clone https://github.com/okooo5km/memory-mcp-server.git
cd memory-mcp-server
- Build the project (Release configuration recommended):
swift build -c release
- Install the binary locally (no sudo required):
mkdir -p ~/.local/bin
cp $(swift build -c release --show-bin-path)/memory-mcp-server ~/.local/bin/
- Ensure the binary is in your PATH:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc # or ~/.bashrc
source ~/.zshrc # or source ~/.bashrc
Running the server:
memory-mcp-server --help
memory-mcp-server --version
Additional notes
Environment variable MEMORY_FILE_PATH is used to set the location of the persisted knowledge graph (default memory.json in the current working directory if not set). If you run multiple instances, use distinct file paths. The server stores data in a simple line-delimited JSON format on disk. For Claude/Cursor/Chatwise integrations, configure the mcpServers.memory settings to point to memory-mcp-server (and set MEMORY_FILE_PATH as needed). If you encounter permission issues writing to the configured path, ensure the path exists and is writable. When debugging, inspecting the memory file can help verify entity and relation persistence across runs.
Related MCP Servers
swift-sdk
The official Swift SDK for Model Context Protocol servers and clients.
Claude-Project-Coordinator
Claude Project Coordinator is a Swift-powered MCP (Model Context Protocol) server designed to streamline multi-project Xcode development. It lets you track project status, auto-detect frameworks, search code patterns, and maintain a structured development knowledge base — all locally, with Claude Desktop as your assistant.
shortcuts
Shortcuts + MCP = ♥️
macPilotCli
MacPilot CLI is a mcp server, It provides a collection of system tools that allow AI assistants to perform various operations on macOS systems.
riffmcp
Native macOS MCP server that lets LLMs compose and play music
swift
Full-featured Swift SDK for Model Context Protocol servers and clients