面向本地的 AI 助手代码智能化。将您的代码库转换为 AI 可以查询、导航和记忆的知识图谱。25 个 MCP 工具。
Your codebase has a shape. Now your AI can see it. And remember it.
GraphMind turns your codebase into a knowledge graph your AI can query, navigate, and remember. Ask about dead code, dependencies, or blast radius — and get answers grounded in your actual architecture.
Up to 5,700× fewer tokens than raw search (~10M tokens saved per session). Works with Claude Code, Cursor, Windsurf, Cline, Zed, Continue, and any MCP-compatible AI assistant.
CLI + Claude MCP integration Desktop app — Mac & Windows
Every new AI session starts from zero. Your assistant re-reads the entire codebase, re-discovers architecture, and forgets every decision you explained last time. Across multiple projects, there's zero visibility into shared dependencies.
graphmind fixes this with four layers:
Everything runs locally. No cloud. No open ports by default. No telemetry.
Comparison of token usage: grep -r (raw file search) vs graphmind search for the same query on a ~100k LOC codebase. graphmind returns ranked, structured results in under 300 tokens vs 1.5M+ for raw grep output.
Download the .dmg from Releases. The app installs the CLI for you and runs a guided onboarding that configures MCP, hooks, skill, and embeddings — no terminal needed.
| Platform | Asset |
|---|---|
| macOS (Apple Silicon) | GraphMind-macos-arm64.dmg |
| macOS (Intel) | GraphMind-macos-x64.dmg |
Linux / Windows: CLI only — use the shell script or direct download below.
curl -fsSL https://raw.githubusercontent.com/aouicher/graphmind/main/scripts/install.sh | bashThen run graphmind setup once to configure Claude Code, hooks, and skill.
brew install aouicher/graphmind/graphmind # CLI
brew install --cask aouicher/graphmind/graphmind # Desktop app (macOS only)curl -fsSL https://github.com/aouicher/graphmind/releases/latest/download/graphmind-cli-linux-x64 -o ~/.local/bin/graphmind
chmod +x ~/.local/bin/graphmindgit clone https://github.com/aouicher/graphmind
cd graphmind
cargo build --release -p graphmind-cli
cp target/release/graphmind ~/.local/bin/graphmind setup # once — configures Claude Code, Claude Desktop, hooks, skill
cd ~/projects/myapp
graphmind init # per project — registers, installs git hooks, builds graphThat's it. Claude Code, Claude Desktop, Cursor, and VS Code will use graphmind automatically.
graphmind setup (once, global)Configures your machine so all AI tools can use graphmind:
~/.zshenv, ~/.zshrc, ~/.bashrc)/gm + 19 sub-skills)~/Library/Application Support/Claude/claude_desktop_config.json)~/.claude/settings.json)~/.config/opencode/opencode.jsonc)~/.cursor/mcp.json) — available in all Cursor projects~/.claude/CLAUDE.md)graphmind init (per project)Registers and indexes a project, then writes MCP config for editors that support project-level config:
~/.claude.json under projects..mcpServers (local scope)/.vscode/mcp.jsoncd ~/projects/api && graphmind init
cd ~/projects/web && graphmind init
cd ~/projects/lib && graphmind initBoth commands are idempotent — safe to re-run.
Click to expand
claude mcp add graphmind -- graphmind mcpOr manually in ~/.claude/settings.json:
{
"mcpServers": {
"graphmind": {
"command": "/home/user/.graphmind/bin/graphmind",
"args": ["mcp"],
"env": { "PATH": "/home/user/.graphmind/bin:/usr/local/bin:/usr/bin:/bin" }
}
}
}graphmind init writes this automatically to ~/.claude.json:
{
"projects": {
"/absolute/path/to/project": {
"mcpServers": {
"graphmind": {
"type": "stdio",
"command": "/home/user/.graphmind/bin/graphmind",
"args": ["mcp"],
"env": { "PATH": "/home/user/.graphmind/bin:/usr/local/bin:/usr/bin:/bin" }
}
}
}
}
}Claude Desktop does not inherit your shell PATH. Use the full path:
{
"mcpServers": {
"graphmind": {
"command": "/opt/homebrew/bin/graphmind",
"args": ["mcp"],
"env": { "PATH": "/opt/homebrew/bin:/usr/local/bin:/usr/bin:/bin" }
}
}
}Config file location:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.jsonTip: Run
which graphmindto find the correct path on your system.
graphmind setup writes this automatically to ~/.cursor/mcp.json:
{
"mcpServers": {
"graphmind": {
"command": "/home/user/.graphmind/bin/graphmind",
"args": ["mcp"],
"env": { "PATH": "/home/user/.graphmind/bin:/usr/local/bin:/usr/bin:/bin" }
}
}
}graphmind init writes this automatically to /.vscode/mcp.json:
{
"servers": {
"graphmind": {
"type": "stdio",
"command": "/home/user/.graphmind/bin/graphmind",
"args": ["mcp"],
"env": { "PATH": "/home/user/.graphmind/bin:/usr/local/bin:/usr/bin:/bin" }
}
}
}graphmind install hook-claudeRegisters hooks in ~/.claude/settings.json for:
graphmind search, provides graph results for Grep/Glob/LS toolsBuilt-in intelligence:
grep -c, pipes to wc/sort and lets them throughgraphmind install skillgraphmind sync # updates CLAUDE.md in current project
graphmind sync --all # updates CLAUDE.md for all registered projectsgraphmind install hook-git…graphmind search combines three retrieval strategies into a single ranked result:
graphmind search "" # hybrid search (FTS + semantic + graph)
graphmind search "; " # multi-query with RRF ranking
graphmind search "" --kind functionpayment_service)Results are fused via Reciprocal Rank Fusion (RRF, k=60). Each result shows its source: [FTS], [SEM], [GRAPH], or combinations like [FTS+SEM+G].
Configured in ~/.graphmind/config.json:
{
"embedding": {
"mode": "voyage",
"model": "voyage-code-3",
"api_keys": {
"voyage": "pa-..."
}
}
}| Mode | Model (default) | Notes |
|---|---|---|
local |
nomic-embed-text-v1.5 (768d) |
ONNX, no API key needed |
openai |
text-embedding-3-small (1536d) |
Supports custom openai_base_url |
voyage |
voyage-code-3 (1024d) |
Code-specialized, recommended |
disabled |
— | No embeddings — default for new installs |
Embeddings are computed automatically during graphmind build when a provider is configured. If the model changes, the embedding index is rebuilt automatically.
OpenAI-compatible providers (Azure, proxies) can set a custom base URL:
{
"embedding": {
"mode": "openai",
"model": "text-embedding-3-large",
"openai_base_url": "https://your-proxy.example.com/v1",
"api_keys": { "openai": "sk-..." }
}
}graphmind gives Claude persistent memory across sessions — not just code, but decisions, patterns, conventions, and context.
Memory is fully automatic:
This works for both Claude Code (via hooks) and Claude Desktop (via MCP instructions).
| Type | Examples |
|---|---|
decision |
Architecture choices, tech decisions, trade-off resolutions |
pattern |
Recurring approaches, solutions, code patterns |
convention |
Naming rules, workflow conventions, style guides |
bug |
Known issues, workarounds, gotchas |
context |
Business context, project goals, user preferences |
Memories are stored as JSONL files in ~/.graphmind/memory/:
global.jsonl — cross-project knowledge (user preferences, team conventions).jsonl — project-specific factsgraphmind memory add "" [--project ] [--global]
graphmind memory search ""
graphmind memory list
graphmind memory delete Memories persist indefinitely until explicitly deleted. They are recalled automatically — you never need to ask "do you remember X?".
graphmind setup # global one-time (hooks, MCP, skill)
graphmind init [path] # per-project (register, git hooks, build)
graphmind init --skip-build # per-project without buildinggraphmind register [path] # register current dir
graphmind unregister # remove project
graphmind list # all projects
graphmind status # health checkgraphmind build [slug] # incremental build
graphmind build --all # all projects
graphmind build --full # force full rebuild
graphmind build --watch # watch mode (debounced 2s)
graphmind clean [slug] # remove graph cache (forces full rebuild)
graphmind clean --all # clean all projects…graphmind search "" # hybrid FTS + semantic + graph
graphmind search "; " # multi-query
graphmind search "" --kind class
graphmind search "" --offset 10 # paginate results
graphmind search "" --include-content # include source code in outp暂无开放 Issues,或尚未同步最近议题。