Skip to main content

memory_plus

pretty image

License: MIT visitors PyPI version PyPI Downloads

Memory-Plus

A lightweight, local Retrieval-Augmented Generation (RAG) memory store for MCP agents. Memory-Plus lets your agent record, retrieve, update, and visualize persistent "memories"—notes, ideas, and session context—across runs.

🏆 First Place at the Infosys Cambridge AI Centre Hackathon!

Key Features

  • Record Memories:Save user data, ideas, and important context.
  • Retrieve Memories:Search by keywords or topics over past entries.
  • Recent Memories:Fetch the last N items quickly.
  • Update Memories:Append or modify existing entries seamlessly.
  • Visualize Memories:Interactive graph clusters revealing relationships.
  • File Import (since v0.1.2):Ingest documents directly into memory.
  • Delete Memories (since v0.1.2):Remove unwanted entries.
  • Memory for Memories (since v0.1.4):Now we use resources to teach your AI exactly when (and when not) to recall past interactions.
  • Memory Versioning (since v0.1.4):When memories are updated, we keep the old versions to provide a full history.

alt text

Installation

1. Prerequisites

Google API Key Obtain from Google AI Studio and set as GOOGLE_API_KEY in your environment.

Note that we will only use the Gemini Embedding API with this API key, so it is Entirely Free for you to use!

Setup Google API Key Example
# macOS/Linux
export GOOGLE_API_KEY="<YOUR_API_KEY>"

# Windows (PowerShell)
setx GOOGLE_API_KEY "<YOUR_API_KEY>"

UV Runtime Required to serve the MCP plugin.

Install UV Runtime
pip install uv

Or install via shell scripts:

# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh

# Windows (PowerShell)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

VS Code One-Click Setup

Click the badge below to automatically install and configure Memory-Plus in VS Code:

One Click Install in VS Code

This will add the following to your settings.json:

  {
    "mcpServers": {
      //...,  your other MCP servers
      "memory-plus": {
        "command": "uvx",
        "args": [
          "-q",
          "memory-plus@latest"
        ],
      }
    }
  }

For cursor, go to file -> Preferences -> Cursor Settings -> MCP and add the above config. If you didn't add the GOOGLE_API_KEY to your secrets / environment variables, you can add it with:

"env": {
        "GOOGLE_API_KEY": "<YOUR_API_KEY>"
      }

just after the args array with in the memory-plus dictionary.

For Cline add the following to your cline_mcp_settings.json:

{
  "mcpServers": {
    //...,  your other MCP servers
    "memory-plus": {
      "disabled": false,
      "timeout": 300,
      "command": "uvx",
      "args": [
        "-q",
        "memory-plus@latest"
      ],
      "env": {
        "GOOGLE_API_KEY": "${{ secrets.GOOGLE_API_KEY }}"
      },
      "transportType": "stdio"
    }
  }
}

For other IDEs it should be mostly similar to the above.

Local Testing and Development

Using MCP Inspector, you can test the memory-plus server locally.

git clone https://github.com/Yuchen20/Memory-Plus.git
cd Memory-Plus
npx @modelcontextprotocol/inspector fastmcp run run .\\memory_plus\\mcp.py

Or If you prefer using this MCP in an actual Chat Session. There is a template chatbot in agent.py.

# Clone the repository
git clone https://github.com/Yuchen20/Memory-Plus.git
cd Memory-Plus

# Install dependencies
pip install uv
uv pip install fast-agent-mcp
uv run fast-agent setup        

setup the fastagent.config.yaml and fastagent.secrets.yaml with your own API keys.

# Run the agent
uv run agent_memory.py

RoadMap

  • Memory Update
  • Improved prompt engineering for memory recording
  • Better Visualization of Memory Graph
  • File Import
  • Remote backup!
  • Web UI for Memory Management

If you have any feature requests, please feel free to add them by adding a new issue or by adding a new entry in the Feature Request

License

This project is licensed under the Apache License 2.0. See LICENSE for details.

FAQ

1. Why is memory-plus not working?

  • Memory-plus has a few dependencies that can be slow to download the first time. It typically takes around 1 minute to fetch everything needed.
  • Once dependencies are installed, subsequent usage will be much faster.
  • If you experience other issues, please feel free to open a new issue on the repository.

2. How do I use memory-plus in a real chat session?

  • Simply add the MCP JSON file to your MCP setup.
  • Once added, memory-plus will automatically activate when needed.

Metadata

Release files for memory-plus 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for memory-plus 0.1.6
File Size Uploaded
memory_plus-0.1.6.tar.gz 1.9 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for memory-plus 0.1.6
File Interpreter ABI Platform
memory_plus-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 1.9 MB

Release files / memory_plus-0.1.6.tar.gz

Download URL memory_plus-0.1.6.tar.gz
Size 1.9 MB
Tags Source
SHA-256 checksum
How to use checksums
a0f1516c2c9c6e95ce66feb7c4d343e9a8815e3ccac526524372d0ad13cd09c5
BLAKE2b-256 checksum
How to use checksums
0a9b16020ba8af49a1f44a3837710ebf9add0490d1eb96aa27a31997b5ff09ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.5

Release files / memory_plus-0.1.6-py3-none-any.whl

Download URL memory_plus-0.1.6-py3-none-any.whl
Size 19.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
871b65a6ef06b2a83c2f596be8cab251423eebb97cbc0d60e601318fb73fcc0c
BLAKE2b-256 checksum
How to use checksums
ef1f3290253cdccf38c355ebb4a4da48090112dccb485df615e319b911f6d15a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.5

Release history Release notifications | RSS feed

This release

0.1.6 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page