mcp-sqlite-graph-memory
mcp-sqlite-graph-memory
AIコーディングアシスタントと自律エージェント向けに、動的なSQLiteベースのコード知識グラフメモリを提供するユニバーサルModel Context Protocol(MCP)サーバー。
アクティブなワークスペースを自動検出し、複数言語のASTと構造的依存関係を解析して分離されたローカルSQLite知識グラフに格納し、シンボルの検査、最短の呼び出し/インポートパスの計算、コードトポロジーのナビゲーションのための高精度なMCPツールを公開します。
🌟 主な機能
ランタイム依存関係ゼロ: 完全にPython標準ライブラリ(
ast、sqlite3、json、re、hashlib、threading)で記述。動的マルチワークスペース分離: ワークスペースルートごとに決定論的SHA-256ハッシュを生成し、分離されたSQLiteデータベースを
~/.mcp-graph-memory/storage/graph_<hash>.dbに保存。インクリメンタルstatキャッシュ: ファイルの
mtimeとsizeを検証し、再インデックス時に変更のないファイルをサブミリ秒でスキップ。多言語AST&構造パーサー:
Python: クラス、メソッド、関数、非同期関数、デコレータ、インポート(
from x import y、import z)、継承階層、呼び出し箇所。TypeScript / JavaScript: クラス、インターフェース、型、関数、アロー関数、ES6インポート/エクスポート、CommonJS
require()。Go: パッケージ、インポート、構造体、インターフェース、関数、メソッド。
Rust: モジュール、構造体、列挙型、トレイト、
implブロック、fnシグネチャ。C / C++ / Java / PHP / Ruby / Kotlin / Swift / Shell: 構造体、クラス、定義。
フリーズ&CPU枯渇保護:
ノンブロッキングな非同期デーモン初期化。
非ビジーなstdioトランスポート(
for raw_line in sys.stdin:)。node_modules/、.git/、.venv/、バイナリ重み、キャッシュブロブに対する厳格な無視リスト。
Related MCP server: Synapse
🛠️ MCPツール仕様
ツール | パラメータ | 説明 |
|
| ワークスペースのグラフメモリをインクリメンタルまたは強制的にスキャンして更新します。 |
|
| 正確なファイルパス、行範囲、シグネチャ、および関連情報を持つシンボルを検索します。 |
|
| 2つのファイルまたはシンボル間の最短の依存関係/インポート/呼び出しパスを計算します。 |
|
| 直接の呼び出し元、呼び出し先、インポート、および包含エッジを検査します。 |
|
| アーキテクチャメトリクス、ハブモジュール、ディレクトリツリーを返します。 |
|
| パスパターン、拡張子、または含まれるシンボルによってワークスペースのファイルを検索します。 |
🚀 インストール
git clone https://github.com/Luiguard/mcp-sqlite-graph-memory.git ~/.mcp-graph-memory
chmod +x ~/.mcp-graph-memory/server.py🔌 統合ガイド
1. Google Antigravity統合
オプションA: グローバル設定(推奨)
graph-memory を、~/.gemini/config/mcp_config.json にあるグローバルなAntigravity MCP設定ファイルに追加します:
{
"mcpServers": {
"graph-memory": {
"command": "python3",
"args": [
"/home/YOUR_USER/.mcp-graph-memory/server.py"
]
}
}
}(/home/YOUR_USER を実際の $HOME ディレクトリパスに置き換えるか、絶対パスを使用してください)。
オプションB: ワークスペースレベル設定
プロジェクトごとの有効化には、ワークスペースルート内の .agents/mcp_config.json に mcp_config.json を配置します:
{
"mcpServers": {
"graph-memory": {
"command": "python3",
"args": [
"${workspaceFolder}/.mcp-graph-memory/server.py"
]
}
}
}2. Claude Desktop統合
Claude設定ファイルを探します:
Linux:
~/.config/Claude/claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
サーバー定義を追加します:
{
"mcpServers": {
"graph-memory": {
"command": "python3",
"args": [
"/path/to/mcp-sqlite-graph-memory/server.py"
]
}
}
}3. Cursor / VSCode / Windsurf統合
.cursor/mcp.json または .vscode/mcp.json に:
{
"mcpServers": {
"graph-memory": {
"command": "python3",
"args": [
"/path/to/mcp-sqlite-graph-memory/server.py"
]
}
}
}🔧 環境変数
変数 | デフォルト | 説明 |
|
| SQLiteデータベース( |
|
| クライアントが |
🧪 検証とテスト
自動統合テストスイートを実行します:
python3 test_server.py📄 ライセンス
MITライセンス - Copyright (c) 2026 Benjamin Leimer。詳細は LICENSE を参照してください。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted code graph over MCP: exact callers, dependencies, and cross-repo blast radius for AI agents.
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
Shared context for your codebase: a hosted code knowledge graph over MCP. Free plan, OAuth sign-up.
GitHub Copilot MCP: code, repo, PR, workflow tools for AI assistants.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides AI assistants with a structured, token-efficient map of a codebase's symbols, dependencies, and relationships via MCP tools like overview, query, and impact analysis.9MIT
- FlicenseNot gradedqualityDmaintenanceProvides structural code intelligence via 26 MCP tools, enabling AI assistants to query code symbols, dependencies, and call graphs accurately without file-pasting.-
- AlicenseNot gradedqualityDmaintenanceEnables AI coding agents to query a local, continuously updated symbol graph of a codebase, providing ranked search, caller/callee exploration, dependency paths, and git-diff impact analysis through MCP tools.9 npmApache 2.0
- AlicenseNot gradedqualityBmaintenanceProvides AI agents with a local queryable graph of source code and Markdown, enabling symbol search, caller and dependency tracing, impact analysis, and task-focused context through MCP tools.12MIT