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/、バイナリ重み、キャッシュブロブに対する厳格な無視リスト。
🛠️ 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 を参照してください。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Your memory, everywhere AI goes. Build knowledge once, access it via MCP anywhere.
Package intelligence MCP for AI agents — 22 tools, 19 ecosystems, AGPL SDK, free.
Analytical memory for AI agents: a real Postgres queried in plain English over MCP. One command.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Luiguard/mcp-sqlite-graph-memory'
If you have feedback or need assistance with the MCP directory API, please join our Discord server