Documentation
RustGraph Quickstart & Reference
Run a self-hosted bitemporal memory vault on 1 CPU core and 128 MB RAM, then connect Cursor or Claude Code in minutes.
1. Run the Local Vault
Start RustGraph server
git clone https://github.com/vishvajeet2012/RustGraph.git cd RustGraph cargo run -p rustgraph -- serve --config config/default.toml --db rustgraph.sqlite # Graph UI: http://127.0.0.1:8080/ui
Note: config/default.toml ships with an empty token hash, so authenticated calls are refused until you set auth.token_blake3_hex.
2. Generate a Blake3 Token Hash
Token hashing CLI
printf '%s' "$TOKEN" | rustgraph hash-token
3. HTTP API & MCP Routes
| Method | Path | Purpose |
|---|---|---|
| GET | /v1/health | Returns llm_enabled (always false) and mode. No token required. |
| GET | /v1/metrics | Prometheus text metrics, including process memory. |
| GET | /ui | Embedded force-directed graph explorer. No token required to load page. |
| GET | /v1/groups | List groups accessible by the Bearer token with item counts. |
| GET | /v1/graph?group_id=&page= | Paginated nodes and edges (max 500 nodes per page). |
| POST | /v1/entities, /v1/edges, /v1/episodes | Save an entity, typed edge, or coding session episode. |
| GET | /v1/search?q=&group_id= | Keyword search over stored episodes. |
| GET | /v1/entities/{id}/timeline | All facts of one entity, optionally filtered by valid_at. |
| POST | /v1/entities/{id}/merge | Merge duplicate entities (undo via POST /v1/merges/{id}/undo). |
| GET | /v1/reviews?group_id= | Facts flagged by the contradiction check. |
| GET / POST | /v1/export, /v1/import | JSONL export and import of an entire project group. |
| DELETE | /v1/groups/{id} | Soft delete a group (requires header X-Confirm-Delete: true). |
| POST | /mcp | Model Context Protocol (JSON-RPC) endpoint with 25+ tools. |
4. Troubleshooting
| Problem | Fix |
|---|---|
| New tools do not show up in Claude Code | Start a new chat; an open chat keeps the tool list it started with. |
| "RUSTGRAPH_TOKEN is not set" | Run setup-memory.bat, then restart VS Code or Cursor. |
| Wrong project's memory at session start | Ask the AI to link this folder to the right project (memory_link_folder). |
| The rustgraph server is missing | Run python scripts/install_user.py, then restart VS Code or Cursor. |
| Graph page asks for password again | The saved token was wrong or cleared; paste it via copy-memory-password.bat. |