Run Cypher, including bitemporal time-travel, and read a node or edge by its id.
Model Context Protocol
InvariantDB ships an MCP server, so an agent can query, search, remember and trace over the graph without an SDK. It works with any MCP client that supports remote servers, and supported tool writes preserve audit and provenance evidence under the configured engine contracts.
Point your client at the endpoint
Add one block to your MCP client’s config. A connection targets one graph: use .../graphs/{name}/mcp with the graph’s full name from the dashboard. Its tools read and write only that graph.
HTTP transport (JSON-RPC 2.0) is the usual path. Agents can connect with a delegated key (gqd_…), minted over HTTP with POST /keys/delegate; such a key may call a listed subset of tools, and any other answers DELEGATED_KEY_SCOPE.
What the agent can do
The agent can read, search, remember, write and trace over the graph. Which tools appear depends on the server’s settings and the graph’s own switches.
Full-text and vector search, access-filtered so results never leak a record the caller can’t read.
Record and replay episodes, record beliefs and walk their revision lineage.
Read where a value came from: its version history with attribution, and the sources a node was derived from.
Read the log of field reads and writes that access rules denied or redacted, export everything held about one subject, and destroy a subject’s key for erasure.
The graph’s name, a change sequence number, and the calling credential’s role and capabilities.
Limits and guards
- Read-only on request. Pass
readOnly: trueon a call, or send the headerX-InvariantDB-Read-Only: trueon the connection, and any statement or tool that would change stored state is refused withREAD_ONLY_REQUESTbefore it runs. A client can set the header in its settings, where the model cannot change it. - Concurrency cap. A per-graph cap on in-flight calls; saturation returns a retry delay to back off on.
- Approved query catalog. When enforcement is on for a graph, a query must be pre-registered; a refusal returns the query hash.
- Capability gates. The compliance tools check the caller’s capability set when enforcement is on.
- Field-level access rules apply to read paths, and a differential-privacy key is restricted to noised scalar aggregates.
- Hash-chained records. Supported tool writes are recorded in the graph’s audit log; supported authenticated write paths record the principal in the provenance log, a separate hash chain. Reads are in neither.
What stays off the tool surface
Operator-only and mutation-safety concerns don’t ride on MCP: key and API-key issuance, backup / restore / clone, graph create and rename, cluster and consensus routes, and key-encryption-key rotation all go through authenticated HTTP endpoints instead. The caller-facing erasure primitives (subject export and key destruction) are here — the receipt-signing runs inside the procedure.