InvariantDB in 5 minutes
Three paths, depending on what you’re holding: an AI agent, an app, or a terminal. Each one ends with data in a graph and its history readable.
01 · AI agent via MCP
InvariantDB ships a Model Context Protocol server. Add one block to your MCP client’s config and your agent gets tools for Cypher, search, agent memory, provenance and history — the set on offer depends on the server’s settings and the graph’s own switches.
Works with any MCP client that supports remote servers (HTTP POST, JSON-RPC 2.0). The URL ends in your graph’s full name from the dashboard (like a1b2c3_my-graph). Create an API key in your InvariantDB workspace; the secret is shown once. Then ask your agent a question like “employees whose role changed in the last 90 days, with when it was recorded versus when it took effect” and it runs the temporal query for you.
02 · Python or Node SDK
Two clients over the same HTTP API. The module is invariantdb in both languages. The clients aren’t on PyPI or the public npm registry — install from a pinned, hash-checked URL.
The Node client mirrors the same surface. Full reference — search, vector, bulk import, capability tokens, streaming reads — is on the SDK page.
03 · curl against the HTTP API
Two requests, end to end: write a node and read it back with its property history. Create the graph in the dashboard first and copy its full name. An Idempotency-Key makes a write safe to resend; format=flat returns plain JSON values instead of tagged ones.
validFrom, validTo and txnAt are nanoseconds since the Unix epoch. The full HTTP surface is in the OpenAPI spec, rendered interactively at /docs/.
By what you’re building
| If you’re building… | Read |
|---|---|
| An AI agent that remembers | Agent memory |
| A tamper-evident audit trail | Provenance & audit |
| Erasure you can prove on request | Cryptographic erasure |
| Grounded retrieval over your data | Knowledge |
| The full capability list | Features |
Common responses
| Response | What it means |
|---|---|
401 Unauthorized | Missing or wrong Authorization: Bearer gq_… header. Check the key’s prefix and that it hasn’t been revoked. |
403 Forbidden | The key authenticated, but its role doesn’t permit the operation — mint a key with the right role. |
404 Not Found | The graph doesn’t exist yet, or the name is wrong. Create graphs in the dashboard and use the full name shown there. |
429 Too Many Requests | Per-key rate limit. Raise the key’s rateLimits or back off. |
| Cypher parse error | InvariantDB targets openCypher; the covered surface is in the Cypher reference. |