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.- Sign in with HydraDB (recommended)
- API key
Here is how you can connect:Then run
- Claude Code
- Claude Desktop
- Cursor
- VS Code
- OpenCode
- Codex
- Windsurf
/mcp, choose hydradb, and click Authenticate.What you are approving
The approval screen shows the app asking to connect, what it will be able to do, and which database it will read and write. It also asks whether the app may use your other databases:- Allowed when asked (default) - the app starts in the database you picked and can switch to another one of yours when you tell it to. Choose this if you work across several databases.
- Not allowed - the app is confined to that database, and to the
collection shown under Advanced (
hydra-db-mcpunless you change it). Anything else is refused, including a request to delete a graph in another collection.
Authenticating to the remote server
There are two ways to authenticate againsthttps://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 answers401 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.Self-hosting the HTTP server
Prefer to run the remote server yourself instead of usingmcp.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.
- npm
- Docker
POST / (with /mcp supported as an alias); GET /health is an unauthenticated liveness probe.
Configuration
Environment Variables
Deprecated variable names
Deprecated variable names
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
UseHYDRADB_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 oftext 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).
- Parameters:
hydradb_graph_collections: List graph collections in a database.- Parameters:
database(string).
- Parameters:
hydradb_graph_admin: Manage graph databases and collections.- Parameters:
action(create_database,drop_collection,drop_database),database(string),collection(string).
- Parameters:
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 yourmcp.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.
