Project Memory MCP server

Project Memory MCP server

project-mem-mcp•bypynesys

An MCP server that lets AI agents store and retrieve persistent project knowledge in MEMORY.md files across conversations.

License: Not specified•Runtime: Awaiting documentation review•Category: file systems-docs

WHAT IT DOES

  • •Stores and retrieves project knowledge in Markdown MEMORY.md files, with whole-file retrieval and offset/limit or heading-only reads for large files.
  • •Performs case-insensitive substring search inside MEMORY.md and returns matching lines with line numbers.
  • •Overwrites the entire memory file from literal Markdown text or from a UTF-8 file read by the server.
  • •Applies a single SEARCH/REPLACE patch for incremental updates when the search text appears exactly once.

BEST FOR

  • •AI agents that need to retain architecture decisions, gotchas, and work context across separate conversations.
  • •Claude Code users who want project memory loaded automatically on the first prompt of each session.
  • •Maintaining large project memory files through targeted section reads and patch-based edits.

ABOUT PROJECT-MEM-MCP

Project Memory MCP server is cataloged as an MCP server attributed to pynesys. An MCP server that lets AI agents store and retrieve persistent project knowledge in MEMORY.md files across conversations. It is categorized under file systems-docs. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Project Memory MCP server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

How does the server prevent reading excessively large memory files at once?

It raises a ValueError when the file would exceed roughly 20K estimated tokens, and callers can use head_only or offset/limit to retrieve what they need.

How does the server restrict which project directories it can access?

Project paths are validated against the --allowed-dir arguments, which can be repeated and default to the current working directory if omitted.

What does dream consolidation do to the memory file?

It removes content duplicated in CLAUDE.md files, collapses dormant topics, restructures for readability, and shrinks a bloated file substantially, typically around 30% per pass.

上游原版 README

在 GitHub 查看同一版本原文

README.md · 611987cabe5f · 采集于 2026-11-13 11:28:50 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

Project Memory MCP

An MCP server and Claude Code plugin for persistent project memory. Allows AI agents to maintain knowledge about projects between conversations via MEMORY.md files.

Features

  • Store & retrieve project knowledge in Markdown format
  • Incremental updates via SEARCH/REPLACE patches
  • Auto-read hook — automatically loads project memory on first prompt (Claude Code plugin)
  • Dream consolidation — automatic project memory cleanup and deduplication (Claude Code plugin)

Installation

Installs the MCP server, auto-read hook, and dream consolidation:

/plugin marketplace add /path/to/project-mem-mcp
/plugin install project-mem@cc-plugin-project-mem

Standalone MCP Server

For Codex, Claude Desktop, Cursor, or other MCP clients:

uvx project-mem-mcp

MCP Client Configuration

{
  "mcpServers": {
    "project-mem-mcp": {
      "command": "uvx",
      "args": [
        "project-mem-mcp",
        "--allowed-dir", "/path/to/your/projects"
      ]
    }
  }
}

The --allowed-dir argument restricts which directories the server can access. Can be used multiple times. Defaults to the current working directory if omitted.

Install from Source

git clone https://github.com/pynesys/project-mem-mcp.git
cd project-mem-mcp
python -m venv venv
source venv/bin/activate
pip install -e .

Tools

get_project_memory

Retrieves MEMORY.md content. With no extra args, returns the whole file. The server raises ValueError if the file would exceed ~20K estimated tokens (below most clients' tool-result caps); use head_only or offset/limit to pull what you need.

get_project_memory(
    project_path: str,
    offset: int = 0,           # 1-indexed start line; 0 = from start
    limit: int | None = None,  # max lines to return
    head_only: bool = False,   # return only size + heading TOC
) -> str

Typical large-file pattern: call once with head_only=True to get size and a section TOC (line ranges), then fetch sections via offset/limit.

search_project_memory

Substring search inside MEMORY.md. Case-insensitive. Returns matching lines with 1-indexed line numbers; combine with get_project_memory(offset, limit) to fetch surrounding context for a hit.

search_project_memory(
    project_path: str,
    query: str,
    max_results: int = 50,
) -> str

set_project_memory

Overwrites the entire MEMORY.md. Use when creating a new project memory or when patches fail.

set_project_memory(
    project_path: str,
    project_info: str | None = None,
    project_info_file: str | None = None,
)

Content comes from exactly one of the two sources: project_info is the literal Markdown text; project_info_file is an absolute path to a UTF-8 file the server reads itself — preferred for large rewrites drafted to a file, since the content need not be re-emitted as a parameter. Parameters are never shell-expanded, so $(cat draft.md) inside project_info does not work (the server rejects payloads that look like unexpanded substitutions).

update_project_memory

Applies a single SEARCH/REPLACE patch to MEMORY.md:

update_project_memory(project_path: str, patch_content: str)

Patch format:

<<<<<<< SEARCH
Text to find in the project memory file
=======
Text to replace it with
>>>>>>> REPLACE

The search text must appear exactly once in the file. Use empty replacement to remove content.

Plugin Features

When installed as a Claude Code plugin, you also get:

Project-memory Skill (auto-trigger)

Guides Claude on when and how to save to project memory. Automatically triggers when insights worth persisting are discovered — architecture decisions, gotchas, non-obvious patterns, current work context. The skill is marked user-invocable: false so it does not appear in the slash command picker; the main model invokes it autonomously.

Auto-read Hook

Automatically reads MEMORY.md into context on the first prompt of each session. No manual tool call needed.

Dream Consolidation

Automatic project memory maintenance triggered after writes when:

  • File size exceeds 50KB
  • Last consolidation was more than 24 hours ago

The dream spawns a sonnet subagent that:

  • Removes content duplicated in CLAUDE.md files
  • Collapses topics that have gone dormant, and tightens older Recent Sessions entries
  • Restructures for clarity and LLM readability
  • Shrinks a bloated file substantially (~30% per pass as the yardstick) rather than just holding it flat

If the session that triggered the dream just wrote something that must survive untouched, it passes a short Preserve verbatim list of pointers to the subagent — those items are kept as-is, while the consolidation still does its work on the rest of the file.

No backup is written; use git to recover the pre-dream state if needed.

Manual trigger: /dream

The last-dream timestamp is stored as last_dream: inside a YAML frontmatter block at the top of MEMORY.md. Projects previously using this plugin may still have a .claude/.last-dream-timestamp file — that file is now ignored and can be safely deleted (the first dream run after upgrade repopulates the frontmatter).

Security

  • Project paths are validated against --allowed-dir arguments
  • Project memory files should never contain sensitive information
  • Project memory files must be in English

Dependencies

  • fastmcp (>=3.2.0, <4.0.0)

License

MIT

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Project Memory MCP server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/project-mem-mcp)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related file systems-docs MCP Servers

Alternative and complementary servers in the same category

View all in file systems-docs →

A Model Context Protocol server for global law with read-only tools to find and read provisions by date, trace the law behind each word, search text and changes, and check cases or briefs against law in force.

Repository stats unavailable
Files & Documentation
LoreKeeper MCP server
lorekeeper-rpg-lorekeeper-com•lore-keeper

Hosted MCP server for tabletop RPG worlds that organizes messy notes and documents into a private store and lets MCP apps search lore, read documents, find characters, and optionally generate character or world pictures.

Repository stats unavailable
Files & Documentation

An MCP server that gives AI assistants scoped file system operations inside a project directory, with read-only reference projects plus git and GitHub tools.

Repository stats unavailable
Files & Documentation