memory-mcp/README.md

1.6 KiB

Memory MCP - Fact Management System

A command-line application that runs an MCP (Model Context Protocol) server for managing and retrieving facts with associated keywords.

Features

  • Store facts with associated keywords in a simple line-based format
  • List all stored facts with their keywords
  • Get a list of all unique keywords
  • Find facts by specific keywords

Installation

  1. Ensure you have Go installed (version 1.21 or later recommended)
  2. Clone this repository
  3. Build the application:
go build -o memory-mcp

Usage

  1. Start the MCP server:
./memory-mcp
  1. Connect to the server using any MCP client or integrate with LLMs that support the MCP protocol.

Tools Available

The server provides the following tools:

1. Add Memory

Add a new fact with associated keywords.

Parameters:

  • fact: The fact to remember (cannot contain semicolons)
  • keywords: Comma-separated list of keywords

2. List All Memories

List all stored facts with their keywords.

3. List Unique Keywords

List all unique keywords used across all memories.

4. Find By Keyword

Find all facts associated with a specific keyword.

Parameters:

  • keyword: Keyword to search for

Memory Storage

Facts are stored in a simple text file located at $XDG_STATE_HOME/memories.txt or ~/.local/state/memories.txt if the environment variable is not set.

Each memory is stored in the format:

fact;keyword1,keyword2,keyword3,...

Limitations

  • Facts cannot contain semicolons (;) as this character is used as a separator
  • The MCP server currently only supports stdio communication