Quick Start
The fastest way in is Sign in with HydraDB: add one URL to your AI app and approve it in the browser. No API key needed.- Sign in with HydraDB (recommended)
- API key
- 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. 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 Connected apps in Settings. Its access ends within
30 seconds, once the server’s cached token check expires.
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
API uses your workspace’s own collection. To keep the old shared behavior, set
it to hydra-db-mcp.Available Tools
See the Glossary for database and collection terminology.hydradb_query
Filtering by document title
Usetitles when you know document names but not their source IDs. The titles are
resolved to source IDs first, then the normal semantic or keyword query runs inside
those sources.
- Exact, complete titles:
last-usagedoes not matchlast-usage.csv. - Case-insensitive:
q3 roadmap.mdmatchesQ3 Roadmap.md. - Several titles are ORed: Surrounding whitespace is trimmed; punctuation such as commas is part of the title.
- No match returns an empty result rather than widening to the whole corpus.
Because matching ignores case, two documents whose names differ only by case
(
Report.md and report.md) are treated as the same title and both are returned.hydradb_ingest
Provide exactly one oftext or turns. Passing both is rejected.
hydradb_list
hydradb_inspect
hydradb_delete
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.
hydradb_list_collections
hydradb_delete_collection
Permanently removes one collection and every memory, knowledge source, and graph node inside it. The parent database is left intact.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:
Deprecated tool names
The olderhydra_db_* tool names are off by default. Set
HYDRADB_MCP_LEGACY_TOOLS=1 on the server to register them again; each is marked
deprecated so your agent prefers the canonical name. Use the canonical names in
new integrations.
Source code
hydradb-mcp
View the source on GitHub.
