Changes Memory MCP
The Changes Memory MCP server stores, retrieves, and searches project-level and cross-project corrections, preferences, conventions, domain facts, and anti-patterns. It helps agents avoid repeating mistakes by consulting past learnings.
Core Capabilities:
Add Memory:
•add_local– Save a new entry to a project’s memory file (corrections, preferences, etc.) with rich metadata: title, summary, rationale, tags, optional before/after examples, and related file paths. Accepts aprojectPathparameter to target a specific project.
•add_global– Save a cross-project entry to the global memory file, using the same structure.Read & Search:
•list_changes– Retrieve all saved entries from project, global, or both, with optional result limits.
•list_change_index– Get a lightweight index (id, title, store, kind, tags, paths) to quickly decide which entries to fetch in full. Supports optional text filtering.
•get_change– Fetch the full details of a single entry by its ID.
•search_changes– Full-text search across titles, summaries, tags, paths, and content, with configurable result limits.
•get_relevant_changes– Given a task or risk description, automatically surface the most relevant local and global entries to inform decisions.Tag Management:
•list_tag_catalog– View the recommended set of tags (e.g.,api,frontend,security,tests) for categorizing entries. Entries require 2–5 tags from this catalog to enable efficient indexing and retrieval.Flexible Configuration:
Memory is stored as plain Markdown files. Paths are configurable via CLI arguments or environment variables (CHANGES_MEMORY_PROJECT_PATH,CHANGES_MEMORY_GLOBAL_PATH), falling back to defaults (<project>/.codex/changes.mdfor local,~/.codex/changes.mdfor global).Cross-Project Support:
All read tools andadd_localaccept aprojectPathto target the correct project when working across multiple repositories.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Changes Memory MCPsearch change memory for frontend naming conventions"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Knowledge Memory MCP
Local MCP server for storing corrections, preferences, and reusable criteria across conversations, with a single Codex configuration and separate global + project memory files.
What It Solves
Stores user-approved corrections in a stable format.
Lists, searches, and retrieves relevant criteria for new tasks.
Helps agents avoid repeating mistakes when they consult this MCP before implementation or review.
Related MCP server: SecondBrain
Memory Stores
By default, memory is stored in plain Markdown files:
~/.codex/changes.md # global memory
<project>/.codex/changes.md # project memoryYou can change this with CLI arguments or environment variables:
--project-path=/path/to/project: default project when a tool call does not passprojectPath.--global-path=/path/to/changes.md: exact file path for global memory.CHANGES_MEMORY_PROJECT_PATH: equivalent to--project-path.CHANGES_MEMORY_GLOBAL_PATH: equivalent to--global-path.
Backward compatibility:
--memory-rootandCHANGES_MEMORY_ROOTstill work as the default project path.--memory-pathandCHANGES_MEMORY_PATHforce an exact file path for the default project memory.
MCP Tools
add_local: stores a new correction or criterion in project memory.add_global: stores a cross-project criterion in global memory.list_change_index: lists a compact index of entries with id, title, store, kind, tags, and paths.list_tag_catalog: lists the recommended tag catalog for memory entries.list_changes: lists project + global entries by default.search_changes: searches entries by free text, tags, or paths.get_relevant_changes: returns the most relevant project + global entries for a task.get_change: retrieves an exact entry by id from project + global memory.
Read tools and add_local accept projectPath to select the right project when a conversation touches multiple repositories.
Recommended Tags
Every add_local and add_global call must include tags. Prefer 2-5 tags from this catalog:
api, backend, codex, components, config, database, docker, docs, frontend,
git, i18n, json, mcp, migration, mongo, naming, opensearch, performance,
security, styles, testsUse list_tag_catalog when unsure which tags fit. Tags are what make list_change_index useful without loading full entries.
Run From GitHub
npx -y --package github:formonkey/knowledge-memory-mcp#main knowledge-memory-mcpRun From A Local Checkout
node /path/to/knowledge-memory-mcp/src/index.jsCodex MCP Configuration
Use one global config in ~/.codex/config.toml.
GitHub shows a copy button on each fenced code block below, so users can copy each file or snippet directly.
Recommended setup, directly from GitHub:
[mcp_servers.knowledge_memory]
command = "npx"
args = [
"-y",
"--package",
"github:formonkey/knowledge-memory-mcp#main",
"knowledge-memory-mcp"
]
enabled = true
startup_timeout_sec = 20
tool_timeout_sec = 60
default_tools_approval_mode = "auto"Local checkout:
[mcp_servers.knowledge_memory]
command = "node"
args = [
"/absolute/path/to/knowledge-memory-mcp/src/index.js"
]
enabled = true
startup_timeout_sec = 20
tool_timeout_sec = 60
default_tools_approval_mode = "auto"Environment-variable alternative:
[mcp_servers.knowledge_memory.env]
CHANGES_MEMORY_GLOBAL_PATH = "/Users/nigma/.codex/changes.md"After changing the config, restart Codex so the MCP server is reloaded.
Copy-Paste Codex Setup
This is the recommended setup when several Codex agents should share the same memory server.
GitHub renders a copy-to-clipboard button on every code block in this section.
Paste each block here:
~/.codex/config.toml # one global MCP server config
<project>/.codex/agents/knowledge-reviewer.toml # optional read-only reviewer agent
<project>/.agents/skills/knowledge-memory-review/SKILL.md # optional reviewer skill
<project>/AGENTS.md # optional project-wide agent rules1. Global MCP config
Copy this into:
~/.codex/config.toml[mcp_servers.knowledge_memory]
command = "npx"
args = [
"-y",
"--package",
"github:formonkey/knowledge-memory-mcp#main",
"knowledge-memory-mcp"
]
enabled = true
startup_timeout_sec = 20
tool_timeout_sec = 60
default_tools_approval_mode = "auto"Restart Codex after editing ~/.codex/config.toml.
2. Project reviewer agent
Create this file inside any project that should use the reviewer:
<project>/.codex/agents/knowledge-reviewer.tomlname = "knowledge_reviewer"
description = "Read-only reviewer that checks code against knowledge_memory before and after implementation."
model = "gpt-5.5"
model_reasoning_effort = "high"
sandbox_mode = "read-only"
developer_instructions = """
You are a read-only knowledge reviewer for this repository.
Required MCP server:
- knowledge_memory
Available knowledge_memory tools:
- list_change_index
- list_tag_catalog
- get_change
- search_changes
- get_relevant_changes
Guardrails:
- Do not edit files.
- Do not run write, format, migration, install, or destructive commands.
- Do not call add_local or add_global.
- Do not save memory. If a new reusable rule is found, propose it to the main agent and wait for explicit user confirmation.
- Prefer compact reads: call list_change_index first, then retrieve only relevant entries with get_change, search_changes, or get_relevant_changes.
- When reviewing multiple projects, pass projectPath to knowledge_memory tool calls.
Review workflow:
1. Call list_change_index with projectPath when available.
2. Use tags from the index to decide which entries matter.
3. Retrieve only the relevant entries.
4. Review the current task or diff against those entries.
5. Report findings first, ordered by severity, with file and line references when available.
6. Include an explicit "Memory Checks" section listing which memory ids were applied or saying that no relevant entries were found.
Output format:
- Findings
- Memory Checks
- Open Questions
- Suggested Memory To Save, only if applicable and only as a proposal
"""Notes:
The reviewer workflow is fully embedded in
developer_instructions, so this agent works even without an extra skill file.The important guardrail is
sandbox_mode = "read-only"plus the explicit instruction not to use write tools.If your Codex version supports additional per-agent permission fields, keep this reviewer read-only.
3. Optional reviewer skill
Create this file if you want the same review workflow available as a reusable Codex skill in the project:
<project>/.agents/skills/knowledge-memory-review/SKILL.md---
name: knowledge-memory-review
description: Review a task, plan, or diff against knowledge_memory using the compact memory index first.
---
# Knowledge Memory Review
Use this skill when reviewing implementation plans, diffs, bug fixes, or refactors against saved project and global memory.
## Required MCP Server
- `knowledge_memory`
## Read-Only Tools
- `list_change_index`
- `list_tag_catalog`
- `get_change`
- `search_changes`
- `get_relevant_changes`
## Guardrails
- Do not edit files.
- Do not run write, format, migration, install, or destructive commands.
- Do not call `add_local` or `add_global`.
- Do not save memory directly.
- If a new reusable rule should be saved, propose it and wait for explicit user confirmation.
- Prefer compact reads: call `list_change_index` first, then retrieve only the entries that look relevant.
- When reviewing several projects in one conversation, pass `projectPath` to memory tool calls.
## Workflow
1. Call `list_change_index` with `projectPath` when available.
2. Select candidate entries by tags, paths, title, and summary.
3. Retrieve only relevant entries with `get_change`, `search_changes`, or `get_relevant_changes`.
4. Review the task, plan, or diff against those entries.
5. Report findings first, ordered by severity, with file and line references when available.
6. Include a `Memory Checks` section listing the memory ids applied, or state that no relevant entries were found.
7. Include `Suggested Memory To Save` only when there is a reusable learning, and only as a proposal.The knowledge-reviewer.toml agent above already contains these rules. This skill is useful for main agents or other reviewers that load repository skills.
4. Optional project AGENTS.md snippet
Copy this into a project's AGENTS.md if you want every agent in that repo to use memory:
Before implementing, reviewing, or fixing code, use the `knowledge_memory` MCP.
Start with `list_change_index` to inspect the compact index. Use tags to decide which entries are relevant, then call `get_change`, `search_changes`, or `get_relevant_changes` only for those entries.
Use `add_local` only after explicit user confirmation for project-specific learnings.
Use `add_global` only after explicit user confirmation for cross-project learnings.
Every saved memory entry must include 2-5 tags from `list_tag_catalog`.
When a conversation touches multiple projects, pass `projectPath` to select the correct local memory file.5. Example prompts
Use the reviewer before implementation:
Ask knowledge_reviewer to inspect memory for this repo and review the planned change before I implement it.Use the reviewer after implementation:
Ask knowledge_reviewer to review this diff against knowledge_memory and report any repeated mistakes or missing conventions.Save a local project rule:
Save this as local memory: React components in this repo must use PascalCase file names and include the Component suffix. Tags: components, naming, frontend.Save a global rule:
Save this as global memory: Always check list_change_index before reading full memory entries. Tags: codex, mcp, performance.Recommended Agent Instruction
Add a rule like this to global or repository instructions when you want agents to use this memory:
Before implementing or reviewing changes, call `list_change_index` on the `knowledge_memory` MCP server to inspect the compact index. Then call `get_change`, `search_changes`, or `get_relevant_changes` only for entries that look relevant.
When a conversation touches multiple projects, pass `projectPath` in tool calls to select the correct local memory.
Do not store memory on your own initiative. If the user confirms that a learning should be saved, use `add_local` for project-specific criteria and `add_global` only for criteria that apply across projects. Always include 2-5 tags from the catalog.Notes
Persistence currently uses plain
changes.mdfiles, with no database or external index.Search is text-based with simple ranking. It is enough to start and easy to audit.
The model can later evolve toward richer scopes, editable confirmations, and explicit
Before -> Afteroutput.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
An MCP memory server. One memory your agents share — across models, devices and apps.
One memory, every AI. A shared, user-owned markdown memory your AI clients read and write over MCP.
Persistent, inspectable memory for AI agents with lineage, correction, and a hosted MCP endpoint.
Shared, governed long-term memory for AI agents across tools and sessions via MCP and REST.
Related MCP Servers
- FlicenseNot gradedqualityBmaintenanceA local, cross-editor MCP server that provides persistent memory for coding agents, capturing and recalling decisions, conventions, and fixes across sessions without API keys.
- AlicenseAqualityCmaintenanceA local-first MCP server that provides a shared Markdown-based memory for AI coding agents, enabling cross-agent context persistence via tools like memory_search and memory_capture.101MIT
- AlicenseBqualityAmaintenanceA local MCP server that provides agents with tools to list, read, search, inspect history and diffs, and capture unstructured text in a user-owned Git repository of durable memory.5MIT
- AlicenseNot gradedqualityBmaintenanceMCP server providing persistent, local-first memory for AI agents via Markdown files in a git repo, with search, branching, and auditability.172MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/formonkey/knowledge-memory-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server