
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 分