MemGPT agent exposed as an MCP server with REST alternative

MemGPT agent exposed as an MCP server with REST alternative

memgpt-agent•bygm2552

A proof-of-concept MemGPT agent built with Spring Boot and Spring AI that can be exposed as an MCP server or REST service.

License: Not specified•Runtime: Awaiting documentation review•Category: ai agents-models

WHAT IT DOES

  • •Wraps the core MemGPT agent to expose it as an MCP server.
  • •Maintains agent configuration and state including system prompt, tools, core memory, archival memory and message persistence.
  • •Handles agent functions such as message compilation, LLM communication, tool calling, memory management, message retrieval and summarization.
  • •Archival memory uses a vector store and embeddings model and is disabled by default unless the pgvector profile is enabled.

BEST FOR

  • •Clients that want MemGPT-style context window and memory management over MCP.
  • •Experiments comparing an MCP-served agent against a REST-served one from the same chat bot.

ABOUT MEMGPT-AGENT

MemGPT agent exposed as an MCP server with REST alternative is cataloged as an MCP server attributed to gm2552. A proof-of-concept MemGPT agent built with Spring Boot and Spring AI that can be exposed as an MCP server or REST service. It is categorized under ai agents-models. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for MemGPT agent exposed as an MCP server with REST alternative are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Can the MemGPT agent be used over MCP instead of REST?

Yes. The project exposes the agent as either a REST service or an MCP server, and the chat bot has profiles for each.

Is archival memory enabled by default in the agent?

No. Archival memory is disabled by default and requires a vector store and embeddings model, activated via the pgvector Spring profile.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 1bc3da7937b2 · 采集于 2026-11-13 12:09:56 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

MemGPT Sample

This project is a proof of concept that implements a simplified and abridge implementation of the MemGPT research paper. It implements the concept as an agent and showcases how the it can be integrated either as a simple REST service or as an MCP server.

Overview

This project implements the MemGPT concept using Spring Boot and Spring AI and exposes its functionality as a REST service and an MCP Server. In addition, it contains a simple ChatBot command line application that can integrate the agent with either of these mechanisms. The project is comprised of the following sub-projects:

  • core-agent: Defines and implements the MemGPT interfaces. This includes a configuration API.
  • restful-agent-app: A wrapper service around the agent to expose it via simple REST interface.
  • memgpt-mcp-server: A wrapper service around the agent to expose it as an MCP server.
  • simple-chat-bot-app: A command line based chat application that communicates with the agent via the REST or MCP interfaces.

Prerequisites

  • Java 17 or later
  • Gradle
  • OpenAI API key

Core Agent

The core-agent is component that comprises the interfaces and implementation of the MemGPT agent. It is responsible for maintaining configuration and state of agents which includes:

  • System prompt
  • Tools
  • Core memory
  • Archival memory
  • Message persistence including messages outside the context window

It is also responsible for the core agent functions including but not limited to:

  • Message compilation
  • LLM communication
  • Tool calling
  • Memory management include context window self editing
  • Message retrieval and archiving
  • Message summarization

Externally, the agent exposes its functionality through three main interfaces:

  • AgentManager: Configures and maintains agent instances.
  • AgentLoader: Instantiates agent instances.
  • Agent: Defines the core agent chat functionality.

Running the Applications

The simple-chat-bot-app communicates with either the restful-agent-app or the mgmgpt-mcp-server. Choose which server application you would like the ChatBot app to communicate with, configure that app, and run it. You will then configure the ChatBot app to use the server application of your choice and run it.

Server Application

Both the MCP and REST server applications simply wrap the core agent, so their configurations are identical. Execute the following steps to run either server application of your choice.

  1. Set the OpenAPI Key environment variable
export OPENAI_API_KEY=your-api-key
  1. Build the application
./gradlew :restful-agent-app:build

or

./gradlew :memgpt-mcp-server:build
  1. Run the Server Application
java -jar ./restful-agent-app/build/libs/restful-agent-app-0.0.1-SNAPSHOT.jar

or

java -jar ./memgpt-mcp-server/build/libs/memgpt-mcp-server-0.0.1-SNAPSHOT.jar

The server application will load and is ready for incoming transactions from the ChatBot application.

Archival Memory

MemGPT archival memory requires the use of a vector store and Embeddings model. By default, archival memory is disabled, but you can activate it by enabling the pgvector Spring profile. If you are using OpenAI as your embeddings provider and postgres as your database, no additional configuration should be required. Other providers may require additional configuration which is beyond the scope of this README.

ChatBot Application

The ChatBot application can communicate with either the REST application or the MCP server application; by default it will attempt to communicate with the REST Application. When executing against an MCP server, the ChatBot can either communicate directly with the MCP server manage the context window and create chat completions, or it an use a custom Spring AI Advisor to only manage the context window memory and handle creating chat completions itself.

Execute the following steps to configure and run the ChatBot application:

  1. Set the OpenAPI Key environment variable
export OPENAI_API_KEY=your-api-key
  1. Configure Target Server Application (Optional if targeting the REST Application).

Edit the simple-chat-bot-app\src\main\resource\application.yaml file and update the spring.profiles.active setting with the following value depending on the targeted server application.

  • rest (default): Generates chat completions over a REST API with the MemGPT server.
  • mcp: Generates chat completions over an MCP API with the MemGPT server.
  • restadvisor: Generates chat completions by communicating directly with the LLM and using the MemGPT server to only manage memory over a RESTful API.
  • mdcadvisor: Generates chat completions by communicating directly with the LLM and using the MemGPT server to only manage memory over an MCP API.
  1. Build the application
./gradlew :simple-chat-bot-app:build
  1. Run the ChatBot Application
java -jar ./simple-chat-bot-app/build/libs/simple-chat-bot-app-0.0.1-SNAPSHOT.jar

The application will first ask for a User ID which can be anything; it is mainly used as a unique identifier for the chat session.

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for MemGPT agent exposed as an MCP server with REST alternative from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/memgpt-agent)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related ai agents-models MCP Servers

Alternative and complementary servers in the same category

View all in ai agents-models →
Knowledge Graph Memory
@modelcontextprotocol/server-memory•Model Context Protocol

Store and retrieve entities, relations and observations in a persistent local knowledge graph.

create_entitiescreate_relationsadd_observations+6 more
92K
AI & Multi-Agent
Sequential Thinking
@modelcontextprotocol/server-sequential-thinking•Model Context Protocol

Organize problem solving into revisable, branching thought steps through an MCP tool.

sequential_thinking
92K
AI & Multi-Agent

Query-aware context compression with an MCP plugin for coding agents, plus Python and HTTP interfaces for reducing the context sent to a language model.

146
AI & Multi-Agent