claude-memory-mcp AGENTS.md

claude-memory-mcp AGENTS.md is an instructions file for Codex, OpenCode from WhenMoon-afk/claude-memory-mcp. It costs 2,331 tokens per session, scanned A, original, MIT.

Repository rules for Mooncite, a local Linux tool that searches and verifies evidence from earlier conversations. It uses a private, rebuildable database index while leaving the original conversation files read-only.

In plain words
What is it for?
Use them when changing indexing, lexical search, evidence inspection, status output, or source-file handling, especially where privacy and read-only behavior matter.
Why use it?
They define the privacy and accuracy limits of the tool: retrieval is bounded and evidence must be checked against the current source files. This prevents claims that it interprets, updates, uploads, or owns the conversation history.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/whenmoon-afk/claude-memory-mcp/agents-md
Clone the repo
git clone --depth 1 https://github.com/WhenMoon-afk/claude-memory-mcp

Made for: 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 claude-memory-mcp AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/whenmoon-afk/claude-memory-mcp/agents-md.svg)](https://agentmods.dev/instructions/whenmoon-afk/claude-memory-mcp/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/whenmoon-afk/claude-memory-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/whenmoon-afk/claude-memory-mcp/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,331 This file is loaded in full into every session.
When invoked 2,331 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.02331 $0.02331
Opus 5 $0.01166 $0.01166
Sonnet 5 $0.00466 $0.00466
Haiku 4.5 $0.00233 $0.00233

Measured 5d ago against content hash c4be82eef75d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

claude-memory-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 5d ago.

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 · 91 lines

How it starts

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

Mooncite repository contract

These instructions apply to the whole repository. Preserve the invariants below unless the owner explicitly changes the product contract.

Product boundary

Mooncite is a Linux/procfs-only, local, citation-backed retrieval tool for prior conversation history. It helps an agent find and verify bounded evidence; it does not decide what evidence means, whether it is current, or what the user should do.

  • Source history is user-owned and read-only. Never rewrite, repair, normalize in place, move, delete, or claim ownership of it.
  • The SQLite evidence index is owner-private, transactional, derived, disposable, and rebuildable from authorized sources.
  • Recall is bounded lexical retrieval. Inspection must re-read and verify the current physical source bytes before returning a bounded window. Status must not expose transcript text or full physical paths.
  • Mooncite has no history network transport, telemetry, upload, SSH/remote-copy path, account login, export automation, credential/cookie access, or opaque application-cache scraping. Text returned through MCP enters the receiving model's privacy boundary; do not imply otherwise.
  • Evidence retrieval is not an authority, policy, recommendation, truth-scoring, or durable-agent-memory layer. The owner-approved learned-memory mode is a separate, explicit, default-off layer for agent-authored interpretations with verified, derived, current-context, or unanchored provenance; it must never relabel an interpretation as source evidence.

Fixed architecture

Treat these counts and seams as closed contracts except for the owner-approved optional learned-memory mode:

  • Exactly five source origins: Pi, OMP, Claude Code, Codex, and ChatGPT.
  • Default mode exposes exactly three MCP tools: mooncite_recall, mooncite_inspect, and mooncite_status. A valid explicit learned-memory enablement may additionally expose only mooncite_memory_recall, mooncite_memory_inspect, mooncite_memory_write, and mooncite_memory_delete.
  • Exactly four client integrations: Pi, OMP, Codex, and Claude Code. They connect to one local stdio MCP server. ChatGPT is a source origin, not a client integration.
  • MoonciteEngine owns ingestion, source adapters, coherent reads, citation identity, SQLite/FTS, refresh/rebuild, inspection, last-good behavior, and the bounded canonical-anchor resolver. LearnedMemoryStore owns the separate durable learned-memory.sqlite; learned-store failure must not disable evidence retrieval.
  • The Pi extension is a thin native-to-MCP adapter. .mcp.json, Codex, and Claude Code registrations point to the same packaged server. Do not duplicate retrieval behavior in an integration.
  • Pi and OMP use their standard roots. Only the narrow supported Claude Code, Codex, and local ChatGPT-export roots may be automatically discovered. Owner configuration adds optional roots. A configured origin/root pair suppresses only the automatic registration with that exact pair. Automatic sibling roots remain active. Authorization grants local reads only.
  • Symlinks are excluded from source admission. Authorized roots and opened files remain physically contained and identity-checked through Linux file descriptors.
  • Incremental publication is transactional. Pi same-inode size growth may be admitted as append_trusted after a coherent suffix read; this path does not reread the already indexed prefix. Detectable Pi shrinkage, same-size rewrites, or identity changes retain the last-good generation. Every detected change from supported mutable OMP, Claude Code, Codex, and ChatGPT producers replaces that source projection transactionally. Never publish knowingly partial coverage over a usable generation.

Read the full file on GitHub · 91 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. 5d ago First seen · 91 lines · 2,331 tokens per session scan A c4be82eef75d

Subscribe to this mod's changes

claude-memory-mcp AGENTS.md is an instructions file published in the GitHub repository WhenMoon-afk/claude-memory-mcp (68 stars, last pushed 14d ago), licensed MIT. It adds 2,331 tokens to every session, about $0.0117 per session on Opus 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-08-30.