memory-hnsw

memory-hnsw is a skill for Claude Code, Codex from abho7/mcp-memory-server. It costs 107 tokens per session (775 once invoked), scanned A, original, MIT.

A local memory system that saves notes in a searchable index and recalls them by meaning. The notes remain available after the agent restarts and are stored without sending them to an external API.

In plain words
What is it for?
Use it to save and retrieve long-term project facts, working preferences, past decisions, and environment instructions. It also supports listing and deleting saved memories.
Why use it?
It removes the need to repeat useful decisions, preferences, and project conventions in every session.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions CLAUDE.md.

Good fit Use it to save and retrieve long-term project facts, working preferences, past decisions, and environment instructions. It also supports listing and deleting saved memories.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/abho7/mcp-memory-server/mcp-memory-server
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.

Any agent
npx skills add abho7/mcp-memory-server --skill mcp-memory-server
Clone the repo
git clone --depth 1 https://github.com/abho7/mcp-memory-server

Made for: Claude Code, Codex.

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 memory-hnsw

README.md
[![agentmods](https://agentmods.dev/badge/skills/abho7/mcp-memory-server/mcp-memory-server/github.svg)](https://agentmods.dev/skills/abho7/mcp-memory-server/mcp-memory-server)
Your own site
<a href="https://agentmods.dev/skills/abho7/mcp-memory-server/mcp-memory-server"><img src="https://agentmods.dev/badge/skills/abho7/mcp-memory-server/mcp-memory-server/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 memory-hnsw

Your own site · 80×15
<a href="https://agentmods.dev/skills/abho7/mcp-memory-server/mcp-memory-server"><img src="https://agentmods.dev/badge/skills/abho7/mcp-memory-server/mcp-memory-server.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 107 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 775 The whole file, excluding the scripts and references it only reads on demand.
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.00107 $0.00775
Opus 5.5 $0.00043 $0.00310
Sonnet 5.5 $0.00021 $0.00155
Haiku 4.5 $0.00011 $0.00077

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

Security

Grade A, and why

memory-hnsw 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 1mo ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/demo_two_sessions.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

SKILL.md · 68 lines

How it starts

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

Persistent memory (HNSW)

Four MCP tools backed by a local vector index. Memories survive restarts; recall is by meaning, not keyword match.

Tool Signature Returns
store_memory (text: str, tags: list[str] = []) the new memory's id
search_memory (query: str, k: int = 5) k nearest memories, similarity-ranked
list_memories (tag: str = None) all memories, newest first, optional tag filter
delete_memory (id: str) confirmation

When to store

Store facts whose value outlives the current session:

  • Decisions and their reasoning — "We picked Postgres over MySQL because we need JSONB indexing"
  • Stable preferences — "Prefers short, specific review comments"
  • Project conventions not visible in the code — "Integration tests need Docker running"
  • Environment and process facts — "The staging deploy key rotates monthly"

Do not store: anything already in the repo (code structure, git history, CLAUDE.md), transient state ("the build is currently failing"), or secrets and credentials. The store is plaintext JSON on disk.

Write each memory as a self-contained sentence. "Use pnpm, not npm" is recallable in six months; "use that instead" is not.

Search before assuming you lack context — at the start of work on a familiar project, when the user references a past decision, or when a question sounds like it has an established answer. It is cheap; a miss returns nothing and costs one call.

Phrase the query as the question you actually have. Embeddings match on meaning, so "which database did we choose and why" finds a memory worded "We picked Postgres over MySQL..." despite sharing almost no words.

Tags

Tags are free-form, matched case-insensitively, and used only by list_memories. A small stable vocabulary works best: decision, preference, ops, testing, convention. search_memory ignores tags entirely — it ranks on the text.

Reading results

search_memory returns a cosine similarity in [-1, 1]. Judge hits relatively, not against a fixed threshold: the top result is the best available match, and MiniLM scores genuine paraphrase matches around 0.3–0.5 rather than near 1.0. Treat a top score below roughly 0.15 as probably unrelated, and say so rather than forcing a connection.

Read the full file on GitHub · 68 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 1mo ago First seen · 68 lines · 107 tokens per session scan A a29a1076e864

Subscribe to this mod's changes

memory-hnsw is a skill published in the GitHub repository abho7/mcp-memory-server (0 stars, last pushed 15d ago), licensed MIT. It adds 107 tokens to every session and 775 once invoked, about $0.0004 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-08-31.

Related

Other skills, from other repositories

agentcore-investigation

Investigate Bedrock AgentCore runtime sessions via CloudWatch Logs Insights — resolve session/trace IDs, query OTEL spans, filter noise, build timelines. Use when debugging AgentCore agent sessions, tracing tool calls, or analyzing latency.

awslabs/mcp · 52 tokens

amazon aurora dsql

Deprecated compatibility redirect for Aurora DSQL guidance. Use when a request concerns DSQL, Aurora DSQL, distributed SQL, DSQL schemas, migrations, queries, authentication, performance, or application development.

awslabs/mcp · 46 tokens

td-api-reference

MUST READ before writing TD Python via executepython, setdatcontent, or editdatcontent, and before any heavy build. Parameters, storage, operators, referencing, threading, cook model, heavy-build safety caps.

dylanroscover/Embody · 48 tokens

brief

Compile a conversational request into an Embody task brief (briefs/.md): skills to load, discovered anchors, verifiable success criteria, and gates -- then execute the work from that contract. User-invoked via /brief.

dylanroscover/Embody · 49 tokens

memory-audit-pattern-extraction

A method for investigating repeated mistakes by comparing related memories and checking whether an earlier reminder failed. It looks at where the reminder was stored, when it was created, and whether it was strong enough to prevent the mistake.

Dataojitori/nocturne_memory · 48 tokens

frontmcp-extensibility

Use when extending FrontMCP beyond the core SDK by integrating external npm packages, libraries, or third-party services into providers and tools. Covers VectoriaDB for in-memory semantic and vector search (ML-based embeddings or TF-IDF keyword engines, with persistence) and the tamper-evident, hash-chained skill…

agentfront/frontmcp · 124 tokens