Context7
Up-to-date docs for AI agents
作者提供的说明(英文原文)
Event-sourced knowledge graph memory for AI coding agents with semantic search
这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。
我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。
选择你使用的 AI 应用,然后复制设置。
MEMORY_PATH你需要
你用的是哪个应用?
在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。
打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json
{
"mcpServers": {
"mnemograph": {
"command": "uvx",
"args": [
"mnemograph"
],
"env": {
"MEMORY_PATH": "your-value"
}
}
}
}在终端中运行这条命令
claude mcp add mnemograph --env MEMORY_PATH=your-value -- uvx mnemograph运行前请先填写空着的值。
粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json
{
"mcpServers": {
"mnemograph": {
"command": "uvx",
"args": [
"mnemograph"
],
"env": {
"MEMORY_PATH": "your-value"
}
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
粘贴到项目中的 .vscode/mcp.json
{
"servers": {
"mnemograph": {
"type": "stdio",
"command": "uvx",
"args": [
"mnemograph"
],
"env": {
"MEMORY_PATH": "your-value"
}
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。
你的选择通过 Cookie 保存在这台设备上,无需账户。
MEMORY_PATH env这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。
它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。
我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月7日
注册名称已通过 GitHub 账户 tm42 验证,该账户拥有此仓库
我们还没有从 GitHub 读取这个仓库
我们还没有从 GitHub 读取这个仓库
它在你的电脑上运行,没有互联网端点
在你的电脑上运行,改用本地设置
它在你的电脑上运行;我们只能读取互联网端点的工具列表
与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。
它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。
注册中心没有列出必需的密钥,不过有些服务器会在首次使用时要求你登录。
它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。
GitHub 仓库最后更新于–,最新版本(0.5.1)于9个月前进入注册中心。
支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Python (uv)。
同一分类中有:Context7, Codebase Memory, Exa
同一分类中其他作者的服务器,按星标数排序。
如何看卡片:★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i
Up-to-date docs for AI agents
Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.
Connect AI agents to Exa for web search, content fetching, and multi-step research.
按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。
A persistent, event-sourced knowledge graph for AI coding agents. Unlike simple key-value memory, Mnemograph captures entities, relations, and observations — enabling semantic search, tiered context retrieval, and git-based version control of your AI's memory.
Works with: Claude Code, opencode, codex CLI, Zed, Continue.dev, and any MCP-compatible agent.
AI coding sessions are ephemeral. Mnemograph gives your AI partner persistent memory that:
Before using mnemograph, decide where to store memory:
| Scope | Path | Use When |
|---|---|---|
| Project-local | ./.claude/memory | Knowledge specific to this repo (architecture, decisions, patterns) |
| Global | ~/.claude/memory | Cross-project knowledge (personal learnings, universal patterns, preferences) |
| Custom | Any path via MEMORY_PATH | Shared team memory, org-wide knowledge bases |
Important: Agents should ask the user which scope to use when first setting up mnemograph for a project. This affects where knowledge is stored and whether it's shared across projects.
# Project-local (default)
MEMORY_PATH=".claude/memory"
MEMORY_PATH="$HOME/.claude/memory"
mnemograph --global status mnemograph --global graph
Give Claude Code this repo URL and ask it to set up mnemograph:
https://github.com/tm42/mnemograph
Or point Claude to the setup instructions directly:
Read https://raw.githubusercontent.com/tm42/mnemograph/main/SETUP_CLAUDE_CODE.md and follow them
# Install from PyPI
pip install mnemograph
claude mcp add --scope user mnemograph \ -e MEMORY_PATH="$HOME/.claude/memory" \ -- uvx mnemograph
mkdir -p ~/.claude/memory
Each MCP client has a different configuration format. See UNIVERSAL_MCP_COMPATIBILITY.md for copy-paste configs for:
~/.config/opencode/opencode.json~/.codex/config.yaml~/.config/zed/settings.json~/.continue/config.jsonThe key environment variable is MEMORY_PATH — set it to where you want the knowledge graph stored.
git clone https://github.com/tm42/mnemograph.git
cd mnemograph uv sync
claude mcp add --scope user mnemograph \ -e MEMORY_PATH="$HOME/.claude/memory" \ -- uv run --directory /path/to/mnemograph mnemograph
Mnemograph exposes these tools via MCP:
Core Operations:
| Tool | Description |
|---|---|
remember | Primary storage: Store knowledge atomically (entity + observations + relations in one call) |
recall | Primary retrieval: Get relevant context with auto token management. Use focus=['Entity'] for full details. Default output is human-readable prose. |
create_entities | Create entities (auto-blocks duplicates >80% match) |
create_relations | Link entities with typed edges (implements, uses, decided_for, etc.) |
add_observations | Add facts/notes to existing entities |
read_graph | Get the full knowledge graph (warning: may be large) |
delete_entities | Remove entities (cascades to relations) |
delete_relations | Remove specific relations |
delete_observations | Remove specific observations |
Session Lifecycle:
| Tool | Description |
|---|---|
session_start | Signal session start, get initial context. Returns quick_start guide. |
session_end | Signal session end, optionally save summary |
get_primer | Get oriented with the knowledge graph (call at session start) |
Branching (Parallel Workstreams):
| Tool | Description |
|---|---|
create_branch | Create a named branch for isolated work (e.g., "feature/auth-refactor") |
switch_branch | Switch to a different branch |
list_branches | List all branches |
merge_branch | Merge a branch into main |
delete_branch | Delete a branch |
get_current_branch | Get the current branch name |
Graph Maintenance:
| Tool | Description |
|---|---|
find_similar | Find entities with similar names (duplicate detection) |
find_orphans | Find entities with no relations |
merge_entities | Merge duplicate entities (consolidates observations, redirects relations) |
get_graph_health | Assess graph quality: orphans, duplicates, overloaded entities |
suggest_relations | Suggest potential relations based on semantic similarity |
create_entities_force | Create entities bypassing duplicate check |
clear_graph | Clear all entities/relations (event-sourced, can rewind) |
Time Travel:
| Tool | Description |
|---|---|
get_state_at | View graph state at any point in history |
diff_timerange | Show what changed between two points in time |
get_entity_history | Full changelog for a specific entity |
rewind | Rewind graph to a previous state using git |
restore_state_at | Restore graph to state at timestamp (audit-preserving) |
reload | Reload graph state from disk (after git operations) |
Edge Weights:
| Tool | Description |
|---|---|
get_relation_weight | Get weight breakdown (recency, co-access, explicit) |
set_relation_importance | Set explicit importance weight (0.0-1.0) |
get_strongest_connections | Find entity's most important connections |
get_weak_relations | Find pruning candidates (low-weight relations) |
The recall tool returns context in prose format by default — human-readable text that agents can consume directly without parsing JSON:
# Default: prose format (human-readable)
recall(depth="medium", query="authentication")
#
#
recall(depth="medium", query="authentication", format="graph")
Depth levels:
shallow — Quick summary: entity counts, recent activity, gotchasmedium — Semantic search + 1-hop neighbors (~2000 tokens)deep — Multi-hop traversal from focus entities (~5000 tokens)Gotcha extraction: Observations prefixed with Gotcha:, Warning:, Note:, or Important: are automatically extracted into a dedicated section.
`mnemograph` — Unified CLI for all memory operations:
# Basic operations
mnemograph status # Show entity/relation counts, recent events mnemograph log # View event history mnemograph log --session X # Filter by session mnemograph sessions # List all sessions mnemograph export # Export graph as JSON
mnemograph vcs init # Initialize memory as git repo mnemograph vcs commit -m "msg" # Commit current state mnemograph vcs log # View commit history mnemograph vcs revert --event ID # Undo specific events (compensating events) mnemograph vcs revert --session X # Undo entire session
mnemograph graph # Open interactive graph viewer mnemograph graph --watch # Live reload mode (refresh button)
mnemograph show --at "2 days ago" # View state at a point in time mnemograph diff "1 week ago" # Show changes since then mnemograph history "EntityName" # Full changelog for an entity mnemograph rewind -n 1 # Git-based rewind by N commits mnemograph restore --to "yesterday" # Event-based restore (audit-preserving)
mnemograph health # Show graph health report (orphans, duplicates, etc.) mnemograph health --fix # Interactive cleanup mode mnemograph similar "React" # Find entities similar to "React" (duplicate check) mnemograph orphans # List entities with no relations mnemograph suggest "FastAPI" # Suggest relations for an entity mnemograph clear # Clear all entities and relations (with confirmation)
mnemograph --global status # Use global memory (~/.claude/memory) mnemograph --memory-path /path graph # Custom memory location
Running from anywhere (without activating the venv):
# Using uv (recommended)
uv run --directory /path/to/mnemograph mnemograph graph
uvx --from mnemograph mnemograph status
Graph Visualization — Interactive D3.js viewer:
--watch mode with Refresh button for real-time updates~/.mnemograph/memory/ # or ~/.claude/memory, ~/.opencode/memory, etc.
├── mnemograph.db # SQLite database (events + vectors) ├── state.json # Cached materialized state (derived) └── .git/ # Version history
Event sourcing means all changes are recorded as immutable events in SQLite. The current state is computed by replaying events. This enables:
Two-layer versioning:
mnemograph vcs revert — fine-grained, undo specific events via compensating eventsmnemograph rewind / mnemograph restore — coarse-grained, git-level or timestamp-based restoreBranches let you work on isolated knowledge without affecting the main graph. Perfect for:
# Create a branch for your feature
create_branch(name="feature/auth-refactor")
remember(name="OAuth2", entity_type="concept", observations=["Implementing OAuth2 flow"])
switch_branch(name="main")
merge_branch(source="feature/auth-refactor", target="main")
recall, search, etc. only see current branch + main| Pattern | Use Case |
|---|---|
feature/xyz | Feature-specific knowledge |
explore/xyz | Exploratory/experimental work |
project/xyz | Project-specific context |
| user/name | Pers
只显示了开头部分;其余内容请在仓库中阅读