LongtermMemory-MCP: Instructions file for Claude Code

AGENTS.md

LongtermMemory-MCP AGENTS.md is an instructions file for Claude Code, Codex, OpenCode from MarcelRoozekrans/LongtermMemory-MCP. It costs 1,470 tokens per session, scanned A, original, MIT.

Repository instructions for a coding agent working on LongtermMemory-MCP, a local server that stores agent memories and finds them by meaning. They describe the project layout, build and test rules, and plugin constraints.

In plain words
What is it for?
Use them when changing, building, testing, or packaging this TypeScript MCP server and its Claude Code plugin.
Why use it?
They give the agent project-specific rules that are easy to miss, such as which files are built, which database files are tracked, and which duplicate path rules must stay aligned.

Instructions file for Claude CodeCodexOpenCode

Written for Claude Code and Codex and OpenCode: UserPromptSubmit hook event, but also the file is AGENTS.md. Also seen: mentions .claude-plugin; mentions Claude Code; mentions AGENTS.md.

This is MarcelRoozekrans/LongtermMemory-MCP's own configuration. It tells Claude Code, Codex and OpenCode how to work on LongtermMemory-MCP itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything LongtermMemory-MCP configures →

Reuse

Borrowing it

Nothing to install: this file belongs to MarcelRoozekrans/LongtermMemory-MCP. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/MarcelRoozekrans/LongtermMemory-MCP/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/MarcelRoozekrans/LongtermMemory-MCP

Made for: Claude Code, Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for LongtermMemory-MCP AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/marcelroozekrans/longtermmemory-mcp/agents-md/github.svg)](https://agentmods.dev/instructions/marcelroozekrans/longtermmemory-mcp/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/marcelroozekrans/longtermmemory-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/marcelroozekrans/longtermmemory-mcp/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for LongtermMemory-MCP AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/marcelroozekrans/longtermmemory-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/marcelroozekrans/longtermmemory-mcp/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,470 This file is loaded in full into every session.
When invoked 1,470 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.01470 $0.01470
Opus 5.5 $0.00588 $0.00588
Sonnet 5.5 $0.00294 $0.00294
Haiku 4.5 $0.00147 $0.00147

Measured today against content hash dfb78fbd97f7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

LongtermMemory-MCP AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 110 lines

How it starts

The opening of the file, as written. The whole thing — 110 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md: LongtermMemory-MCP

A fully local MCP server for long-term agent memory with semantic search (SQLite via node:sqlite, local embeddings), published to npm as longterm-memory-mcp and to the MCP Registry. The same repo ships a Claude Code plugin: a skill, a UserPromptSubmit recall hook and a launcher for the server.

Layout

  • src/ is the only TypeScript. tsc compiles it to dist/, which is git-ignored and is what npm ships, together with skills/, server.json, README.md, LICENSE and icon.svg.
  • hooks/, scripts/ and .claude-plugin/ are plain Node ESM with no dependencies and no build step. The plugin runs them straight from the repo, so they must not import from dist/ or from node_modules.
  • hooks/recall-gate.mjs repeats the path rules of src/paths.ts and src/recall-session.ts on purpose, because it cannot import them. tests/unit/recall-gate.test.ts keeps both copies equal: change one, change the other.
  • .mcp.json and .vscode/mcp.json run the published package, not this checkout.
  • tests/fixtures/*.db are tracked SQLite fixtures, built by tests/fixtures/generate-fixtures.mjs. All other *.db files are git-ignored.

Build and test

Needs Node 22.13 or later, for the built-in node:sqlite (engines). No .nvmrc; CI uses Node 22 and 24 on ubuntu and windows for the test job, and Node 26 for typecheck and publish.

CI job Test in .github/workflows/ci.yml, every matrix leg:

npm ci
npm run build
npm run test:coverage

CI job Typecheck:

npm ci
npx tsc --noEmit

CI job Lint commit messages runs on pull requests only: npx commitlint --from "$BASE_SHA" --to "$HEAD_SHA" --verbose.

Inner loop, run locally and passing:

npm test                                   # vitest run, 13 files, about 4 s
npx vitest run tests/unit/decay.test.ts    # one file
npm run bench                              # vitest bench, tests/benchmarks

The husky pre-commit hook runs npm run build && npm test, and commit-msg runs commitlint.

Read the full file on GitHub · 110 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 110 lines · 1,470 tokens per session scan A dfb78fbd97f7

Subscribe to this mod's changes

LongtermMemory-MCP AGENTS.md is an instructions file published in the GitHub repository MarcelRoozekrans/LongtermMemory-MCP (2 stars, last pushed 2d ago), licensed MIT. It adds 1,470 tokens to every session, about $0.0059 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-18.

Related

LongtermMemory-MCP AGENTS.md compared with instructions from other repositories

LongtermMemory-MCP AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
LongtermMemory-MCP AGENTS.mdMarcelRoozekrans/LongtermMemory-MCPInstructions file22d agoMITA1,470Claude Code, Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file144ktodayMITA8,130Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA5,685GitHub Copilot
langchain AGENTS.mdlangchain-ai/langchainInstructions file150kyesterdayMITA4,680Codex, OpenCode
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file283kyesterdayMITA4,342Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file196ktodayMITA3,153GitHub Copilot