Knowledge Graph
MCP server enabling persistent memory for Claude through a local knowledge graph - fork focused on local development
MCP server enabling persistent memory for Claude through a local knowledge graph - fork focused on local development
{
"mcpServers": {
"Aim-Memory-Bank": {
"command": "npx",
"args": [
"-y",
"mcp-knowledge-graph",
"--memory-path",
"/Users/yourusername/.aim"
]
}
}
}
# MCP Knowledge Graph **Persistent memory for AI models through a local knowledge graph.** Store and retrieve information across conversations using entities, relations, and observations. Works with Claude Code/Desktop and any MCP-compatible AI platform. ## Why ".aim" and "aim_" prefixes? AIM stands for **AI Memory** - the core concept of this system. The three AIM elements provide clear organization and safety: - **`.aim` directories**: Keep AI memory files organized and easily identifiable - **`aim_` tool prefixes**: Group related memory functions together in multi-tool setups - **`_aim` safety markers**: Each memory file starts with `{"type":"_aim","source":"mcp-knowledge-graph"}` to prevent accidental overwrites of unrelated JSONL files This consistent AIM naming makes it obvious which directories, tools, and files belong to the AI memory system. ## CRITICAL: Understanding `.aim` dir vs `_aim` file marker **Two different things with similar names:** - `.aim` = **Project-local directory name** (MUST be named exactly `.aim` for project detection to work) - `_aim` = **File safety marker** (appears inside JSONL files: `{"type":"_aim","source":"mcp-knowledge-graph"}`) **For project-local storage:** - Directory MUST be named `.aim` in your project root - Example: `my-project/.aim/memory.jsonl` - The system specifically looks for this exact name **For global storage (--memory-path):** - Can be ANY directory you want - Examples: `~/yourusername/.aim/`, `~/memories/`, `~/Dropbox/ai-memory/`, `~/Documents/ai-data/` - Complete flexibility - choose whatever location works for you ## Storage Logic **File Location Priority:** 1. **Project with `.aim`** - Uses `.aim/memory.jsonl` (project-local) 2. **No project/no .aim** - Uses configured global directory 3. **Contexts** - Adds suffix: `memory-work.jsonl`, `memory-personal.jsonl` **Safety System:** - Every memory file starts with `{"type":"_aim","source":"mcp-knowledge-graph"}` - System refuses to write to files without this marker - Prevents accidental overwrite of unrelated JSONL files ## Master Database Concept **The master database is your primary memory store** - used by default when no specific database is requested. It's always named `default` in listings and stored as `memory.jsonl`. - **Default Behavior**: All memory operations use the master database unless you specify a different one - **Always Available**: Exists in both project-local and global locations - **Primary Storage**: Your main knowledge graph that persists across all conversations - **Named Databases**: Optional additional databases (`work`, `personal`, `health`) for organizing specific topics ## Key Features - **Master Database**: Primary memory store used by default for all operations - **Multiple Databases**: Optional named databases for organizing memories by topic - **Project Detection**: Automatic project-local memory using `.aim` directories - **Location Override**: Force operations to use project or global storage - **Safe Operations**: Built-in protection against overwriting unrelated files - **Database Discovery**: List all available databases in both locations ## Quick Start ### Global Memory (Recommended) Add to your `claude_desktop_config.json` or `.claude.json`. Two common approaches: **Option 1: Default `.aim` directory (simple)** ```json { "mcpServers": { "Aim-Memory-Bank": { "command": "npx", "args": [ "-y", "mcp-knowledge-graph", "--memor...
连接 GitHub 仓库、Issues、Pull Requests 和代码搜索的 MCP 服务,适合代码协作和项目问答。
程序员鱼皮的 AI 资源大全 + Vibe Coding 零基础教程,分享 OpenClaw 保姆级教程、大模型玩法(DeepSeek / GPT / Gemini / Claud...
让 AI 客户端读取、搜索和管理本地文件系统,适合文档整理、代码库分析和资料检索。
连接 PostgreSQL 数据库,支持结构探索和受控查询,适合数据分析与后台排查。
通过 Puppeteer 控制浏览器,适合页面测试、截图、爬取和自动化交互。
面向 SQLite 数据库的轻量 MCP 服务,可用于本地数据查询、原型开发和小型工具分析。