MCP.so
Sign In

MemGPT Sample

@gm2552

About MemGPT Sample

A simple, abridged MemGPT agent written in Spring Boot. Includes a running as a REST API or MCP server. Also includes a simple ChatBot App to interact with the agent.

Basic information

Category

AI & Agents

License

MIT

Runtime

java

Transports

stdio

Publisher

gm2552

Config

No standard config provided

This server doesn't expose a parseable MCP config block in its README. See the repository for install instructions.

Repository

Tools

No tools detected

We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.

Overview

What is MemGPT Sample?

MemGPT Sample is a proof-of-concept implementation of the MemGPT research paper that provides an agent with self-editing memory management. It is designed for developers who want to integrate hierarchical memory (core memory, archival memory, and message summarization) into chat applications via REST or MCP protocols.

How to use MemGPT Sample?

Set the OPENAI_API_KEY environment variable, build the desired server application with Gradle, and run the JAR. Then configure and launch the simple-chat-bot-app command-line client, choosing one of four modes: rest, mcp, restadvisor, or mdcadvisor via the spring.profiles.active setting.

Key features of MemGPT Sample

  • Implements MemGPT’s core memory, archival memory, and self-editing context window.
  • Exposes agent functionality as both a REST service and an MCP server.
  • Provides a command-line chat application that can use either transport.
  • Supports tool calling, message compilation, and LLM communication.
  • Configurable archival memory using a vector store (pgvector profile).
  • Built with Spring Boot and Spring AI; requires Java 17+, Gradle, and an OpenAI API key.

Use cases of MemGPT Sample

  • Integrate MemGPT-like memory management into existing chat applications.
  • Prototype conversational agents that retain long-term context across sessions.
  • Compare REST and MCP transports for agent-based chat systems.
  • Evaluate different memory delegation modes (full agent vs. memory‑only advisor).

FAQ from MemGPT Sample

What does the MemGPT Sample agent manage?

It manages system prompts, tools, core memory, archival memory, message persistence (including messages outside the context window), and performs automatic context window editing.

How do I enable archival memory?

By default archival memory is disabled. Activate it by enabling the pgvector Spring profile. If using OpenAI embeddings and PostgreSQL, no extra configuration is needed.

What runtime dependencies are required?

Java 17 or later, Gradle, and an OpenAI API key. For archival memory, a PostgreSQL instance with the pgvector extension may be required.

Can the chatbot communicate over MCP instead of REST?

Yes. Set the profile to mcp or mdcadvisor in simple-chat-bot-app/src/main/resources/application.yaml to use MCP as the transport.

What are the two memory delegation modes?

The advisor profiles (restadvisor or mdcadvisor) let the chatbot create chat completions directly with the LLM while using the MemGPT server only for memory management; the standard profiles delegate both memory and completion to the server.

Comments

More AI & Agents MCP servers