/ Directory / Playground / Memory Bank MCP
● Community alioshr 🔑 Needs your key

Memory Bank MCP

by alioshr · alioshr/memory-bank-mcp

Centralized memory bank server — keep Cline/Cursor/Claude memory files in one folder, scoped per project, safe from path traversal.

memory-bank-mcp turns the Cline Memory Bank pattern into a standalone MCP server. Point it at a root directory, and every project gets its own memory-bank folder that agents can read, write, update, and list through five simple tools. Designed so multiple clients (Claude Desktop, Cursor, Windsurf) share the same canonical memory — you don't need separate copies per IDE.

Why use it

Key features

Live Demo

What it looks like in practice

memory-bank-mcp.replay ▶ ready
0/0

Install

Pick your client

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "memory-bank-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@allpepper/memory-bank-mcp"
      ],
      "env": {
        "MEMORY_BANK_ROOT": "/path/to/memory/banks"
      }
    }
  }
}

Open Claude Desktop → Settings → Developer → Edit Config. Restart after saving.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "memory-bank-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@allpepper/memory-bank-mcp"
      ],
      "env": {
        "MEMORY_BANK_ROOT": "/path/to/memory/banks"
      }
    }
  }
}

Cursor uses the same mcpServers schema as Claude Desktop. Project config wins over global.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "memory-bank-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@allpepper/memory-bank-mcp"
      ],
      "env": {
        "MEMORY_BANK_ROOT": "/path/to/memory/banks"
      }
    }
  }
}

Click the MCP Servers icon in the Cline sidebar, then "Edit Configuration".

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "memory-bank-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@allpepper/memory-bank-mcp"
      ],
      "env": {
        "MEMORY_BANK_ROOT": "/path/to/memory/banks"
      }
    }
  }
}

Same shape as Claude Desktop. Restart Windsurf to pick up changes.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "memory-bank-mcp",
      "command": "npx",
      "args": [
        "-y",
        "@allpepper/memory-bank-mcp"
      ]
    }
  ]
}

Continue uses an array of server objects rather than a map.

~/.config/zed/settings.json
{
  "context_servers": {
    "memory-bank-mcp": {
      "command": {
        "path": "npx",
        "args": [
          "-y",
          "@allpepper/memory-bank-mcp"
        ]
      }
    }
  }
}

Add to context_servers. Zed hot-reloads on save.

claude mcp add memory-bank-mcp -- npx -y @allpepper/memory-bank-mcp

One-liner. Verify with claude mcp list. Remove with claude mcp remove.

Use Cases

Real-world ways to use Memory Bank MCP

Share one memory bank across Claude Desktop, Cursor, and Windsurf

👤 Developers who hop between IDEs and want a single source of project knowledge ⏱ ~15 min beginner

When to use: You use more than one AI client and keep recopying the same notes about the project.

Prerequisites
  • Node 18+ — nvm install 18
  • A directory to hold memory banks — mkdir -p ~/ai-memory
Flow
  1. Set MEMORY_BANK_ROOT in each client's MCP config
    Point every MCP client at MEMORY_BANK_ROOT=~/ai-memory and install @allpepper/memory-bank-mcp.✓ Copied
    → memory_bank_* tools appear in each client
  2. Create the first project bank
    memory_bank_write project=acme-api file=architecture.md — summarize the service boundaries of this repo.✓ Copied
    → File appears under ~/ai-memory/acme-api/architecture.md
  3. Read from a different client
    In Cursor: memory_bank_read project=acme-api file=architecture.md✓ Copied
    → Same content returned; edits from either client show up instantly

Outcome: A shared, versionable memory folder that every IDE consults automatically.

Pitfalls
  • Forgetting to restart the MCP client after changing MEMORY_BANK_ROOT — Close and reopen the client; env vars are only read on startup
Combine with: filesystem · github

Give a new agent instant context about a long-running project

👤 Teams running multiple agents on the same codebase ⏱ ~10 min beginner

When to use: A fresh chat needs the same background (conventions, past decisions, known bugs) your last chat already learned.

Prerequisites
  • Existing memory bank for this project — Populate it during normal work with memory_bank_write
