[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-94750":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":13,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":15,"stars30d":16,"stars90d":14,"forks30d":14,"starsTrendScore":14,"compositeScore":17,"rankGlobal":9,"rankLanguage":9,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":9,"pushedAt":9,"updatedAt":23,"readmeContent":24,"aiSummary":25,"trendingCount":14,"starSnapshotCount":14,"syncStatus":13,"lastSyncTime":26,"discoverSource":27},94750,"mcp-memory","fellowgeek\u002Fmcp-memory","fellowgeek","An OKF-backed Model Context Protocol (MCP) server delivering persistent long-term memory and SQLite FTS5 search for AI agents.",null,"Python",188,11,2,0,15,52,55.94,"MIT License",false,"main",true,[],"2026-08-24 04:01:22","# MCP-Memory: OKF-Backed Agent Memory Server\n\n**MCP-Memory** is a Model Context Protocol (MCP) server that equips AI agents (such as Claude Desktop, Cursor, Antigravity, Windsurf, or Codex) with persistent, long-term memory capabilities.\n\nMemory records are formatted using the [**Open Knowledge Format (OKF v0.2)**](https:\u002F\u002Fgithub.com\u002FGoogleCloudPlatform\u002Fknowledge-catalog\u002Fblob\u002Fmain\u002Fokf\u002FSPEC.md) standard and indexed with a local **SQLite** instance (supporting FTS5 full-text search) for fast key-value lookups, tag filtering, and content search.\n\n> **Fast Track:** [Jump directly to Quick Start](#quick-start)\n\n---\n\n## Key Features\n\n* **Persistent State Across Sessions:** Enables AI agents to read, store, search, and delete stateful memory snippets that persist across chat turns and sessions.\n* **OKF Standard Compliance:** Stores every memory item formatted as an OKF v0.2 Markdown document with YAML frontmatter (`type`, `key`, `namespace`, `tags`, `generated`, `sources`, `verified`, `status`, `stale_after`), adhering strictly to [`SPEC.md`](SPEC.md) and [`OKF_RULES.md`](OKF_RULES.md).\n* **Dual-Layer Architecture:**\n  - **Human-Browseable OKF Directory**: Automatically dumps and syncs every memory to disk as a raw `.md` file inside the `memory\u002F` bundle directory with hierarchical `index.md` progressive disclosure files (root `index.md` versioned with `okf_version: \"0.2\"`) and `log.md` update history tracking.\n  - **High-Performance SQLite Indexing**: SQLite FTS5 (Full-Text Search) and automatic triggers for sub-20ms key lookups and instant keyword searches.\n* **Namespace Isolation:** Supports contextual separation (e.g. `user\u002Fpreferences`, `project\u002Farchitecture`, `default`).\n* **Zero Boilerplate Setup:** Quick setup wizard (`python3 setup.py`) auto-configures installed MCP tools (Antigravity, Claude, Cursor, Windsurf, Codex).\n\n---\n\n## MCP Tools\n\nThe server exposes four primary MCP tools to interacting agents:\n\n### 1. `memory_store`\nStores or updates a memory record in OKF v0.2 format.\n* **Parameters:**\n  - `key` *(string, required)*: Unique identifier or path for the memory (e.g. `user\u002Fpreferences\u002Fcoding_style` or `project\u002Farchitecture`).\n  - `content` *(string or object, required)*: Core information to store.\n  - `project_root` *(string, required)*: Absolute path to the active project root directory (e.g. `\u002FUsers\u002Fuser\u002FProjects\u002Fmy-app`).\n  - `tags` *(array of strings, optional)*: Classification tags for filtering.\n  - `namespace` *(string, optional, default: `\"default\"`)*: Scope\u002Fnamespace.\n  - `concept_type` *(string, optional, default: `\"Agent Memory\"`)*: OKF concept type (e.g. `Metric`, `Playbook`, `Attested Computation`).\n  - `title` *(string, optional)*: Display name.\n  - `description` *(string, optional)*: One-line summary.\n  - `resource` *(string, optional)*: Canonical URI of underlying asset.\n  - `status` *(string, optional, default: `\"stable\"`)*: Lifecycle state (`draft` | `stable` | `deprecated`).\n  - `stale_after` *(string, optional)*: ISO date (`YYYY-MM-DD`).\n  - `sources` *(array of objects, optional)*: Provenance sources `[{resource, id, title, author, usage_count, last_modified}]`.\n  - `verified` *(array of objects or object, optional)*: Verification events `[{by, at}]`.\n  - `generated_by` *(string, optional)*: Actor identifier following actor convention (`\u003Cproducer>\u002F\u003Cversion>`, `human:\u003Cid>`, `process:\u003Cid>`).\n\n### 2. `memory_retrieve`\nRetrieves a specific memory by its key and namespace.\n* **Parameters:**\n  - `key` *(string, required)*: The memory key to look up.\n  - `project_root` *(string, required)*: Absolute path to the active project root directory.\n  - `namespace` *(string, optional, default: `\"default\"`)*: Scope\u002Fnamespace.\n\n### 3. `memory_search`\nFinds memories matching keywords, tags, or namespace filters.\n* **Parameters:**\n  - `project_root` *(string, required)*: Absolute path to the active project root directory.\n  - `query` *(string, optional)*: Keyword search query across keys, frontmatter, and content.\n  - `tags` *(array of strings, optional)*: Filter by specific tags.\n  - `namespace` *(string, optional)*: Scope search to a namespace.\n  - `limit` *(integer, optional, default: 10)*: Maximum number of results.\n\n### 5. `memory_get_last`\n**AGENT DIRECTIVE (Session Start):** Retrieves the last recorded session checkpoint (`system\u002Flast_memory`) so the AI agent immediately knows where work was left off when opening a project or starting a session.\n* **Parameters:**\n  - `project_root` *(string, required)*: Absolute path to active project root directory.\n  - `namespace` *(string, optional, default: `\"default\"`)*: Scope\u002Fnamespace.\n\n### 6. `memory_update_last`\n**AGENT DIRECTIVE (Milestones & Progress):** Updates the canonical session checkpoint (`system\u002Flast_memory`) whenever completing a milestone, making key changes, or pausing work.\n* **Parameters:**\n  - `content` *(string or object, required)*: Brief note or structured dictionary summarizing progress and referencing key memory files.\n  - `project_root` *(string, required)*: Absolute path to active project root directory.\n  - `namespace` *(string, optional, default: `\"default\"`)*: Scope\u002Fnamespace.\n  - `summary` *(string, optional)*: One-sentence description of the milestone achieved.\n\n---\n\n## OKF (Open Knowledge Format) Structure\n\nEvery stored memory strictly adheres to the OKF v0.2 specification ([`SPEC.md`](SPEC.md) & [`OKF_RULES.md`](OKF_RULES.md)):\n\n```markdown\n---\ntype: Agent Memory\ntitle: Coding Style\nkey: user\u002Fpreferences\u002Fcoding_style\nnamespace: default\ntags:\n- preferences\n- style\nstatus: stable\ngenerated:\n  by: mcp-memory\u002F0.2.0\n  at: '2026-08-12T19:23:35Z'\ncreated_at: '2026-08-12T19:23:35Z'\nupdated_at: '2026-08-12T19:23:35Z'\n---\n\nUser prefers functional programming style with explicit type annotations.\n```\n\n---\n\n## Quick Start\n\n### 1. Clone the Repository\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Ffellowgeek\u002Fmcp-memory\ncd mcp-memory\n```\n\n### 2. Interactive Setup Wizard\nRun `setup.py` to auto-detect and register `mcp-memory` with your AI tools:\n\n```bash\npython3 setup.py\n```\n\n> **Note:** Once `setup.py` finishes configuring your tools, your AI client will launch `mcp-memory` automatically in the background whenever needed. You do not need to manually start or keep a server process running in your terminal.\n\n### 3. Run Manually via CLI (Optional \u002F Debugging)\nIf you want to manually verify startup, inspect stdio output, or pre-initialize the virtual environment (`.venv`), you can run `run.sh` directly:\n\n```bash\n.\u002Frun.sh\n```\n\n---\n\n## Manual Client Configuration\n\nIf you prefer to configure your MCP client manually, add the `\"memory\"` server entry pointing to `run.sh`:\n\n### JSON Configuration (Antigravity, Claude Desktop, Cursor, Windsurf)\nAdd to your client's `mcp_config.json` or `claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"memory\": {\n      \"command\": \"\u002FABSOLUTE\u002FPATH\u002FTO\u002Frun.sh\"\n    }\n  }\n}\n```\n\n### TOML Configuration (Codex Desktop)\nAdd to `~\u002F.codex\u002Fconfig.toml`:\n\n```toml\n[mcp_servers.memory]\ncommand = \"\u002FABSOLUTE\u002FPATH\u002FTO\u002Frun.sh\"\n```\n\n### CLI Configuration\n\n- **Claude Code CLI:**\n  ```bash\n  claude mcp add --scope user memory -- \u002FABSOLUTE\u002FPATH\u002FTO\u002Frun.sh\n  ```\n- **Codex CLI:**\n  ```bash\n  codex mcp add memory -- \u002FABSOLUTE\u002FPATH\u002FTO\u002Frun.sh\n  ```\n\n---\n\n## Testing\n\nRun the automated test suite to verify OKF serialization, SQLite database operations, and FastMCP tool execution:\n\n```bash\npython3 test_memory.py\n```\n\n## Storage & Environment Variables\n\nBy default, `mcp-memory` creates project-isolated memory stores inside each project's root directory:\n- **OKF Markdown Files (Human-readable)**: `memory\u002F` folder in project root.\n- **SQLite Database (Hidden index)**: `.mcp_memory\u002Fmemories.db` in project root.\n\nYou can customize this behavior using environment variables:\n\n- `MCP_MEMORY_PROJECT_ROOT`: Project root directory (default: process current working directory `cwd`).\n- `MCP_MEMORY_DB_PATH`: SQLite database file path (default: `.mcp_memory\u002Fmemories.db` relative to project root).\n- `MCP_MEMORY_DIR`: Directory for Open Knowledge Format (OKF) `.md` files (default: `memory` relative to project root).\n\n> **Tip:** If you prefer a single global memory store shared across all projects, set `MCP_MEMORY_DB_PATH=~\u002F.mcp_memory\u002Fmemories.db` and `MCP_MEMORY_DIR=~\u002F.mcp_memory\u002Fmemory` in your client's MCP configuration.\n","MCP-Memory 是一个基于 Model Context Protocol（MCP）标准的轻量级 AI 代理长期记忆服务。它通过 OKF v0.2 格式持久化存储结构化记忆片段，并利用 SQLite FTS5 实现毫秒级全文检索、标签过滤与键值查询；支持命名空间隔离、磁盘同步（人类可读 Markdown 文件）与零配置接入主流 MCP 工具（如 Claude Desktop、Cursor、Antigravity 等）。适用于需跨会话保持上下文、支持可审计知识沉淀与本地化搜索的 AI 编程助手、研究型代理或企业级智能工作流场景。","2026-08-15 02:30:08","CREATED_QUERY"]