Hydra DB MCP Server
Summary: This server exposes HydraDB's core memory/knowledge tools for searching, ingesting, listing, inspecting, and deleting stored context, with deprecated aliases for older memory operations.
Search stored memories/knowledge with fast or thinking recall, optional max results and graph context.
Ingest plain text/markdown notes or conversation turns, with optional title, source ID, user name, inference, and markdown flags.
List memories or knowledge sources, optionally filtered by source IDs.
Fetch a source's full content by ID as text, a presigned URL, or both.
Delete a memory or knowledge source by ID irreversibly.
Legacy aliases mirror search, store, conversation ingest, list memories/sources, fetch content, and delete memory; per README they are deprecated and off by default unless HYDRADB_MCP_LEGACY_TOOLS=1.
This schema covers only core memory/knowledge operations; it does not expose the README's database management, connector, or Cypher graph tools.
Allows querying and managing knowledge ingested from Confluence sources, including filtering by Confluence page IDs and parent pages.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Hydra DB MCP Server search my memories for key learnings"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Hydra DB — MCP Server
MCP (Model Context Protocol) server for Hydra DB, the state-of-the-art agentic memory. Provides tools for storing, recalling, and managing memories with knowledge-graph enriched context.
Run it two ways, same tools either way:
Local (stdio) — the
npx @hydradb/mcpbinary each client spawns. No server to operate; credentials live in the client's config. This is the default and everything below the Configuration section documents it.Remote (HTTP) — one hosted process behind a URL like
https://mcp.hydradb.comthat many clients point at, with nothing to install. See Remote / hosted server.
Available Tools
Tool | What it does |
| Search memories and knowledge together, with knowledge-graph context |
| Save a note, a document, or a conversation |
| Merge metadata or replace the access list of one existing item |
| Enumerate what is stored — memories, knowledge sources, or both in one page |
| Fetch one source's full content by id |
| Remove one or more items by id, irreversibly |
| Check whether an ingested source has finished indexing |
| Everything connected to one item — its thread, replies, parents, children, links |
| The knowledge-graph relations of one item or a whole collection, page by page |
| Report whether a query's results were useful, by its |
| List databases this connection can address |
| Create a database with an optional metadata schema and embedding dimension |
| Delete a database irreversibly |
| Check whether database provisioning finished |
| Read database-wide knowledge and memory row counts |
| Read the metadata fields declared for a database |
| Add fields to a database metadata schema (additive only) |
| List collections inside a database |
| Delete one collection irreversibly |
Ids flow between these: hydradb_query, hydradb_list and hydradb_subgraph emit them;
hydradb_inspect, hydradb_update, hydradb_delete, hydradb_status, hydradb_subgraph and hydradb_relations accept them.
Connector tools
Tool | What it does |
| List the connector providers HydraDB supports |
| Read one provider's setup guide and credential field schema |
| List connected sources, optionally with health |
| Read one connector's configuration and lifecycle |
| Explain connector and resource sync health in plain words |
| Return a secure dashboard link for connecting a provider |
| Return a secure dashboard link for replacing a connector's credentials |
| Update noncredential connector settings |
| Permanently delete a connector |
| Start a connector sync |
| Pause connector syncing |
| Resume connector syncing |
| Discover resources available upstream in a connected provider account |
| List resources already added to a connector |
| Add one or more discovered resources and start syncing them |
| Replace one resource's ACL or instructions |
| Permanently remove one resource from a connector |
The names follow the connector section of CONTRACT.md: noun first, verb last, the same
words the CLI (hydradb connector resource add) and the plugin
(/hydradb:connector-resource-add) use.
Connector tools are on by default. Set HYDRADB_MCP_CONNECTOR_TOOLS=0 to
withhold the whole family. A confined OAuth connection sees only connectors
assigned to an allowed database and collection. Connectors with no destination stay
hidden, and every by-ID read checks the connector before reading status,
discovery, or resources. Resource listings also check each resource's
database_override and collection_override, then inherit the connector destination.
Connector endpoints cannot enforce database or collection grants atomically with a mutation. Write tools therefore fail closed for every database- or collection-confined OAuth connection and send no connector API request. Use an organization-wide connection for connector mutations. Connector deletion, connector settings, resource add, resource updates, and resource deletion are marked destructive; resource add is also non-idempotent because it can start time-relative work. Sync, pause, and resume are non-destructive writes. Resource add updates the submitted resources; unlisted resources remain unchanged.
The provider-detail tool returns credential schema metadata, not credential
values. Do not paste provider credentials into chat or any MCP tool argument.
Defaults, examples, constants, and unknown schema extensions are removed before
the schema reaches model context. hydradb_connector_connect accepts only a
provider and returns /connectors?connect=<provider>. hydradb_connector_reconnect
authorizes the connector and returns /connectors?open=<connector_id>; open the
drawer and select Reconnect.
Both flows set completed: false because the dashboard, not MCP, performs the
credential-bearing request. HYDRADB_OAUTH_ISSUER selects the dashboard origin
for both completion links and defaults to https://app.hydradb.com.
Graph tools (Cypher)
Hydra DB also runs property graphs you model and own end to end, queried in Cypher. This is a different product surface from the memory and knowledge above, and nothing crosses between them: hydradb_query cannot see graph data, and hydradb_graph_query cannot see memories.
Tool | What it does |
| Run Cypher — reads and writes |
| List the graphs in a graph database |
| Create a graph database; drop a collection or a database |
hydradb_graph_query is annotated destructiveHint, because it runs arbitrary Cypher and DELETE is as reachable through it as MATCH. There is deliberately no separate read-only Cypher tool and no read-only mode: both would mean classifying Cypher text client-side to decide what to refuse, which is a heuristic — a promise the server can keep and a client cannot. This server does not inspect your query at all; it sends it and reports what HydraDB says. To lock the graph surface down, withhold the tools (below) — that is a real guarantee.
// Everyone Alice knows within four hops
{"query": "MATCH (a:Person {name:$n})-[:KNOWS*1..4]->(r) RETURN DISTINCT r.name AS name",
"params": {"n": "Alice"}}
// Bulk load, re-runnable after a failure
{"query": "UNWIND $rows AS row MERGE (p:Person {ext_id: row.ext_id}) SET p += row",
"params": {"rows": [{"ext_id": "a", "name": "Alice"}]}}Differences from Neo4j worth knowing before you write Cypher. Each is rejected before execution, so a rejected query changes nothing and fails identically on retry:
Procedure calls (
CALL db.*,CALL apoc.*) are rejected by the server, before it executes anything.CALL { ... }subqueries are fine. There is no schema tool and noapoc.meta.schema(); to learn a collection's structure, query it —MATCH (n) UNWIND labels(n) AS l RETURN l, count(*) AS c ORDER BY l.LOAD CSVis rejected — pass data throughparamsinstead.Existence checks are bare pattern predicates (
WHERE (p)-[:KNOWS]->());EXISTS { ... }andexists()are not accepted.shortestPathbelongs inRETURN/WITH, notMATCH p = ..., and must be directed.EXPLAIN/PROFILEexecute the query rather than planning it — do not use them to preview one.
Collections auto-create on first write, so there is no create-collection call. Requests are capped at 256 KiB (enforced locally, before upload) and large result sets are truncated server-side — paginate with ORDER BY ... SKIP $offset LIMIT $limit.
To turn the graph tools off entirely:
HYDRADB_MCP_GRAPH_TOOLS=0 # withhold all threeDeprecated aliases
The previous hydra_db_* tool names are no longer registered by default as
of 1.2.0. If your mcp.json still calls them, set:
HYDRADB_MCP_LEGACY_TOOLS=1Deprecated alias | Use instead |
|
|
|
|
|
|
|
|
|
|
Database tools
Database tools are available over stdio, API-key HTTP, and OAuth HTTP connections.
hydradb_databases marks the connection default. On a confined OAuth connection,
it returns only approved databases, and every database tool refuses other names
before sending an API request. A connection limited to specific collections cannot
create or delete a whole database or change its database-wide metadata schema.
Tool | Required input | Notes |
| None | Lists accessible databases and marks the default |
|
| Optional |
|
| Destructive. Refuses the connection default |
| None | Optional |
| None | Optional |
| None | Optional |
|
| Optional |
Metadata fields use name and data_type. Supported types are BOOL, INT8,
INT16, INT32, INT64, FLOAT, DOUBLE, VARCHAR, and JSON. Optional
settings are max_length, enable_match, enable_dense_embedding, and
enable_sparse_embedding.
After hydradb_database_create accepts a request, call
hydradb_database_readiness until the database is ready. A 403 from a write
tool can indicate missing write permission. Read-only credentials cannot perform
database writes; verify the credential's permissions or reconnect with write
permission.
To turn the database management tools off entirely:
HYDRADB_MCP_DATABASE_TOOLS=0 # withhold the six database management toolshydradb_databases, hydradb_list_collections and hydradb_delete_collection
stay registered.
hydradb_query
Searches both memories and ingested knowledge sources. Returns matching chunks with their source id, a relevance score, and knowledge-graph context.
Parameter | Type | Required | Description |
| string | Yes | What you want to know, as a question or topic |
| string | No |
|
| number | No | Maximum chunks to return (1-50, default: 10) |
| string | No |
|
| string | No |
|
| boolean | No | Also return |
| boolean | No | Include knowledge-graph relations (default: true) |
| string | No |
|
| array | No | Restrict the search to these sources |
| array | No | Restrict to exact document titles (case-insensitive); resolved to source IDs before normal search |
| object | No | Exact-match filters over stored metadata |
| number | No | Adjacent chunks to attach per match (0-5, default: 0) |
| number | No | Favour recently-updated sources when ranking, 0-1 (default: 0). Re-ranks only; it never excludes older sources |
| boolean | No | App-aware retrieval over connector sources — exact IDs and actors, thread reconstruction, linked and parent/child items (on by default: Hydra DB applies it when omitted; pass |
| array | No | Search several collections at once. Pass either this or |
| string | No | Background text prepended to the query to steer retrieval; not searched for itself |
| number or | No | Hybrid balance, 0 (keyword) to 1 (vector), or |
| string | No |
|
| boolean | No | In thinking mode, also follow relations declared at ingest and return their chunks |
| boolean | No | Resolve time-based questions using dated facts (Hydra DB default: true) |
| string | No |
|
Results are text only by default: each chunk carries its source id and
collection, and the header names the resolved scope. With structured: true,
results also include structured resolved_scope and per-source inspect_args when
the source's collection is known. Copy those arguments, including your ACL, to follow-up calls;
tools never inherit a previous call's scope. With multiple collections, an ID
alone is not enough: use the collection attached to that source. If it is missing,
resolve the collection before inspecting. Explicit scope is never widened.
hydradb_ingest
Saves information so it outlives the session. Provide exactly one of text,
turns, items, app_knowledge, or file. A batch contains 1 to 100 same-kind
items and sends one API request. Batch text has an 8 MiB total UTF-8 limit.
Parameter | Type | Required | Description |
| string | No* | A note, fact, decision, or document body |
| array | No* | Conversation turns, each with |
| array | No* | Batch of 1 to 100 items; each item has exactly one of |
| array | No* | Batch of 1 to 100 structured app records with |
| object | No* | A PDF, Word, PowerPoint, spreadsheet, image or text file, ingested as knowledge. See below |
| string | No |
|
| string | No | Label shown in later search results — always set it |
| string | No | Identifier for this entry. Reusing one REPLACES what is stored under it |
| boolean | No | Allow that replacement (default: true) |
| boolean | No | Extract insights and graph entities (default: true) |
| boolean | No | Chunk on markdown structure (default: false) |
| object | No | Key/value metadata, matchable later via |
| object | No | Free-form fields stored with the item; supported on memory and knowledge |
| string | No | Memory extraction guidance, up to 4000 characters; replaces the MCP default and requires inference |
| object | No | Caller-supplied |
| string | No | When the fact was true, as |
| string | No | What to call the user, used with |
* Combining any input modes is an error. Each single item or items entry requires
exactly one of text or turns. Knowledge items require text.
Use plain text with kind: "knowledge" for an unstructured document. Use
app_knowledge for structured email, message, ticket, knowledge_base,
comment, meeting, or custom records. Each app record supports id, title,
description, url, timestamp, provider, external_id, fields, metadata,
additional_metadata, attachments, relations, and acl.
An omitted app-record acl makes the item unrestricted. Send ["__private__"]
for private ingest or ["__public__"] for public ingest. An empty list is refused.
Re-ingesting an existing id without acl removes its previous access list. If
__public__ appears with other principals, the item is public and HydraDB drops the
other principals.
Files. file takes filename (with its real extension) and one of the two
below. The document's title is title when set, otherwise the filename.
content_base64: the file's bytes as base64, up to 8 MB. Works on every transport, and is the only way on the hosted server, which cannot read your disk.path: an absolute path to a file on your machine, up to 50 MB (the API's own limit). Local (stdio) server only: the bytes go straight to Hydra DB instead of through the conversation. The hosted server refuses it.
A larger file, or a format Hydra DB cannot read (.heic, .html, .zip, ...),
is refused before anything is uploaded. source_id sets the document's id and
overwrite applies as usual; infer, metadata and the other memory options
do not apply to files.
To keep a file above the inline limit whole, use the local path option or
send multipart POST /context/ingest directly.
Ingestion is asynchronous — content is not searchable the instant it is
saved. Use hydradb_status to confirm.
Schemas for uploaded tables (preview). On an enabled organization, supply
record_type on the same ingest call as the file. For example:
{
"database": "finance",
"collection": "statements",
"file": { "filename": "october.csv", "content_base64": "..." },
"record_type": {
"name": "bank_transaction",
"fields": {
"date": { "type": "date", "required": true, "date_order": "DMY" },
"description": "string",
"debit": "decimal",
"credit": "decimal"
}
}
}Replace the placeholder with the file's base64 bytes. Use decimal for exact
fixed-point amounts, with up to nine fractional digits. Subsequent uploads in
that database can send "record_type": "bank_transaction". After indexing,
call hydradb_inspect with the returned ID to see the inferred column mapping
and rejected rows. For a PDF, table_extraction reports partial or unverified
coverage. A table query over such rows carries the same warning. Use
structured: true on hydradb_query to return table records and citations
as JSON.
hydradb_update
Edits one existing item without re-ingesting it. Copy id from
hydradb_query, hydradb_list, or hydradb_inspect; never guess an id.
Parameter | Type | Required | Description |
| string | Yes | Existing context id to edit |
| object | No* | Keys to merge into schema-controlled database metadata |
| object | No* | Free-form keys to merge into additional metadata |
| array or null | No* | Complete replacement ACL. |
* Provide at least one of database_metadata, additional_metadata, or acl.
Metadata maps merge only the supplied keys. ACL updates replace the complete
list, so include every principal that must retain access. The edit is
idempotent. Retry the identical request if Hydra DB reports a partial commit or
search-index synchronization failure.
hydradb_list
Enumerates memories, knowledge sources, or both together (kind: "all"). These
are separate corpora: listing memories tells you nothing about which knowledge
sources exist.
Parameter | Type | Required | Description |
| string | Yes |
|
| array | No | Restrict to these ids |
| array | No | Deprecated alias for |
| string | No | Exact originating-system ID, such as a Confluence page ID or Drive file ID; knowledge only |
| string | No | Exact provider parent ID; returns indexed direct children only. Requires |
| string | No | Exact originating connector instance from stored |
| string | No | Exact original URL stored at ingestion; knowledge only, not a live web fetch |
| string | No | Connector provider, such as |
| number | No | Page to return, 1-indexed (default: 1) |
| number | No | Items per page (1-100) |
| object | No | Exact-match filter on each item's |
| object | No | Exact-match filter on each item's |
| array | No | Return only these fields per row (plus id): |
| boolean | No | Nest comments and replies under the item they belong to (default false). Knowledge and |
The response reports how many of the total it showed and how to reach the rest.
For a known document link, resolve its provider ID or exact stored URL first,
then use the returned HydraDB source ID with hydradb_inspect or
hydradb_query.source_ids:
{
"name": "hydradb_list",
"arguments": {
"kind": "knowledge",
"external_id": "123456",
"provider": "confluence",
"database": "your_database",
"collection": "your_collection"
}
}Supplied selectors are combined with AND and preserve the caller's permissions.
URL matching does not normalize links, follow redirects or fetch external pages.
Multiple sites or copies may match an ID; inspect the candidates and pagination.
No visible match in a scope is not proof a document was never ingested. For a
document known only by name, use hydradb_query.titles or ordinary search instead.
These selectors are rejected for kind: "memory", never silently ignored.
To enumerate indexed children, resolve the parent first, then use parent_external_id
with its provider ID, provider, connector_id, and the same database, collection
and ACL. Provider IDs can repeat across sites/accounts; never guess a connector ID.
Missing connector metadata needs investigation before safely enumerating children.
Follow next_args while
has_more is true. Returned identity fields (external_id, provider,
parent_external_id, connector_id) are included when stored. For descendants, use
each child's children_args, track visited identities, and inspect each
document separately. This is not a live provider tree: absent/stale parent metadata,
permissions or incomplete ingestion can omit children. hydradb_subgraph includes
other relationships and bounded traversal; it is not an exhaustive child listing.
hydradb_inspect
Fetches one source's full content by id.
Parameter | Type | Required | Description |
| string | Yes | The source id, from |
| string | No | Deprecated alias for |
| string | No |
|
| number | No | Character offset to read from (default: 0) |
| number | No | Maximum characters to return (max 20000) |
| number | No | How long a |
Long sources come back in slices, and binary sources are never inlined — you get
their type and size, and mode: "url" returns a download link.
Text and structured output expose the same bounded slice. Follow next_args until
has_more is false, keeping the same scope and ACL. Offsets count UTF-16 code units;
a 125,000-character source needs seven default-size calls, not three. complete
means the current response contains the whole text. Each slice re-fetches current
content; compare content_sha256 and restart if it changes. There is no pinned
snapshot across calls. Reading a document index does not read every linked document.
hydradb_feedback
Records whether a query's results were actually useful. Correlated to that query
by its request_id, which hydradb_query prints at the end of its output — copy
it verbatim, it cannot be guessed or reconstructed.
Parameter | Type | Required | Description |
| string | Yes | The id |
| string | No | What was wrong, missing or good, in plain words (max 8000) |
| string | No |
|
| string | No | The answer a correct system would have given |
| string[] | No | Sources that actually contain the answer (max 100) |
| object | No | Your own string labels, e.g. an eval run name (max 20) |
| string | No | Scope overrides |
Send text, ground truth, or both — a submission with neither records nothing and
is refused. Ground truth is worth far more than prose because it is
machine-checkable: source_ids turns one submission into a retrieval judgement
(did the query surface these, at what rank, at all?), which is recall measured on
real traffic rather than on a benchmark that stops resembling production the day
it is written.
Feedback never changes the result of the query it describes and never alters
stored data. Rows are labelled source: agent, because everything reaching this
server came from a model — agent feedback is a different population from human
feedback and is separated at write time.
hydradb_relations
Returns the knowledge-graph relations Hydra DB extracted from stored content —
(entity) —predicate→ (entity) triplets, each with the passage that evidences
it — for one item, or for the whole collection when id is omitted
(GET /context/relations).
Parameter | Type | Required | Description |
| string | No | The item to read, from |
| string | No |
|
| number | No | Relations per call (default 50, max 200) |
| number | No | The |
| array | No | Principals to answer as; only relations from sources they may see are returned |
| string | No | Scope overrides |
structuredContent carries each relation as {from, from_type, predicate, to, to_type, evidence, chunk_id}, plus has_more, next_cursor and ready-made
next_args for the next page.
hydradb_subgraph
Returns the connected subgraph of one item: every item reachable from it through item-level links — explicit relations declared at ingest, a shared thread, parent/child hierarchy — traversed breadth-first. Use it when one result is not enough and you need what surrounds it: the rest of a Slack thread, the replies under a ticket, the documents a page links to.
Parameter | Type | Required | Description |
| string | Yes | The item to start from, from |
| string | No |
|
| number | No | Hops to traverse (default 5, max 10) |
| number | No | Cap on members returned (default 200, max 1000) |
| string | No | Scope overrides |
Each member carries its id, title, depth from the start item and how it was
reached — discovered_relation is the mechanism (same_thread, parent,
child, or a relates_to type such as reply_to) and discovered_via the id
of the member it was reached from, so the list is also a tree.
structuredContent carries those same members, in the same order, plus
relations: the edges among them as {from, to, type}, so a client can rebuild
the graph and not just the list. truncated means max_sources clipped the
traversal; structural_link_count and structural_truncated report the
structural graph (entities, comments, attachments, actors) around the members.
Chunk-level entity relations are not included; those come from hydradb_query.
hydradb_delete
Removes items by id. Irreversible.
Parameter | Type | Required | Description |
| array | No* | The ids to delete — accepts several at once |
| string | No* | A single id |
| string | No |
|
* Provide one of them.
hydradb_status
Checks whether ingested sources have finished indexing.
Parameter | Type | Required | Description |
| array | Yes | The source ids to check |
Related MCP server: MCP-Mem0
Configuration
Get Your Credentials
Get your Hydra DB API Key from Hydra DB
Get your database name from the Hydra DB dashboard
Environment Variables
Variable | Description | Default |
| Your Hydra DB API key | Required |
| Your Hydra DB database (tenant scope) | Required |
| Collection (sub-tenant) for partitioning | none — unset means the workspace's own collection; the model can also name one per call via |
| Base URL override |
|
| Log level: DEBUG, INFO, WARN, ERROR |
|
| Deadline for a whole tool call, every attempt and retry wait included |
|
| Retries per request, inside that deadline (0 disables) |
|
| Register the deprecated | off |
| Default graph database for the Cypher tools |
|
| Default graph collection |
|
| Register the graph tools ( | on |
| Register the connector tools ( | on |
| Authorization server and connector-completion dashboard origin |
|
| Register the database management tools ( | on |
Timeouts, retries and cancellation
One deadline (HYDRADB_TIMEOUT_SECONDS, default 45s) covers a whole tool call,
so with the defaults a call ends before the 60s most MCP hosts wait. When the
deadline passes, the error names it and lists every attempt.
Reads are retried after
429,408,5xxand dropped connections.Writes that are not safe to repeat (ingest, Cypher, feedback, creating or deleting a database or collection) are retried only when the failure shows Hydra DB did not act on them (
429,408, connection refused). After a5xx, a dropped connection or the deadline, the error says the outcome is unknown: check before sending it again.Retry-After(seconds or HTTP date) sets the wait. If the wait would end past the deadline, the call fails at once with Hydra DB's answer.Cancelling a tool call stops the request in flight and starts no new attempt, on stdio and on the hosted HTTP server.
A graph database is a different namespace from the memory database: the same
name can exist as both, and Cypher aimed at the wrong one reads an empty graph
rather than failing. Every graph tool also takes database and collection
per call, overriding these defaults.
The legacy HYDRA_DB_* names — HYDRA_DB_API_KEY, HYDRA_DB_TENANT_ID,
HYDRA_DB_SUB_TENANT_ID, HYDRA_DB_BASE_URL, HYDRA_DB_LOG_LEVEL — remain
honoured as deprecated aliases (canonical wins when both are set; using an
alias prints a one-time warning naming its replacement).
Claude Desktop
{
"mcpServers": {
"hydradb": {
"command": "npx",
"args": ["-y", "@hydradb/mcp@latest"],
"env": {
"HYDRADB_API_KEY": "your-api-key",
"HYDRADB_DATABASE": "your-database"
}
}
}
}Cursor & Windsurf
Client | Config File |
Cursor |
|
Windsurf |
|
{
"mcpServers": {
"hydradb": {
"command": "npx",
"args": ["-y", "@hydradb/mcp@latest"],
"env": {
"HYDRADB_API_KEY": "your-api-key",
"HYDRADB_DATABASE": "your-database"
}
}
}
}VS Code
Add to .vscode/mcp.json:
{
"servers": {
"hydradb": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@hydradb/mcp@latest"],
"env": {
"HYDRADB_API_KEY": "your-api-key",
"HYDRADB_DATABASE": "your-database"
}
}
}
}Custom Sub-Tenant
To partition data, set the HYDRADB_COLLECTION environment variable:
{
"mcpServers": {
"hydradb": {
"command": "npx",
"args": ["-y", "@hydradb/mcp@latest"],
"env": {
"HYDRADB_API_KEY": "your-api-key",
"HYDRADB_DATABASE": "your-database",
"HYDRADB_COLLECTION": "my-project"
}
}
}
}Remote / hosted server
Everything above spawns the server locally over stdio. The same server also runs
as a long-lived HTTP endpoint that many clients reach at one URL — nothing to
install or update per user. This is what powers a hosted deployment like
https://mcp.hydradb.com, and what you run yourself with npm run start:http
or the Docker image.
The tool surface is identical; only how a client connects and authenticates changes.
Point a client at a URL
MCP clients that support a remote (streamable-http) server take a URL and
headers instead of a command:
{
"mcpServers": {
"hydradb": {
"url": "https://mcp.hydradb.com",
"headers": {
"Authorization": "Bearer YOUR_HYDRADB_API_KEY",
"X-HydraDB-Database": "your-database"
}
}
}
}Every request carries its own credentials, so one hosted process serves any number of independent users. The headers a request may send:
Header | Maps to | Required |
| Hydra DB API key ( | Yes* |
| Default database (tenant scope) | Yes* |
| Default collection (sub-tenant); unset means the workspace's own collection | No |
| Default graph database for the Cypher tools; defaults to the request's database | No |
| Default graph collection; defaults to | No |
* Unless the server was started with HYDRADB_API_KEY / HYDRADB_DATABASE in
its environment (single-tenant self-host, below), in which case a request may
omit them and fall back to the server's own credentials. A request that supplies
neither a header nor a server-side default is refused: 401 with no key, 400
with a key but no database.
Every tool additionally accepts optional database and collection parameters
directly in its arguments (e.g. hydradb_query with {"query": "...", "database": "tenant_b"}),
allowing multi-tenant agents to switch tenant scope per tool call while falling
back to the session defaults when omitted.
Base URL, request timeout and retry count are
operator settings read from the server's environment and are never taken
from a request header.
Run the HTTP server
Node:
npm ci && npm run build
# Single-tenant: the server holds one account; clients send no credentials.
HYDRADB_API_KEY=your-key HYDRADB_DATABASE=your-database npm run start:http
# Multi-tenant: no account in the env; every client sends its own headers.
BIND_ADDRESS=0.0.0.0 ALLOWED_HOSTS=mcp.hydradb.com npm run start:httpDocker:
docker build -t hydradb-mcp .
# Single-tenant
docker run -p 8080:8080 -e HYDRADB_API_KEY=your-key -e HYDRADB_DATABASE=your-database hydradb-mcp
# Multi-tenant (clients authenticate per request)
docker run -p 8080:8080 -e ALLOWED_HOSTS=mcp.hydradb.com hydradb-mcpThe primary MCP endpoint is / (with /mcp supported as an alias); GET /health is an unauthenticated liveness probe.
The image binds 0.0.0.0 inside the container (the host controls exposure with
-p) and runs as an unprivileged user.
Sign in with HydraDB (OAuth)
With three extra variables the hosted server also speaks the MCP authorization flow: a client that arrives with no credentials gets a 401 pointing at protected-resource metadata, discovers the HydraDB dashboard as its authorization server, opens the browser, and the user signs in and picks a database. No key is ever pasted into a client.
Set all three OAuth variables to enable the flow:
HYDRADB_OAUTH_ISSUER=https://app.hydradb.example \
HYDRADB_MCP_PUBLIC_URL=https://company.internal/hydra/mcp \
HYDRADB_OAUTH_INTROSPECTION_SECRET=replace-me \
ALLOWED_HOSTS=company.internal \
npm run start:httpHYDRADB_MCP_PUBLIC_URL is the exact public MCP endpoint and OAuth resource.
The server keeps / and /mcp, and also serves the configured pathname. It
supports a reverse proxy that preserves /hydra/mcp, strips /hydra and sends
/mcp, or strips the complete prefix and sends /.
The 401 challenge advertises metadata under the same public proxy prefix:
https://company.internal/hydra/mcp/.well-known/oauth-protected-resourceThe server also serves the RFC 9728 section 3.1 path-inserted form for clients that construct it themselves:
https://company.internal/.well-known/oauth-protected-resource/hydra/mcpRoute both public metadata URLs to this server. A proxy that forwards only
/hydra cannot deliver the origin-root RFC URL without an explicit route. All
metadata aliases return resource: "https://company.internal/hydra/mcp".
Token audience checks remain unchanged, including tolerance for a trailing
slash on an otherwise equal audience.
The process fails before listening when a complete HYDRADB_MCP_PUBLIC_URL
contains an unsupported layout, such as credentials, a query string, a
fragment, a backslash, dot path segments, or percent-encoded path characters. The error names
HYDRADB_MCP_PUBLIC_URL and the reason. Partial OAuth configuration keeps the
existing behavior: the server warns and leaves OAuth disabled.
Variable | Description |
| Authorization server and connector-completion dashboard origin, e.g. |
| This server's public URL as clients see it, e.g. |
| Shared secret the issuer's |
All three are required together. With any of them missing, OAuth stays off and the server behaves exactly as before: no new routes, no new headers. Token introspection answers are memoised for up to 30 seconds, so disconnecting an app from the dashboard takes effect within that window.
OAuth is purely additive. API keys in Authorization / X-HydraDB-Api-Key headers, the X-HydraDB-Database header and the single-tenant environment fallback all keep working unchanged on the same URL.
Server environment variables
These configure the HTTP process itself (the stdio server ignores them). All
the HYDRADB_* variables from Environment Variables
also apply — as the single-tenant default and as operator settings.
Variable | Description | Default |
| Port to listen on |
|
| Interface to bind ( |
|
| Extra | (loopback only) |
| CORS origins for browser clients (comma-separated; | (none) |
| Express | off |
Security
The defaults are safe for local use and must be widened deliberately for a public deployment — see SECURITY.md:
Bind loopback by default.
BIND_ADDRESSstays127.0.0.1until you set otherwise;0.0.0.0exposes the server on every interface and logs a warning.Host allowlist. Requests whose
Hostis not loopback or inALLOWED_HOSTSget421 Misdirected Request— a DNS-rebinding defence. Add your public hostname when binding publicly.CORS is closed by default. No cross-origin browser request is accepted until you list its origin in
ALLOWED_ORIGINS. Non-browser clients (noOriginheader) are unaffected.Terminate TLS in front. Run the server behind a reverse proxy / load balancer that handles HTTPS; do not expose plain HTTP to the internet.
How It Works
The server talks to Hydra DB through the generated @hydradb/sdk
(pinned exactly), behind a thin hand-owned wrapper in src/hydra. The wrapper
owns scope injection, envelope unwrapping and error translation; the tools call
it and render the results.
hydradb_query retrieves relevant memories and returns graph-enriched context (entity paths, chunk relations, extra context). Supports
fastandthinkingrecall modes.hydradb_ingest stores a note (
text), conversation (turns), file such as a PDF or DOCX (file), structured app records (app_knowledge), or a batch of up to 100 items. It supports caller extraction instructions, additional metadata, and a caller-supplied graph.hydradb_list browses stored memories (
kind: memory) or ingested knowledge sources (kind: knowledge, with an optionalsource_idsfilter).hydradb_inspect retrieves the original ingested content of a source, with mode options (
content,url, orboth).hydradb_delete removes a memory or knowledge source by ID.
Development
npm ci
npm run build
HYDRADB_API_KEY=your-key HYDRADB_DATABASE=your-database npm startFor development with auto-reload:
HYDRADB_API_KEY=your-key HYDRADB_DATABASE=your-database npm run devTo run the HTTP transport locally (see Remote / hosted server):
HYDRADB_API_KEY=your-key HYDRADB_DATABASE=your-database npm run dev:http
# then: curl localhost:8080/healthTesting
# unit + conformance tests (wrapper driven against a mocked SDK transport)
npm test
# just the shared conformance vectors
npm run test:conformance
# live integration test against Hydra DB (drives the wrapper end to end)
RUN_LIVE_TESTS=true HYDRADB_API_KEY=your-key HYDRADB_DATABASE=your-database npm run test:integrationTroubleshooting
API Key Issues: Ensure
HYDRADB_API_KEYis set correctlyConnection Errors: Check your internet connection and API key validity
Tool Not Found: Make sure the package is installed and the command path is correct
Debug Logging: Set
HYDRADB_LOG_LEVEL=DEBUGfor verbose output
Contributing / Developer Setup
Get up and running quickly with the bootstrap script:
git clone https://github.com/usecortex/hydradb-mcp.git
cd hydradb-mcp
make bootstrapThis will install dependencies, build the project, and create a .env file from .env.example. Edit .env with your HydraDB credentials, then:
make dev # Start MCP server in dev mode (auto-reload)
make test # Run unit tests
make test-all # Run unit + integration tests
make check-types # Type-check without emittingRun make help to see all available targets.
Available Tools
12 toolshydradb_deleteDelete from Hydra DBB
Delete a memory or knowledge source from Hydra DB by its ID. Use kind to select which family the ID belongs to. This action is irreversible.
Inputs: id (required), kind.
hydra_db_delete_memoryDelete Memory (deprecated)A
DEPRECATED — use hydradb_delete instead. Delete a specific user memory from Hydra DB by its memory ID. This action is irreversible.
Inputs: memory_id (required).
hydra_db_fetch_contentFetch Source Content (deprecated)ARead-onlyIdempotent
DEPRECATED — use hydradb_inspect instead. Fetch the full content of a specific source by its source ID from Hydra DB. Returns the original text content that was ingested. Use this to retrieve the complete content of a previously stored source.
Inputs: source_id (required), mode.
hydradb_ingestIngest into Hydra DBA
Save important information to Hydra DB State-of-the-art agentic memory. Use this to persist facts, preferences, decisions, notes, or any text the user wants remembered across sessions. Hydra DB automatically extracts insights, preferences, and builds a knowledge graph from the stored content. Supports plain text and markdown. To ingest a conversation instead of a single note, provide turns (user/assistant pairs) rather than text.
Inputs: text, infer, title, turns, +3 more.
hydra_db_ingest_conversationIngest Conversation (deprecated)A
DEPRECATED — use hydradb_ingest instead. Ingest one or more user-assistant conversation turns into Hydra DB memory. Hydra DB will extract insights, preferences, and knowledge graph entities from the conversation. Use this to store conversation history so it can be recalled later. Each turn is a pair of user message and assistant response.
Inputs: turns (required), source_id (required), user_name.
hydradb_inspectInspect Hydra DB SourceARead-onlyIdempotent
Fetch the full content of a specific source by its source ID from Hydra DB. Returns the original text content that was ingested. Use this to retrieve the complete content of a previously stored source.
Inputs: source_id (required), mode.
hydradb_listList Hydra DB ContextARead-onlyIdempotent
List stored memories or ingested knowledge sources in Hydra DB. Use kind to choose which family to browse.
Inputs: kind, source_ids.
hydra_db_list_memoriesList Memories (deprecated)ARead-onlyIdempotent
DEPRECATED — use hydradb_list instead. List all stored user memories in Hydra DB. Returns memory IDs and their content. Use this to browse what has been stored, verify memories exist, or find memory IDs for deletion.
Inputs: no named parameters.
hydra_db_list_sourcesList Sources (deprecated)ARead-onlyIdempotent
DEPRECATED — use hydradb_list instead. List all ingested sources in Hydra DB memory. Returns source IDs, titles, types, and metadata. Use this to see what data sources have been ingested and to find source IDs for fetching content.
Inputs: source_ids.
hydradb_queryQuery Hydra DBARead-onlyIdempotent
Search through Hydra DB State-of-the-art agentic memories. Returns relevant chunks with graph-enriched context including entity paths and knowledge graph relations. Use this to find previously stored information, past conversations, user preferences, or any knowledge that has been ingested into Hydra DB memory. Supports both fast semantic search and deeper thinking mode with graph traversal.
Inputs: query (required), mode, max_results, graph_context.
hydra_db_searchSearch Hydra DB Memory (deprecated)ARead-onlyIdempotent
DEPRECATED — use hydradb_query instead. Search through Hydra DB State-of-the-art agentic memories. Returns relevant chunks with graph-enriched context including entity paths and knowledge graph relations. Use this to find previously stored information, past conversations, user preferences, or any knowledge that has been ingested into Hydra DB memory. Supports both fast semantic search and deeper thinking mode with graph traversal.
Inputs: query (required), mode, max_results, graph_context.
hydra_db_storeStore to Hydra DB Memory (deprecated)A
DEPRECATED — use hydradb_ingest instead. Save important information to Hydra DB State-of-the-art agentic memory. Use this to persist facts, preferences, decisions, notes, or any text the user wants remembered across sessions. Hydra DB automatically extracts insights, preferences, and builds a knowledge graph from the stored content. Supports plain text and markdown.
Inputs: text (required), infer, title, source_id, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
The five current tools (hydradb_query, hydradb_ingest, hydradb_list, hydradb_inspect, hydradb_delete) each have a clear, distinct purpose. Deprecated tools are explicitly marked and can be ignored, so an agent can easily select the correct active tool.
There are two naming conventions: current tools use 'hydradb_' prefix with a single verb, while deprecated tools use 'hydra_db_' prefix with varying verb_noun structures. This inconsistency and the presence of both sets create confusion.
With 12 tools, many are deprecated duplicates. The effective set of 5 tools is well-scoped for a memory database server. The count is slightly bloated by deprecated items, but still reasonable.
The tool set covers create (ingest), read (query, list, inspect), and delete, but lacks an update/modify tool. This is a notable gap for full lifecycle management, though the surface is otherwise sufficient.
Maintenance
Related MCP Connectors
Universal memory for AI agents and tools. Save, organize and search context anywhere.
Persistent memory for AI agents. Search and store durable facts, preferences and decisions.
Persistent memory and knowledge graphs for AI agents. Hybrid search, context checkpoints, and more.
Persistent memory for AI agents: save, search and connect context across tools and sessions.
Related MCP Servers
FlicenseNot gradedqualityNot gradedmaintenanceProvides local-first memory storage and retrieval with automatic embedding, vector search, and knowledge graph capabilities. Enables agents to store memories locally and retrieve relevant context through hybrid search with optional Neo4j graph traversal.-- AlicenseNot gradedqualityNot gradedmaintenanceProvides AI agents with persistent long-term memory capabilities using semantic search. Enables storing, retrieving, and searching memories through three core tools integrated with Mem0 and vector storage.MIT
- AlicenseNot gradedqualityDmaintenanceEnables storing, searching, and compressing contextual memories for LLM interactions, with tools for memory management and context injection.9MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to store, search, and relate typed memories with a graph-native knowledge base via the Model Context Protocol.Apache 2.0