codex-memory
Provides curated long-term memory for Codex CLI via MCP, with Markdown-based storage, deduplication, and decay-based forgetting.
README
codex-memory
English | 简体中文
Curated long-term memory for Codex CLI, delivered as an MCP server. It stores atomic facts as plain Markdown files, deduplicates on write, retrieves via a lightweight index, and — crucially — forgets: entries decay by type-aware half-life and are archived after human review.
Core idea: raw experience accumulates, but knowledge is what survives distillation — so forgetting is treated as a feature on equal footing with remembering.
- 4 MCP tools:
memory_index/memory_search/memory_write/memory_revise - One memory per Markdown file, git-versioned, human-auditable — no database
- Built-in dedup (weighted token overlap, CJK-aware), source ranking (
user-correctionwins) - Global/project scopes prevent repository-specific knowledge from leaking into unrelated tasks; optional provenance points back to supporting sessions
- Development schema is strict:
cwd,scope, counters, dates, type, and source must satisfy the current contract; no legacy defaults or migrations - Decay scoring, an archive buffer with 90-day expiry, driven by a small CLI
- Explicit memory graduation promotes proven global preferences/lessons into a managed AGENTS.md region and retains a permanent audit copy
- Weekly
consolidatejob — semantic dedup, pattern promotion, and an episodic bridge from Codex's built-in memories, powered bycodex exec(no extra LLM dependency), one git commit per run - Built-in evals: repeat-mistake rate, write-burst and project-coverage signals (
eval), plus the index growth curve (growth)
Documentation
| English | 简体中文 |
|---|---|
| Getting Started | 快速开始 |
| Design | 设计 |
| Reference | 参考手册 |
Agent instruction templates (append to ~/.codex/AGENTS.md): English · 中文
License
MIT © Xiandong Liu (刘宪东)
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
E2B
Using MCP to run code via e2b.