One in-memory graph engine for MCP agents and real-time services

Each JetGraph engine keeps the active graph in RAM. Queries do not hit disk. Snapshots persist state for restart. Production runs that full copy on two or three machines behind a gateway.

Layering

API layer
  MCP Server    :8080    /mcp & /api/mcp (14 tools, investigate prompt)
  gRPC / HTTP2  :50051   Schema · Graph · Feature · IngestStream · WatchEdgeUpserts
  REST + Cypher :8080    POST /cypher · /cypher/batch · /health · /metrics
  Bolt          :7687    Compatible drivers · openCypher subset
        ↓ async Tokio runtime
Graph engine (Rust)
  Concurrent writes · DashMap sharding · Cypher planner
        ↓
Feature engine
  Rolling histograms · 32-slot vectors · FindSimilarNodes · Fraud cases
        ↓ lock-free reads / chunked RCU writes
Storage
  Compact neighbor store (one record per src–dst pair: Full ~52 B / Slim ~32 B / Static ~16 B, TTL)
  Node histograms · 21-tick activity bitmaps · adaptive inverse index
        ↓ background snapshot task
Persistence
  Snapshot & delta checkpoints (zstd) · fast restart
        ↓ production HA
Active-active cluster
  Gateway on each host · replicated write log · full engine on every machine

Built-in MCP & standalone binary

The HTTP router mounts the Streamable HTTP MCP server at /mcp and /api/mcp directly inside jetgraph-engine, querying the local gRPC services, the Cypher planner, and the segment-evaluator config API. A standalone jetgraph-mcp binary also runs the same 14 tools over stdio or dedicated-port HTTP. See MCP Server docs.

Rust, Tokio, DashMap

The engine is a Rust binary (jetgraph-engine). Asynchronous I/O uses Tokio, hot structures use DashMap sharding, and adjacency writes use chunked RCU rows. There is no JVM garbage collector on the query path.

Compact in-memory storage

JetGraph keeps the meaning, not the event log. Edges are compact records keyed by unique (src, dst) pairs with optional state_ttl_secs eviction. Strings are dictionary-encoded, booleans are bit-packed, and rolling node histograms maintain hourly and daily rings in RAM. See Memory & compression.

zstd snapshots (not a query WAL)

Snapshots and delta checkpoints persist state through zstd compression on a configurable interval and recover by loading the latest snapshot. In production, two or three hosts each run a gateway, a member of the replicated write log, and a full engine. See Persistence and Clustering & HA.

Docker

The documented demo image runs the engine plus segment-evaluator, pattern-miner, and the Admin UI. Ports: 8080 HTTP/Cypher & MCP, 7687 Bolt, 50051 gRPC internally. Quick Start: /docs/quick-start.

What this architecture is not

  • Not a horizontally sharded Cypher cluster
  • Not a raw event-log archive or warehouse replacement
  • Not full Neo4j GDS / Fabric