Skip to main content
Glama
memory-mcp

memory-mcp

by KM-it-ops

memory-mcp — shared-brain MCP server

A local stdio MCP server over ~/.claude/memory. Exposes the LLM-Wiki brain (read / search / write) so a memory written in any agent — Claude Code, Cursor, Codex — is readable and searchable in all three. One brain, three clients, file-backed, no external service.

Tools

Tool

What it does

memory_search

Text + frontmatter ranking over name/description/tags/body (+ bucket filter, limit).

memory_read

One memory by name → frontmatter + body + resolved outbound [[wikilinks]].

memory_list

List memories (name, type, description), optional bucket filter.

memory_links

Inbound + outbound wikilink neighbours for a memory.

memory_write

Create/update a memory, regenerate MEMORY.md + hot.md, run the brain lint. A failed lint fails the write (file left for inspection).

Related MCP server: claude-memory

Architecture

  • Standalone TypeScript (ESM, strict + exactOptionalPropertyTypes), run via tsx.

  • Reads use a strict-typed parser/scanner; a corpus-parity test asserts agreement with the real brain so frontmatter never drifts.

  • Writes delegate index/hot/lint to the existing ~/.claude/tools/brain toolkit (subprocess, CLAUDE_DIR-scoped) — brain's exact logic, no source coupling.

  • Search is text + frontmatter only (no embeddings in v1).

Config

  • CLAUDE_DIR — brain root (default ~/.claude); <CLAUDE_DIR>/memory holds the buckets.

  • BRAIN_DIR — tools/brain checkout (default <CLAUDE_DIR>/tools/brain).

Run

node node_modules/tsx/dist/cli.mjs src/server.ts   # stdio MCP server (stdout = MCP channel)
npm test        # vitest
npm run typecheck

Registration in Claude Code / Cursor / Codex: see register.md.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      A local shared-memory MCP server for Claude, Codex, Hermes, and other MCP-aware agents, providing a durable memory layer with Markdown files and SQLite fact store.
      6
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      A persistent memory MCP server for Claude Code that enables long-term recall across sessions via hybrid search, code intelligence, and tools for reading/writing memory.
      20 npm
      5
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      A zero-dependency MCP server for cross-session memory recall in Claude Code. Provides lexical search, listing, and retrieval of past session memories to avoid re-explaining context.
      3
      10 npm
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Shared memory MCP server for AI coding agents, enabling context sharing across sessions with local SQLite or cloud-based semantic search, compatible with Claude Code and Cursor.
      2
      69 npm
      1
      MIT