原型 · 预览版:收录官方注册中心里的全部服务器,每 30 分钟同步一次。评价和账户功能将在后续阶段推出。
PopNx MCP为使用 AI 的人准备的 MCP 服务器 · 用大白话讲清楚

Memstack

作者:isiomaC版本 0.8.5i★ –i在你的电脑上运行
注册名称io.github.isiomaC/memstack

安装

概览

作者提供的说明(英文原文)

MCP server for persistent, searchable memory for AI agents.

PopNx MCP 的三大支柱

这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。

它能帮你做什么

我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。

  • 连接方式: 在你的电脑上运行
  • 传输方式: stdio
  • 分类: 搜索与 AI 记忆

安装

选择你使用的 AI 应用,然后复制设置。

安装之前

  • 基础检查:1 项中通过 1 项
  • 在你的电脑上运行,拥有你的用户账户的权限(文件、网络、应用)。
  • 注册中心没有列出需要填写的密钥。

你需要

  • npm已安装 Node.js(用于 npx 命令)

你用的是哪个应用?

在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。

打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json

{
  "mcpServers": {
    "memstack": {
      "command": "npx",
      "args": [
        "-y",
        "@memstack/mcp"
      ]
    }
  }
}

在终端中运行这条命令

claude mcp add memstack -- npx -y @memstack/mcp

在 Cursor 中打开

或者自己复制设置

粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json