Flow
  1. List the files the project bank already has
    Call list_project_files for project=acme-api.✓ Copied
    → architecture.md, decisions.md, open-questions.md, etc.
  2. Load the relevant subset
    Read decisions.md and open-questions.md before starting the task.✓ Copied
    → Agent references prior decisions instead of re-asking

Outcome: New sessions start warm instead of cold; you stop paying the onboarding tax each time.

Pitfalls
  • Letting the bank grow into one giant file — Split by concern — decisions, architecture, open-questions, runbook — so the agent loads only what it needs
Combine with: codebase-memory

Version your agent memory in git like any other project doc

👤 Teams who want memory to survive across machines and contributors ⏱ ~20 min intermediate

When to use: You want memory files reviewed, diffable, and shared with teammates.

Prerequisites
  • Git repo to host the bank — git init inside MEMORY_BANK_ROOT or a project subfolder
Flow
  1. Make the root a repo
    Turn ~/ai-memory into a git repo; add a .gitignore for anything sensitive.✓ Copied
    → Standard git repo structure
  2. Let the agent update memory during sessions
    After fixing the bug, call memory_bank_update to record the root cause in bugs.md.✓ Copied
    → New commit-ready diff
  3. Commit and push
    Review the memory diff, commit, push.✓ Copied
    → Teammates pull and their agents immediately share the context

Outcome: Agent memory becomes a first-class project artifact.

Pitfalls
  • Committing secrets the agent noted down — Add a pre-commit scanner (e.g., gitleaks) before pushing the memory repo
Combine with: github · git

Combinations

Pair with other MCPs for X10 leverage

memory-bank-mcp + filesystem

Memory bank keeps agent notes; filesystem reads the code they refer to

Read decisions.md from the memory bank, then open the files it references in src/.✓ Copied
memory-bank-mcp + github

After a PR merges, record the outcome in the project's memory bank

Summarize the merged PR #412 and update memory-bank/acme-api/decisions.md.✓ Copied
memory-bank-mcp + codebase-memory

Two complementary memory layers — code-graph memory + human-readable notes

Combine codebase-memory symbol graph with the narrative in memory-bank/architecture.md.✓ Copied

Tools

What this MCP exposes

ToolInputsWhen to callCost
memory_bank_read project: str, file: str Pull existing memory before planning 0
memory_bank_write project: str, file: str, content: str Create a brand-new memory file 0
memory_bank_update project: str, file: str, content: str Modify an existing memory file (fails if missing) 0
list_projects (none) Discover which projects already have memory banks 0
list_project_files project: str See what memory files are available before reading 0

Cost & Limits

What this costs to run

API quota
No external API
Tokens per call
Depends on file size; typical note 200–2000 tokens
Monetary
Free — runs locally
Tip
Keep memory files short and topic-scoped; loading a 50KB file wastes context every call.

Security

Permissions, secrets, blast radius

Credential storage: No credentials. MEMORY_BANK_ROOT path is the only config.
Data egress: No network calls — reads and writes stay on the local filesystem under MEMORY_BANK_ROOT.

Troubleshooting

Common errors and fixes

Error: MEMORY_BANK_ROOT is not set

Set the env var in your MCP client config and restart the client.

Verify: echo $MEMORY_BANK_ROOT
ENOENT when reading a file

Call list_project_files first — the filename must exist exactly.

Verify: ls $MEMORY_BANK_ROOT/<project>/
EACCES on write

Ensure the MCP process has write permission on MEMORY_BANK_ROOT.

Verify: touch $MEMORY_BANK_ROOT/.probe && rm $MEMORY_BANK_ROOT/.probe

Alternatives

Memory Bank MCP vs others

AlternativeWhen to use it insteadTradeoff
memory (official)You want a knowledge graph, not file-based notesGraph is structured but less human-editable
memory-serviceYou want semantic search over memoryHeavier setup; embeddings required
Cline Memory Bank (inline)You only use Cline and don't need cross-IDE sharingLocked to Cline

More

Resources

📖 Read the official README on GitHub

🐙 Browse open issues

🔍 Browse all 400+ MCP servers and Skills