
Memograph
io.github.Indhar01由 GitHub 账号 Indhar01 发布v0.4.0更新于 Oct 27, 2026
Graph-based memory system for LLMs with knowledge graphs and semantic search.
概览
把 markdown 笔记文件夹变成可查询的知识图谱,让助手能搜索、读取、关联并更新笔记,作为长期记忆。
- 可以做什么
- 以关键词、语义与图谱混合检索记忆,并生成适合提示词的上下文窗口
- 创建、导入、读取、列出、更新和删除记忆库中的记忆
- 关联记忆并遍历 wikilink 图谱,包括查找笔记之间的路径
- 查看记忆库统计与分析信息
- 通过自动保存钩子把对话上下文写入记忆库
- 批量创建记忆并配置自主模式
- 适用场景
- 适合希望助手跨对话记住决策与上下文,或需要按语义而非精确措辞检索大量个人或团队笔记的场景。对已用 markdown 文件记录笔记、并希望在本机建立索引的用户最合适。
- 运行要求
- 以 stdio 方式在本机运行,来自 PyPI 包 memograph(可用 uvx 或 pip install)。必须设置 MEMOGRAPH_VAULT 指向记忆库目录,目录不存在时会自动创建。可选的 MEMOGRAPH_PROVIDER 与 MEMOGRAPH_MODEL 用于选择生成 AI 回答的模型;仅在启用相应提供商或扩展时才需要 ANTHROPIC_API_KEY、OPENAI_API_KEY 或本地 Ollama 服务(OLLAMA_HOST)。
安装
在 SourceWeft 中
- 打开 控制台中的 Memograph,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
MemoGraph 🧠
[PyPI version] [Python Version] [License] [MCP Registry] [MCP] [Code style: ruff] [pre-commit] [Type checked: mypy] [Tests] [Code Quality]
MemoGraph turns a folder of markdown notes into a queryable, AI-ready knowledge graph. It solves the LLM memory problem — your AI assistants forget last Tuesday's decision, can't find a related note across two projects, and re-derive the same insight again and again — by giving them a persistent, navigable, attribution-friendly memory layer that lives in plain markdown files you control.
You write notes the way you already do. MemoGraph indexes them, builds a graph from [[wikilinks]], ranks them by salience, and serves them back to your LLM (or your team) on demand.
⚡ Try it in 60 seconds
That's it. The quickstart command drops a small, interconnected sample vault on your disk (15 notes about Python development, with real wikilinks between them), ingests it, and runs three live demo queries so you can see the graph + hybrid retrieval working before you decide whether to commit. Try this query in particular:
The vault contains a note titled FastAPI dependencies (about Depends(...)) — the words "dependency" and "injection" never appear in any note's title. MemoGraph still finds it, because hybrid retrieval understands "dependency injection" semantically and the wikilink graph stitches related notes together. That's the product, demonstrated in one query.
Re-run memograph quickstart --force any time to reset to a fresh demo. When you're ready, point MemoGraph at your real notes: memograph --vault ~/your-notes ingest.
What you get
As a solo user / knowledge worker
- A vault of human-readable markdown files — nothing proprietary, no lock-in. Your notes outlive any tool.
- Hybrid retrieval that combines keyword search, semantic similarity, and graph traversal so you find the right note even when you don't remember the exact words.
- AI-assisted tagging, link suggestions, and gap detection that grow your knowledge base instead of letting it rot.
- A CLI and a web UI for browsing, editing, and visualizing the graph.
As an AI agent / IDE user
- A first-class Model Context Protocol (MCP) server with 30+ tools, working out of the box with Claude Desktop, Claude Code, Cursor, Cline, Windsurf, Continue, Zed, VS Code, Goose, Gemini CLI, OpenAI Codex CLI, and others.
- Autonomous "auto-save" hooks that capture decisions and context from your AI conversations into the vault automatically.
- Per-conversation memory recall — your assistant can pull "what did we decide last week about X" without you copy-pasting context every time.
As an enterprise / SaaS operator
- Multi-tenant deployment with filesystem-level isolation per tenant, end-to-end isolation tests, and a warm-LRU kernel cache.
- OIDC + API-key authentication with JWKS support (Auth0, Clerk, WorkOS, Keycloak, Azure AD, Okta), restrictive CORS, request-size caps, and rate limiting.
- GDPR-compliant scheduled deletion: tombstone-with-grace-period flow, automatic final backups, daily reaper, and an audit log of every deletion.
- Observability built in: OpenTelemetry traces + Prometheus
/metrics, structured JSON logging with request IDs, and a separate/healthz//readyzfor orchestration. - Operations runbooks shipped with the code: install, SSO setup, RBAC, backup-restore, and GDPR procedures.
How consumers benefit
✨ Capabilities at a glance
Core memory engine
- Graph-based memory — bidirectional
[[wikilinks]]build a navigable knowledge graph automatically. - Hybrid retrieval — keyword + semantic embeddings + graph traversal, combined and re-ranked.
- Memory types inspired by cognitive science: episodic, semantic, procedural, fact.
- Salience scoring (0–1) that decays over time and boosts on access.
- Smart indexing — mtime-cached, only re-parses changed files.
- Context compression — token-budget-aware windowing for LLM prompts.
- Markdown-native vault — every memory is a
.mdfile with YAML frontmatter; no proprietary format.
AI features
- Smart Auto-Organization Engine — extract topics, people, action items, decisions, questions, sentiment, risks, ideas, and timeline events from memories.
- AutoTagger — suggest tags via semantic analysis, structure detection, and pattern learning.
- LinkSuggester — propose
[[wikilinks]]to related notes; bidirectional opportunities included. - GapDetector — surface missing topics, weak coverage, isolated notes, and unmade links.
- Knowledge analysis — vault stats, topic clustering, learning paths, connection analysis.
Interfaces
- Python API —
MemoryKernelwith sync, async, and batch variants. - CLI — 24+ commands for ingest, search, batch ops, import, export, backup, and AI features.
- MCP server — 30+ tools, stdio transport, drop-in for any MCP-compatible client.
- Web UI — React + D3 graph visualization, search, and editing (FastAPI backend + Vite frontend).
- HTTP API — versioned
/api/v1/, OpenAPI snapshot in CI, ready for service-to-service integration.
Enterprise & SaaS readiness
- Multi-tenancy with filesystem-isolated tenants, an LRU registry of warm kernels, per-tenant audit logs, and end-to-end isolation tests gating release.
- Authentication via OIDC (JWKS) or hashed API keys; per-route auth scope; identity bound into the audit log.
- Web hardening — restrictive CORS, slowapi rate limiting, request-size caps, structured JSON logging with request IDs, info-leak-free 500 handler.
- Storage hardening — path-traversal-safe vault writes, vault size soft/hard caps, schema-versioned cache files.
- Scheduled deletion for GDPR Art. 17: tombstone with configurable grace period, automatic final backup, daily reaper script, cancel-before-grace endpoint.
- Observability — OpenTelemetry FastAPI/asyncio auto-instrumentation, Prometheus
/metrics, OTLP export. - Reliability — concurrency audit, stress tests for concurrent writes, versioned backup format with integrity checks.
- Distribution — pinned-and-locked dependencies, Docker compose for self-host, security workflow (
bandit+pip-audit).
See docs/INSTALL_ENTERPRISE.md, docs/SSO_SETUP.md, docs/GDPR_RUNBOOK.md, docs/BACKUP_RESTORE_RUNBOOK.md, docs/OBSERVABILITY_GUIDE.md, and docs/RBAC_GUIDE.md for the operator-facing details.
🚀 Quick Start
Hosting it yourself? docs/HOSTING_GUIDE.md covers four genuinely-free paths — Oracle Free Tier, Cloudflare Tunnel + your hardware (recommended for most), GCP always-free stitch, and GitHub-repo-as-vault. Workspace identity via OIDC and Drive-as-portability-backup are documented in docs/GOOGLE_WORKSPACE_SETUP.md.
Installation
Install with optional dependencies:
Python Usage
🔌 MCP Server (Model Context Protocol)
MemoGraph includes a full-featured MCP server for seamless integration with AI assistants like Cline and Claude Desktop.
📖 New to MemoGraph MCP? See the MCP User Guide for practical usage instructions and examples!
🚨 Having connection issues? See Setup & Troubleshooting Guide - Common fixes for "cannot connect" errors!
19 Available Tools
Supported Clients
MemoGraph's MCP server is a stdio server — it runs alongside any MCP-compatible agentic CLI or editor. The full setup cookbook (config-file paths, format quirks, verification steps) lives in docs/MCP_CLIENTS.md:
Launching the MCP server
After pip install memograph (or uv tool install memograph), three launch commands are all equivalent:
memograph-mcp and memograph are both registered as console scripts: the first starts the MCP server, the second is the CLI. They do not collide.
Read-only mode
For shared deployments or untrusted clients, set MEMOGRAPH_READONLY=true. The server refuses every vault-writing tool — create_memory, import_document, update_memory, delete_memory, relate_memories, bulk_create, batch_update, batch_delete, import_backup_tool, and the auto-save hooks — and returns a structured {"success": false, "readonly": true, "error": "..."} payload instead. Read tools (search_vault, query_with_context, list_memories, get_memory, analytics, graph traversal) stay fully functional.
Quick Setup for Claude Desktop
Add to your claude_desktop_config.json:
If the memograph-mcp binary isn't on the client's PATH (common when the client launches without your shell environment), use the explicit module form instead:
Quick Setup for Cline
Add to your ~/.cline/mcp_settings.json:
For Claude Code, Cursor, Windsurf, Continue, Zed, VS Code, Goose, Gemini CLI, Codex CLI, LM Studio, Cherry Studio, and Bob Shell, see docs/MCP_CLIENTS.md.
Install from MCP Registry
NEW: MemoGraph is now available in the official MCP Registry! 🎉
Registry URL: https://github.com/modelcontextprotocol/servers/tree/main/src/memograph
Then drop the snippet for your client into its config file (see the table above or docs/MCP_CLIENTS.md).
Benefits of MCP Registry Listing:
- ✅ Official registry backed by Anthropic, GitHub, and Microsoft
- ✅ Discoverable by all MCP-compatible clients
- ✅ Verified server card and metadata
- ✅ Direct link from PyPI package
- ✅ Trusted by the MCP community
Note: The registry uses the PyPI package version. When you pip install memograph, you automatically get the latest registry-listed version.
See MCP_REGISTRY_GUIDE.md for complete submission and configuration guide.
Usage Examples
Once configured, use natural language with your AI assistant:
See CONFIG_REFERENCE.md for complete MCP configuration guide.
Using Auto-Save Hooks
MemoGraph provides autonomous hooks to save conversations automatically:
- ⚠️ Important: Hooks are passive tools - see Autonomous Hooks Guide for setup
- 📝 Quick fix: Add custom instructions to Claude Desktop (instructions in guide)
- 🔧 Configure with
MEMOGRAPH_AUTONOMOUS_MODE=true
Read the full Autonomous Hooks User Guide →
🎯 CLI Usage
MemoGraph comes with a powerful CLI for managing your vault and chatting with it.
Ingest
Index your markdown files into the graph database:
Force re-indexing all files:
Remember
Quickly add a memory from the command line:
Context Window
Generate context for a query:
Ask (Interactive Chat)
Start an interactive chat session with your vault context:
Or ask a single question:
Diagnostics
Check your environment and connection to LLM providers:
Batch Operations
Efficiently manage multiple memories at once:
Data Management
Export, backup, and restore your vault:
Configuration & Statistics
Manage settings and view vault analytics:
MCP Setup
Interactive wizard to configure MCP server for Claude Desktop or Cline:
📖 Complete CLI Documentation: See CLI Usage Guide for detailed documentation with 200+ examples covering all 24 commands.
🤖 AI Features
MemoGraph includes powerful AI-powered features to enhance your knowledge management workflow. See AI Features Guide for complete documentation.
🏷️ AutoTagger - Intelligent Tag Suggestions
Automatically suggest relevant tags using semantic analysis, content structure, and existing patterns:
Features: Frequency-based extraction • Semantic similarity • Structure detection • Pattern learning • Confidence scoring
🔗 LinkSuggester - Smart Wikilink Recommendations
Intelligently recommend wikilinks to related notes using semantic similarity and graph analysis:
Features: Semantic search • Keyword matching • Graph-based suggestions • Bidirectional detection • Target previews
🔍 GapDetector - Knowledge Base Analysis
Identify missing topics, weak coverage, and isolated notes in your vault:
Gap Types: Missing Topics • Weak Coverage • Isolated Notes • Missing Links
📊 Knowledge Analysis - Comprehensive Insights
Get comprehensive analysis of your entire knowledge base:
Analysis Includes: Vault statistics • Topic clustering • Learning paths • Gap detection • Connection analysis
Python API for AI Features
📖 Complete Documentation:
- AI Features Guide - Comprehensive guide with examples
- Web UI Guide - Using AI features in the browser
- MCP AI Tools Guide - AI features for Claude & Cline
💡 Use Cases: Auto-organize notes • Discover connections • Identify gaps • Maintain consistency • Build learning paths
📖 Core Concepts
Memory Types
MemoGraph supports different types of memories inspired by cognitive science:
- Episodic: Personal experiences and events (e.g., meeting notes)
- Semantic: Facts and general knowledge (e.g., documentation)
- Procedural: How-to knowledge and processes (e.g., tutorials)
- Fact: Discrete factual information (e.g., configuration values)
Graph Traversal
The library uses BFS (Breadth-First Search) to traverse your knowledge graph:
Salience Scoring
Each memory has a salience score (0.0-1.0) that represents its importance:
🏗️ Project Structure
🤝 Contributing
We welcome contributions! Please see our Contributing Guide for details.
Development Setup
-
Clone the repository:
-
Install in development mode:
-
Install pre-commit hooks:
-
Run tests:
Code Quality
We maintain high code quality standards:
- Linting: Ruff for fast Python linting
- Formatting: Ruff formatter for consistent code style
- Type Checking: MyPy for static type analysis
- Testing: Pytest with comprehensive test coverage
- Pre-commit Hooks: Automated checks before each commit
📚 Documentation
Getting Started
- Hosting Guide - 💸 Free hosting options (Oracle Free Tier, Cloudflare Tunnel, GCP, GitHub-vault) with hardening checklist
- Google Workspace Setup - 🔐 OIDC identity + Drive portability backup
- MCP Clients Guide - 🔌 Setup snippets for 15+ agentic CLIs/editors (Claude Code, Cursor, Windsurf, Continue, Zed, VS Code, Goose, Gemini CLI, Codex CLI, LM Studio, …)
- MCP User Guide - ⭐ Start here! Complete guide for using MemoGraph MCP
- Setup & Troubleshooting - 🚨 Can't connect? Step-by-step fixes for connection issues
- MCP Testing Guide - Testing your MCP server after setup
For Developers & Contributors
- MCP Registry Guide - Publishing to official MCP Registry
- Versioning Strategy - Semantic versioning and release planning
- AGENTS.md - Guide for AI agents working with this codebase
- Contributing Guide - How to contribute to the project
- Code of Conduct - Community guidelines
- Security Policy - Security reporting and best practices
- Changelog - Version history and changes
🔒 Security
See our Security Policy for reporting vulnerabilities.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🌟 Acknowledgments
Inspired by the need for better memory management in LLM applications. Built with:
- Graph-based knowledge representation
- Hybrid retrieval strategies
- Cognitive science principles
📬 Contact & Support
- Issues: GitHub Issues
- Discussions: GitHub Discussions
📣 Community & Feedback
We value community feedback and contributions! Here's how to get involved:
Report Issues
Found a bug or have a feature request? Open an issue on GitHub.
Discussions
Join the conversation in GitHub Discussions:
- Ask questions
- Share use cases
- Suggest improvements
- Show what you've built
Contributing
We welcome contributions! See our Contributing Guide for details on:
- Code contributions
- Documentation improvements
- Bug reports and feature requests
- Community support
Stay Updated
- ⭐ Star the repository on GitHub
- 👁️ Watch for updates and releases
- 📦 Follow the project on PyPI
- 🔗 Check out the MCP Registry listing
🚦 Status
Current version: 0.3.0
Single-tenant deployments are stable and recommended for production use. Multi-tenant deployments are feature-complete with end-to-end isolation tests gating the release; the public API will stabilise at v1.0.
- ✅ Core functionality stable and tested (172+ tests across security, contract, and tenancy suites)
- ✅ Whole-package type-checked with MyPy
- ✅ Ruff lint + format + pre-commit hooks
- ✅ OpenAPI v1 contract snapshot in CI
- ✅ Multi-tenant isolation invariants verified by an e2e test suite
- ⚠️ Public API may change in minor versions until v1.0.0
What landed recently
- Phase 3.7 — GDPR-compliant scheduled tenant deletion: tombstone-with-grace-period, daily reaper, automatic final backups.
- Phase 3.5 —
TenantRegistrywired into the request path; non-admin routes resolve their kernel per-tenant. - Phase 3 scaffold — multi-tenancy ADR,
TenantStorage,TenantRegistry, admin routes for tenant lifecycle. - Phase 2 — OpenTelemetry + Prometheus, structured JSON logging, concurrency audit, stress tests.
- Phase 1 — OIDC + API-key auth, slowapi rate limiting, restrictive CORS, request-size caps, vault size caps, schema-versioned caches, OpenAPI v1 contract, security test suite.
- Phase 0 — path-traversal-safe vault writes, info-leak-free error handlers, pinned dependencies, Docker compose, security CI workflow.
- 📦 Published to the official MCP Registry (io.github.indhar01/memograph)
Made with ❤️ for better LLM memory management
来源:README.md,提交 453f407
工具
0版本历史
1- v0.4.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分