プロトタイプ · プレビュー版:公式レジストリのすべてのサーバーを掲載し、30分ごとに同期しています。レビューとアカウント機能は今後のステップで始まります。
PopNx MCPAIを使う人のためのMCPサーバー · やさしい言葉で解説

Longterm Memory

作者:MarcelRoozekransバージョン 1.6.1i★ –iパソコンで動く
レジストリ名io.github.MarcelRoozekrans/longterm-memory

インストール

概要

作者による説明(英語の原文)

A fully local MCP server for long-term memory with semantic search

PopNx MCPの3つの柱

この3つを1つのスコアにまとめることはしません。意見、測定、人気はそれぞれ別のものだからです。

できること

このサーバーのやさしい解説はまだ書いていません。以下はレジストリから読み取った事実です。

  • 接続方法: パソコンで動く
  • トランスポート: stdio
  • カテゴリ: 検索・AIの記憶

インストール

使っているAIアプリを選んで、設定をコピーしてください。

インストールの前に

  • 基本チェック:1項目中1項目に合格
  • あなたのパソコンで、あなたのユーザーと同じ権限(ファイル、ネットワーク、アプリ)で動きます。
  • レジストリには、入力が必要なキーは載っていません。

必要なもの

  • npmNode.jsのインストール(npxコマンドに必要)

どのアプリを使っていますか?

上でアプリを選んでください。選んだアプリを覚えておくので、次からはボタンに「…にインストール」と表示されます。

Claude Desktop → Settings → Developer → Edit Config を開き、claude_desktop_config.json にこれを貼り付けます

{
  "mcpServers": {
    "longterm-memory": {
      "command": "npx",
      "args": [
        "-y",
        "longterm-memory-mcp"
      ]
    }
  }
}

ターミナルでこれを実行します

claude mcp add longterm-memory -- npx -y longterm-memory-mcp

Cursorで開く

または、設定を自分でコピーする

プロジェクトの .cursor/mcp.json、または ~/.cursor/mcp.json に貼り付けます

{
  "mcpServers": {
    "longterm-memory": {
      "command": "npx",
      "args": [
        "-y",
        "longterm-memory-mcp"
      ]
    }
  }
}

ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。

VS Codeで開く

または、設定を自分でコピーする

プロジェクトの .vscode/mcp.json に貼り付けます

{
  "servers": {
    "longterm-memory": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "longterm-memory-mcp"
      ]
    }
  }
}

ブラウザがアプリを開いてよいか確認し、そのあとアプリが設定を表示して確認を求めます。キーの値は空欄のままなので、自分で入力してください。

これはパソコンで動くサーバーですが、ChatGPTがつなげるのはインターネット上のサーバーだけです。ほかのアプリを選んでください。

選んだアプリは、この端末のCookieに保存されます。アカウントは不要です。

この設定は、作者のレジストリ登録情報から作成しています。READMEと違う場合は、READMEに従ってください。

できること

パソコンで動くサーバーです。インストールすると、ツール一覧がAIアプリに表示されます。

基本チェックi

誰でも見られる情報をチェックしており、コードは読んでいません。当てはまらない項目は数に入れていません。 · 2026年11月6日にチェック

  • ✓ 合格

    作者とリポジトリが一致

    レジストリ名は、リポジトリを所有するGitHubアカウント MarcelRoozekrans で確認済みです

  • … 未チェック

    今もメンテナンスされている

    このリポジトリはまだGitHubから読み取っていません

  • … 未チェック

    ライセンスがある

    このリポジトリはまだGitHubから読み取っていません

  • – 対象外

    エンドポイントが応答する

    これはパソコンで動くため、インターネット上のエンドポイントはありません

  • – 対象外

    OAuthでサインイン

    パソコンで動き、代わりにローカルの設定を使います

  • … 未チェック

    ツールの説明に隠れた指示がない

    パソコンで動くサーバーです。ツール一覧を読み取れるのは、インターネット上のエンドポイントがある場合だけです