{
  "mcpServers": {
    "memstack": {
      "command": "npx",
      "args": [
        "-y",
        "@memstack/mcp"
      ]
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

在 VS Code 中打开

或者自己复制设置

粘贴到项目中的 .vscode/mcp.json

{
  "servers": {
    "memstack": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@memstack/mcp"
      ]
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。

你的选择通过 Cookie 保存在这台设备上,无需账户。

这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。

它能做什么

它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。

基础检查i

我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月6日

  • ✓ 通过

    作者与仓库一致

    注册名称已通过 GitHub 账户 isiomaC 验证,该账户拥有此仓库

  • … 尚未检查

    仍在维护

    我们还没有从 GitHub 读取这个仓库

  • … 尚未检查

    有许可证

    我们还没有从 GitHub 读取这个仓库

  • – 不适用

    端点有响应

    它在你的电脑上运行,没有互联网端点

  • – 不适用

    使用 OAuth 登录

    在你的电脑上运行,改用本地设置

  • … 尚未检查

    工具描述中没有隐藏指令

    它在你的电脑上运行;我们只能读取互联网端点的工具列表

与“搜索与 AI 记忆”中的其他服务器比较i

  • 星标数多于此分类中其他 7229 个服务器的 0%
  • 发布到注册中心的时间比此分类中其他 7229 个服务器的 56% 更新
  • 基础检查结果等于或优于此分类中其他 7229 个服务器的 100%

与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。

常见问题

Memstack 安全吗?

它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。

它需要哪些密钥或代码?

注册中心没有列出必需的密钥,不过有些服务器会在首次使用时要求你登录。

它在我的电脑上运行还是在云端?

它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。

它还在维护吗?

GitHub 仓库最后更新于–,最新版本(0.8.5)于29天前进入注册中心。

哪些应用可以使用它?

支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Node.js。

有什么可以替代它?

同一分类中有:Context7, Codebase Memory, Exa

替代选择

同一分类中其他作者的服务器,按星标数排序。

如何看卡片:★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i

Context7

作者:upstash

Up-to-date docs for AI agents

电脑或云端★ 64,224MIT3天前更新
安装

Codebase Memory

作者:DeusData

Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.

在你的电脑上运行★ 48,148MIT20天前更新
安装

Exa

作者:exa-labs

Connect AI agents to Exa for web search, content fetching, and multi-step research.

在云端运行★ 5,213MIT44天前更新
安装

作者的 README

打开 README

按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。

MemStack

Persistent memory for AI agents. Claude Code and Codex share one memory per project, and your own agents get the same pipeline: store, retrieve, summarize, and prune.

Website and install guides: [memstack.stalewell.com](https://memstack.stalewell.com/)

Tell one agent how your project works. The other already knows. Claude Code learns a convention; a new Codex session recalls it and gets the task right:

npm install -g @memstack/cli @memstack/mcp better-sqlite3@^11.10.0   # MemStack never installs storage drivers

memstack init # LLM provider (optional) + store memstack connect claude-code memstack connect codex

Every session then starts with the project's key memories, and both agents save what you ask them to remember. How harness memory works.

Building your own agent?

# Use MemStack in your application

npm install @memstack/core

Give your coding agents the MemStack skill (-g: every project; omit it for this project only)

npx skills add isiomaC/memstack -g

@memstack/core is the runtime SDK; the Agent Skill teaches compatible coding agents how to integrate and operate MemStack correctly. Without -g, the skill installs into the current project (.agents/skills/, plus a .claude/skills/ link for Claude Code). Update it later with npx skills update.

The problem: AI agents forget. Every interaction starts from zero. You either stuff everything into the context window (expensive, slow, degrades output quality) or the agent has no memory of past conversations.

What MemStack does: A persistent memory pipeline that lives between your agent and the LLM. It stores every interaction, retrieves only what's relevant, summarizes old memories to save tokens, and prunes stale ones automatically. One method call, no infrastructure required.

Think of it as the open-source alternative to Mem0 — pluggable storage, bring your own LLM, zero vendor lock-in.


Table of Contents

  • Why MemStack
  • Quick Start
  • Harness Memory (Claude Code & Codex)
  • How it works
  • Commands
  • What connect changes
  • Projects
  • Storage
  • Troubleshooting
  • The Memory Pipeline
  • Store
  • Retrieve
  • Compile Context
  • Summarize
  • Prune
  • Real-World Use Cases
  • Support Agent
  • RAG Pipeline
  • Multi-User Chatbot
  • Memory Type Reference
  • Retrieval Strategies
  • Embeddings
  • Adapters
  • LLM Adapters
  • Embedding Adapters
  • Storage Adapters
  • Full API Reference
  • MemStack Client
  • Memory Subsystem
  • Export / Import
  • Health & Close
  • Harness Memory API
  • Configuration
  • Harness configuration file
  • Advanced Usage
  • Custom Storage
  • Custom LLM / Embedding
  • Event Hooks
  • LongMemEval-S Retrieval Benchmark
  • Development
  • Setup & Tests
  • Debugging
  • Publishing to npm
  • Contributing
  • License

Why MemStack

LLMs have context windows, not memory. The difference matters.

ApproachProblem
Stuff everything in contextCost is O(n²). 100 conversations = thousands of tokens = dollars per call. Quality degrades from "lost in the middle" effect.
Use a vector DB directlyYou get similarity search. You don't get summarization, pruning, recency weighting, deduplication, or token budget management. You're building the pipeline yourself.
Use Mem0Proprietary, cloud-only with their hosted API. You don't control where your data lives.
Use MemStackFull pipeline. Pluggable everything. Your data, your infrastructure. Open source.

What MemStack handles that raw vector DBs don't:

  • Summarization — compress 100 old interactions into one paragraph, keep meaning, save tokens
  • Recency weighting — recent memories matter more; MemStack sorts them higher
  • Importance scoring — not all memories are equal; high-importance ones survive pruning
  • Deduplication — identical or near-identical memories are collapsed in context assembly
  • Token budget — compileContext() tells you how many tokens you're spending before the LLM call
  • Memory-type routing — interactions, summaries, observations treated differently at retrieval time
  • Auto-pruning — old, low-importance memories clean themselves up

Quick Start

Claude Code and Codex

Persistent memory across agent harnesses: what you tell Claude Code, Codex recalls in the same project, and the reverse.

npm install -g @memstack/cli @memstack/mcp better-sqlite3@^11.10.0  # MemStack never installs storage drivers for you

memstack init # choose an LLM provider and a store memstack connect claude-code memstack connect codex

Then, in Claude Code: "Remember that this project uses Hono." In Codex, in the same repository: "What framework does this project use?" Codex answers Hono. See Harness Memory for how it works.

As a library
npm install @memstack/core
OpenAI
import { MemStack, OpenAILLMAdapter, OpenAIEmbeddingAdapter, InMemoryStorageAdapter } from "@memstack/core";

const llm = new OpenAILLMAdapter({ apiKey: process.env.OPENAI_API_KEY! });

const memstack = new MemStack({ llm, embedding: new OpenAIEmbeddingAdapter({ apiKey: process.env.OPENAI_API_KEY! }), storage: new InMemoryStorageAdapter(), });

DeepSeek (no embeddings)

DeepSeek provides chat completions but has no embedding API. Use the OpenAI-compatible LLM adapter with baseURL and omit the embedding adapter — retrieval falls back to keyword + recency + importance ranking. You still get the full pipeline: store, summarize, prune, and compileContext.

import { MemStack, OpenAILLMAdapter, InMemoryStorageAdapter } from "@memstack/core";

const llm = new OpenAILLMAdapter({ apiKey: process.env.DEEPSEEK_API_KEY!, baseURL: "https://api.deepseek.com/v1", defaultModel: "deepseek-flash", });

const memstack = new MemStack({ llm, storage: new InMemoryStorageAdapter(), // No embedding adapter — retrieval uses keyword matching });

OpenRouter / Together AI / any OpenAI-compatible API

Same pattern — change baseURL and defaultModel:

// OpenRouter

const llm = new OpenAILLMAdapter({ apiKey: process.env.OPENROUTER_API_KEY!, baseURL: "https://openrouter.ai/api/v1", defaultModel: "openai/gpt-4o-mini", });

// Together AI const llm = new OpenAILLMAdapter({ apiKey: process.env.TOGETHER_API_KEY!, baseURL: "https://api.together.xyz/v1", defaultModel: "meta-llama/Llama-3.3-70B-Instruct-Turbo", });

// Gemini (OpenAI-compatible endpoint) const llm = new OpenAILLMAdapter({ apiKey: process.env.GEMINI_API_KEY!, baseURL: "https://generativelanguage.googleapis.com/v1beta/openai", defaultModel: "gemini-2.0-flash", });

Store and retrieve
// 1. Store what happened

await memstack.memory.store({ actorId: "support-bot-42", content: "User reports login failing with error 503 on Chrome 125.", tags: ["login", "bug", "chrome"], importance: 0.8, });

// 2. Later, retrieve relevant context const memories = await memstack.memory.retrieve({ actorId: "support-bot-42", query: "login error", strategy: "hybrid", });

// 3. Assemble an LLM-ready context const ctx = await memstack.memory.compileContext({ actorId: "support-bot-42", maxTokens: 2000, });

const response = await llm.complete({ system: You are a support bot. Here is what you remember:\n${ctx.systemPrompt}, user: "The user is back and still can't log in. What do you do?", });

console.log(response.text); // "Based on our history, the user has been experiencing 503 errors on Chrome 125..."

// 4. Every 100 interactions, summarization triggers automatically. // Old interactions are compressed into a paragraph. Token costs stay flat.


Harness Memory (Claude Code & Codex)

Coding agents forget everything between sessions, and they don't share what they learn with each other. MemStack gives Claude Code and Codex one memory per project: a decision made with one agent is known to the other, and to every later session.

How it works
  • Saving. Each agent gets five MemStack tools (memory_store, memory_retrieve, memory_get, memory_delete, memory_stats) through the MCP harness profile. When you say "remember that…", or the agent learns a durable fact, decision, preference, or rule, it calls memory_store. MemStack asks your LLM for a few topic tags, so "uses Hono" can later be found by "which framework?". If tagging fails, the memory is still saved.
  • Recalling. A session-start hook loads the project's most important memories into every new session, so the agent starts out knowing them. During a session the agent calls memory_retrieve with plain questions. Recall runs locally with keyword ranking (BM25 with stemming) and never calls the LLM, so it is fast and works offline.
  • Scope. Memories belong to the current project. Preferences that apply everywhere can be saved as global (scope: "global") and are recalled in every project. One project can never read or delete another's memories.
  • Safety. Agents don't get bulk or destructive tools, and the LLM key stays in ~/.memstack/config.json (readable only by you), never in agent configs. Agents are told never to store secrets, and MemStack checks too: a memory that contains a credential (a private key, a cloud or source-host token, a JWT, a password in a connection string, a password = "..." assignment) is refused before the LLM or the store sees it, and the error names the kind of secret without repeating it. The check is pattern-based, so a secret in a format it doesn't know will pass; MEMSTACK_SECRET_POLICY=redact stores the memory with `[REDACT

只显示了开头部分;其余内容请在仓库中阅读

问 PopNx