npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

openmembrane

v1.0.2

Published

The intelligent membrane for AI memory — autonomously learns from your sessions, blocks secrets, and persists only what matters. No manual saving. Local-first, private, tool-agnostic.

Downloads

172

Readme

OpenMembrane

OpenMembrane is the intelligent membrane for AI coding memory. It autonomously reads and learns from your coding sessions — you never have to tell it what to save. It selectively absorbs project knowledge, blocks secrets, filters noise, resolves conflicts, and persists only what matters.

No manual effort. No data leaves your machine unless you choose it. Safe, private, and trustworthy by design.

  • Zero-effort — learns from sessions automatically, no commands or prompts needed
  • Secure by default — secrets are detected and rejected before they ever reach storage
  • Self-managing — deduplicates, resolves conflicts, and filters noise on its own
  • Local-first — all memory stays on your machine; optional EU/CH-hosted cloud sync
  • Tool-agnostic — works with any AI coding tool via MCP (Claude, Copilot, Cursor, OpenCode, and more)

Installation

Install and run the MCP server with npx (requires Node.js >= 18):

npx openmembrane

Or install globally:

npm install -g openmembrane
openmembrane

No cloud accounts required. All memory is stored locally.

Configuring Your AI Tool

OpenMembrane runs as an MCP server over stdio. Add it to your AI tool's MCP configuration:

Claude Desktop

Edit claude_desktop_config.json:

{
  "mcpServers": {
    "openmembrane": {
      "command": "npx",
      "args": ["openmembrane"]
    }
  }
}

Claude Code

claude mcp add openmembrane -- npx openmembrane

VS Code / GitHub Copilot

Add to .vscode/mcp.json in your project:

{
  "servers": {
    "openmembrane": {
      "command": "npx",
      "args": ["openmembrane"]
    }
  }
}

Cursor

Add to .cursor/mcp.json in your project:

{
  "mcpServers": {
    "openmembrane": {
      "command": "npx",
      "args": ["openmembrane"]
    }
  }
}

OpenCode

Add to ~/.config/opencode/opencode.json:

{
  "mcp": {
    "openmembrane": {
      "type": "local",
      "command": ["npx", "-y", "openmembrane"]
    }
  }
}

See .opencode/INSTALL.md for detailed setup including global instructions and development-from-source configuration.

Environment Variables

By default, local memory is stored in .openmembrane under the current working directory. Override this with:

  • OPENMEMBRANE_HOME: directory for local JSON memory stores.
  • OPENMEMBRANE_PROJECT_ID: default project id when a tool call does not pass projectId.

MCP Tools

  • remember — save structured memory directly. Provide content, type, and optional scope/tags. No API key needed. Supports single and batch mode.
  • propose_memory_from_session — submit a session transcript or summary for server-side LLM extraction. Requires a configured extractor. Useful for automation adapters.
  • get_project_rules — retrieve project rules and conventions for the current scope.
  • get_relevant_context — find memories relevant to a natural language query.
  • search_memory — search saved memories by query, scope, type, or tags.
  • list_memory_candidates — list pending memory candidates awaiting approval.
  • approve_memory_candidate — approve a pending candidate to save it as memory.
  • approve_all_candidates — approve all pending candidates at once.
  • reject_memory_candidate — reject a pending candidate with an optional reason.
  • reject_all_candidates — reject all pending candidates at once.
  • update_memory — update the content, type, scope, or tags of a saved memory.
  • supersede_memory — mark a memory as superseded, optionally linking a replacement.
  • review_stale_memories — list memories older than a threshold (default: 6 months).
  • export_static_memory_files — generate static instruction files (AGENTS.md, CLAUDE.md, etc.).
  • get_diagnostics — retrieve diagnostic events filtered by severity or code.
  • list_audit_log — retrieve recent audit events.

Architecture

OpenMembrane supports two paths for saving memory:

  1. remember (primary): The AI tool calls remember directly with structured content and type. No server-side LLM needed. Memories go through the full pipeline (secret detection, policy filtering, deduplication) and are auto-saved.

  2. propose_memory_from_session (secondary): An adapter or AI tool submits a full session transcript for server-side LLM extraction. Requires a configured extractor (OpenAI or compatible provider).

remember tool                          propose_memory_from_session
  |                                      |
  v                                      v
processStructured()                    SessionIngestor
  |                                      -> SecretDetector redaction
  v                                      -> MemoryExtractor interface
MemoryClassifier                         -> MemoryClassifier
  -> PolicyEngine                        -> PolicyEngine
  -> Deduplicator                        -> Deduplicator
  -> ConflictDetector                    -> ConflictDetector
  -> ActionRecommender                   -> ActionRecommender
  -> MemoryStore or PendingCandidateStore

Package responsibilities:

  • packages/core: domain types, extraction interface, policy checks, classification, deduplication, conflict detection, and pipeline orchestration.
  • packages/storage: local JSON persistence for saved memory, pending approvals, and audit events.
  • packages/exporters: static fallback file generation for AI tools that read project instruction files.
  • packages/shared: small runtime helpers for IDs, time, and result types.
  • apps/mcp-server: local MCP server exposing saved memory and approval workflows to AI tools.

Provider-specific LLM calls are intentionally kept out of the core. The boundary is:

interface MemoryExtractor {
  extract(input: SessionInput): Promise<MemoryCandidate[]>;
}

The MockMemoryExtractor is used for deterministic testing. The OpenAiMemoryExtractor supports OpenAI and any compatible API endpoint (via baseUrl).

Diagnostics And Errors

OpenMembrane distinguishes audit history from diagnostics:

  • Audit events describe normal memory activity, such as session ingestion, candidate extraction, saved memory, queued candidates, and rejected candidates.
  • Diagnostics describe operational problems, such as validation errors, missing candidates, invalid local JSON stores, unsafe approval attempts, and export failures.

MCP tools return safe user-facing error payloads with a diagnosticId. The detailed diagnostic can be inspected through get_diagnostics without exposing raw transcripts or secrets.

Static Fallback Files

Static exporters can generate:

  • AGENTS.md
  • CLAUDE.md
  • .github/copilot-instructions.md
  • .cursor/rules/openmembrane.mdc
  • docs/ai/project-memory.md

These files are compatibility fallbacks for tools that cannot retrieve memory through MCP. By default, exporters omit confidential memories because these files may be committed to source control. Callers must explicitly opt in to include confidential memory.

Development

git clone https://github.com/mohamadalhusseinie/openmembrane.git
cd openmembrane
npm install

Run the MCP server locally (from source via tsx):

npm run mcp:stdio

Run tests and type checking:

npm test          # vitest
npm run typecheck # tsc --noEmit
npm run check     # both

Build the publishable bundle:

npm run build

Documentation

  • Architecture — pipeline design, type schemas, MCP tool surface, package dependencies
  • Security and Privacy — secret handling, data storage rules, LLM usage policy
  • Product Vision — product thesis, UX workflow, memory quality criteria
  • Roadmap — phased delivery plan from local MVP to hosted mode
  • Contributing — setup, development workflow, PR guidelines