検索・AIの記憶のほかのサーバーとの比較i

  • このカテゴリのほかの7240件のうち0%よりスターが多い
  • このカテゴリのほかの7240件のうち85%より最近レジストリに公開
  • 基本チェックの結果が、このカテゴリのほかの7240件のうち100%と同じかそれ以上

レジストリでこのカテゴリにある有効なすべてのサーバーと比較しています。スターは、公開者がリポジトリの所有者である場合だけ数えます。

よくある質問

Longterm Memoryは安全ですか?

当てはまる基本チェック1項目のうち1項目に合格しました。コードは読んでいません。キーやトークンを追加する前に、サーバーがどんなアクセスを求めているかを確認し、必要な権限だけを持つキーを使ってください。

どんなキーやコードが必要ですか?

レジストリには必須のキーは載っていません。ただし、最初に使うときにサインインを求めるサーバーもあります。

パソコンで動きますか、それともクラウドですか?

あなたのパソコンで動きます。必要なときにAIアプリが起動し、データは作者のサーバーを通りません(サーバー自体がオンラインサービスを呼び出す場合を除きます)。

今もメンテナンスされていますか?

GitHubリポジトリの最終更新は–、最新バージョン(1.6.1)がレジストリに届いたのは6 日前です。

どのアプリで使えますか?

Claude Desktop、Claude Code、Cursor、VS CodeなどのMCP対応アプリで使えます。パソコンにNode.jsも必要です。

代わりに使えるものは?

同じカテゴリには:Context7, Codebase Memory, Exa

代わりの候補

同じカテゴリで、ほかの作者が作ったサーバー。スターの多い順。

カードの見方:★ GitHubスターi3つの柱:レビュー · チェック · 利用状況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、画像、スクリプトは取り除いています。リンクはこのサイトの外へ移動します。

LongtermMemory-MCP

A fully local MCP server that gives AI agents persistent, semantic long-term memory — without any cloud dependencies.

Inspired by mcp-mem0, but runs 100% on your machine:

