Skip to main content

Quick Start

The fastest way in is Sign in with HydraDB: paste one URL into your AI app, approve it in the browser, done. No API key, no config file to edit.

Authenticating to the remote server

There are two ways to authenticate against https://mcp.hydradb.com, and the same URL serves both.

Sign in with HydraDB (OAuth)

Point your client at the URL with no credentials and it discovers the sign-in flow on its own: the server answers 401 with a pointer to its metadata, your client registers itself, and opens your browser. You sign in, choose a database, and approve. Your client stores a token that it refreshes silently, and you never handle a key. Disconnect any app from Settings → Connected apps. That revokes its access immediately.

API key headers

Every request carries its own credentials, so one server serves any number of independent users. Send them as headers: * Required with an API key. Not needed, and not read, with an OAuth token. A request that authenticates nobody is refused with 401, and that refusal is what starts the sign-in flow for clients that support it. A request that carries an API key but names no database is refused with 400; an OAuth token needs no database header, because the database was chosen when you approved the app.
The API key and database resolve together: a request that supplies its own key must also supply its own X-HydraDB-Database, so your key is never paired with another tenant’s data. The base URL, request timeout, and retry count are operator settings on the server and are never read from a request header.
Per-call tenant switching: Multi-tenant agents serving multiple companies from a single session can pass database and collection directly in tool arguments (e.g. hydradb_query with {"query": "...", "database": "tenant_b"}). When omitted, calls fall back to the connection’s default scope: the X-HydraDB-Database / X-HydraDB-Collection headers for an API key, or what you approved for an OAuth connection.On an OAuth connection you approved with other databases not allowed, a per-call database or collection outside that scope is refused before the request leaves the server, and hydradb_databases shows what the connection may use.

Self-hosting the HTTP server

Prefer to run the remote server yourself instead of using mcp.hydradb.com? Use the npm binary or the Docker image. Set HYDRADB_API_KEY and HYDRADB_DATABASE in the environment for a single-tenant server (clients then send no credentials), or leave them unset for a multi-tenant one where every client authenticates with its own headers.
The primary endpoint is POST / (with /mcp supported as an alias); GET /health is an unauthenticated liveness probe.
The defaults are loopback-only. When you expose the server publicly, bind 0.0.0.0 deliberately, set ALLOWED_HOSTS to your hostname, list any browser origins in ALLOWED_ORIGINS, and terminate TLS in front of it. For a shared, public server, leave HYDRADB_API_KEY unset so every caller must authenticate with their own key rather than sharing yours.

Configuration

Environment Variables

The HYDRA_DB_* spellings still work. Each one is read as a deprecated alias of its canonical name and prints a single warning to stderr naming the replacement; if both are set, the canonical name wins.See the Glossary for why tenant became database.

Collections

Use HYDRADB_COLLECTION to partition data across projects within one database:
Give each project its own HYDRADB_COLLECTION to keep memory isolated, or point several projects at the same value to share context between them. Unset, the server writes to and reads from hydra-db-mcp.

Available Tools

Tool names follow the canonical HydraDB vocabulary - one verb per action, with the same scope names the rest of the product uses. See the Glossary.

hydradb_query

hydradb_ingest

Provide exactly one of text or turns. Passing both is rejected.

hydradb_list

hydradb_inspect

hydradb_delete

hydradb_status

hydradb_databases

Available on connections made with Sign in with HydraDB. Takes no parameters. Lists the databases this connection can address and marks the one it uses by default, so an agent working across several databases can find their names without asking you. If you approved the app with other databases not allowed, the list has one entry and any other name is refused.

Graph tools (BYOG openCypher)

HydraDB MCP also exposes property graph tools for querying and writing domain graphs in openCypher:
  • hydradb_graph_query: Run Cypher reads and writes (CREATE, MERGE, MATCH, traversals).
    • Parameters: query (string, required), params (object), database (string), collection (string), max_rows (number).
  • hydradb_graph_collections: List graph collections in a database.
    • Parameters: database (string).
  • hydradb_graph_admin: Manage graph databases and collections.
    • Parameters: action (create_database, drop_collection, drop_database), database (string), collection (string).
hydradb_delete is irreversible.
A knowledge source cannot be deleted while it is still being indexed - the server refuses with “Source is still processing; retry deletion after ingestion completes”, and the tool passes that back rather than reporting a deletion that did not happen. Retry once ingestion finishes. This applies to freshly ingested sources only; a source is listable and inspectable before it is deletable.

Deprecated tool names

Tool names live in your mcp.json, so none were removed. Every earlier name is still registered and still works; each is marked deprecated in its description so your agent prefers the canonical one. Use the canonical names in new integrations.

How It Works

At recall time, hydradb_query queries HydraDB and returns graph-enriched context - entity paths, chunk relations, and linked extra context - injected directly into the model’s prompt. At capture time, hydradb_ingest sends content with infer: true, triggering HydraDB’s knowledge graph extraction pipeline automatically. The same tool takes a document (text) or a conversation (turns), and groups related writes under source_id.

Source & Show Support

If this HydraDB MCP server makes your agentic memory workflow faster (and smarter), please star the open-source repo that powers it.

hydradb-mcp

Star on GitHub if you found it useful.