Featuremcp-mem0This project
StoragePostgreSQL / SupabaseSQLite (Node's built-in node:sqlite)
EmbeddingsOpenAI APILocal transformer (all-MiniLM-L6-v2)
Vector searchCloud vector DBIn-process cosine similarity
LLM dependencyOpenAI / OpenRouter / OllamaNone
SetupDatabase + API keys`npx longterm-memory-mcp`

Tools

Core
ToolDescription
save_memoryStore text with auto-generated semantic embedding, tags, importance, and type
search_memoryFind relevant memories using natural language queries (cosine similarity)
update_memoryModify an existing memory's content, metadata, tags, importance, or type
delete_memoryRemove a specific memory by ID
delete_all_memoriesWipe all memories (irreversible)
get_all_memoriesList all stored memories (paginated)
memory_statsGet count and database location
Search
ToolDescription
search_by_typeFilter memories by category (general, fact, preference, conversation, task, ephemeral)
search_by_tagsFind memories matching any of the provided tags
search_by_date_rangeFind memories created within a specific date range (ISO format)
Maintenance
ToolDescription
create_backupManually trigger a database backup with JSON export

Quick Start

Claude Code Plugin (recommended)

Install via the Claude Code marketplace — this sets up both the MCP server and a companion skill that teaches Claude how to use memory effectively:

/plugin marketplace add MarcelRoozekrans/LongtermMemory-MCP

/plugin install longterm-memory@longterm-memory-marketplace

This automatically:

  • Configures the MCP server (no manual JSON editing), pinned to the plugin's version: a plugin update also updates the server
  • Adds the automatic recall hook
  • Installs the long-term-memory skill (Claude learns to recall context at session start, save insights after tasks, and deduplicate memories)
Use with npx (no install needed)
npx longterm-memory-mcp

npx keeps running the version it cached first and does not look for updates. To move to a new release, name the version, as in npx -y longterm-memory-mcp@1.6.0, or use @latest, which checks the registry on every start.

Or install globally
npm install -g longterm-memory-mcp

longterm-memory-mcp

Or from source
git clone https://github.com/MarcelRoozekrans/LongtermMemory-MCP.git

cd LongtermMemory-MCP npm install && npm run build npm start

Configuration

Claude Code

If you installed via the plugin marketplace, the MCP server is already configured. For manual setup, add to your MCP settings (~/.claude/settings.json or project .claude/settings.json):

{

"mcpServers": { "longterm-memory": { "command": "npx", "args": ["-y", "longterm-memory-mcp"] } } }

Claude Desktop

Add to claude_desktop_config.json:

{

"mcpServers": { "longterm-memory": { "command": "npx", "args": ["-y", "longterm-memory-mcp"] } } }

Agent Instructions

The repo includes agent instructions that teach AI agents how to use memory effectively (automatic recall, save patterns, deduplication):

FilePurpose
skills/long-term-memory/SKILL.mdSelf-contained skill — auto-loaded by Claude Code plugin, can be referenced from any MCP client

Database Location

By default, memories are stored in a shared, user-scoped location:

~/.longterm-memory-mcp/memories.db

This means every project and every MCP client shares the same memory pool — you save a memory in one project and it's available everywhere.

Several sessions can use the same database at once. Each server process reads and writes the shared file directly (SQLite in WAL mode), so a memory saved in one session is visible to every other session right away, and no session overwrites what another saved. Requires Node.js 22.13 or later.

Databases from older releases open unchanged. A database from v1.0–1.3, which has no schema_meta table, is migrated in place with all its memories kept; a copy named memories.db.pre-migration- .bak is written next to it first.

Upgrading from 1.4 or earlier: stop every running session that uses the old version before starting one with the new version. Older releases keep the whole database in memory and rewrite the file on each save, so an old process left running would overwrite what new sessions saved.

Per-project database

To isolate memories for a specific project, set the MEMORY_DB_PATH environment variable:

{

"mcpServers": { "longterm-memory": { "command": "npx", "args": ["-y", "longterm-memory-mcp"], "env": { "MEMORY_DB_PATH": "/path/to/project/memories.db" } } } }

Memory Types

Each memory has a memory_type that determines how it's categorized and how quickly it decays:

TypeDescriptionDecay half-life
generalDefault catch-all60 days
factVerified information120 days
preferenceUser/project preferences90 days
conversationConversation context45 days
taskTask-related notes30 days
ephemeralShort-lived context10 days

Tags & Importance

  • Tags: Categorize memories with string tags (e.g. ["auth", "backend"]). Search with search_by_tags.
  • Importance (1–10): Controls how resistant a memory is to decay. Default is 5. Higher importance decays more slowly.
  • Protected tags: Memories tagged with core, identity, or pinned skip decay entirely.

Decay & Reinforcement

Memories decay over time to keep the store relevant:

  • Decay: Each memory type has a half-life (see table above). Importance decreases exponentially based on time since last access, with a floor that prevents full deletion.
  • Reinforcement: Every time a memory is accessed via search, its importance increases by +0.1 (up to a max of 10). Frequently accessed memories stay important.
  • Lazy evaluation: Decay is calculated on access, not on a timer — no background processes needed.

Content Deduplication

Memory content is hashed (SHA-256) on save. If identical content already exists, the save is rejected with a reference to the existing memory ID. This prevents duplicate entries automatically.

Content Guard

Memories end up in the database and in its JSON backups, so content is filtered before it is stored:

  • ` ` spans are removed. Text inside … is never stored, embedded or hashed. An unclosed removes everything after it. Content that is empty once the spans are removed is rejected.
  • Secrets are rejected. save_memory and update_memory refuse content, metadata values and tags that look like a secret. The error names the pattern that matched and never the value.
PatternMatches
private-keyPEM / OpenSSH / PGP private key headers (certificates are allowed)
github-tokenghp_, gho_, ghu_, ghs_, ghr_ and github_pat_ tokens
api-keysk-… style API keys
aws-access-keyAKIA… / ASIA… access key ids
jwtJSON Web Tokens
slack-tokenxoxb-, xoxp- and similar Slack tokens
secret-assignmentrandom-looking values after password=, token:, secret=, api_key=, KEY= and similar. References ($VAR, ${{ … }}), placeholders (<…>), calls and plain words are allowed

Configure it with environment variables:

{

"mcpServers": { "longterm-memory": { "command": "npx", "args": ["longterm-memory-mcp"], "env": { "MEMORY_GUARD_DISABLE": "jwt,slack-token", "MEMORY_GUARD_EXTRA_PATTERNS": "{\"internal-host\": \"\\\\b[a-z0-9-]+\\\\.corp\\\\.example\\\\b\"}" } } } }

  • MEMORY_GUARD_DISABLE: a comma-separated list of pattern names to turn off, or all for every built-in pattern. spans are removed either way. An unknown name stops the server at startup.
  • MEMORY_GUARD_EXTRA_PATTERNS: a JSON object of extra patterns to reject, as name → regular expression.

The guard applies to new saves and updates only. Memories stored before it existed are not rescanned.

Automatic Recall

The Claude Code plugin ships a UserPromptSubmit hook that recalls memories without the agent having to ask. On the first prompt of each session it searches with the prompt text and adds the best matches to the context as a short list:

Long-term memories that may be relevant (longterm-memory; search_memory gives the full text):
  • [2026-10-22 fact] pkill -f also matches the agent's own shell … (id 31ece450-…)
  • Once per session: the hook keeps a marker file per session id in recall-sessions/ next to the database. Later prompts in that session cost one node start, about 30 ms, and no search.
  • Project: the hook takes the project name from the session's working directory. A memory that names the project in its content, tags or metadata ranks a little higher. The name is not part of the search text: a short prompt would then match on the project name alone.
  • Cheap when it misses: nothing is injected when no memory reaches the threshold, and the block never exceeds the token cap.
  • Content guard: a stored memory that the guard rejects, such as one saved before the guard existed, is never injected.
  • Never blocks a prompt: errors go to stderr and the prompt continues.
  • Pinned version: the hook runs npx longterm-memory-mcp@ recall --hook, so a cached older copy is never used. The plugin's MCP server is pinned the same way.

Configure it with environment variables in your Claude Code settings (env in ~/.claude/settings.json). The hook runs in Claude Code's environment, not the MCP server's, so a custom MEMORY_DB_PATH has to be set there too.

VariableDefaultMeaning
MEMORY_RECALL_ENABLEDtruefalse turns the hook off
MEMORY_RECALL_K5at most this many memories (1–50)
MEMORY_RECALL_THRESHOLD0.5minimum cosine similarity (-1 to 1)
MEMORY_RECALL_MAX_TOKENS400cap on the injected block, estimated at 4 characters per token
MEMORY_RECALL_STATE_DIR /recall-sessionswhere the once-per-session markers live; markers older than 30 days are removed
Recall CLI

The hook calls the recall subcommand, which also works on its own:

npx longterm-memory-mcp recall "how do we deploy the stack"

npx longterm-memory-mcp recall --k 3 --threshold 0.4 --project docker "deploy"

It prints the same list the hook injects, or No relevant memories found. on stderr. Options: --k, --threshold, --max-tokens and --project (default: the current directory's name, "" for none). It does not create a database that does not exist yet. With --hook it reads a Claude Code UserPromptSubmit event from stdin and answers with additionalContext.

Backups

Backups are managed automatically and can also be triggered manually via the create_backup tool.

冒頭だけを表示しています。続きはリポジトリで読めます

PopNxに聞く