@hydradb/mcp 0.0.1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +56 -22
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,29 +8,63 @@ MCP (Model Context Protocol) server for [Hydra DB](https://hydradb.com), the sta
|
|
|
8
8
|
|
|
9
9
|
Search through Hydra DB memories. Returns relevant chunks with graph-enriched context including entity paths and knowledge graph relations.
|
|
10
10
|
|
|
11
|
+
| Parameter | Type | Required | Description |
|
|
12
|
+
|-----------|------|----------|-------------|
|
|
13
|
+
| `query` | string | Yes | The search query to find relevant memories |
|
|
14
|
+
| `max_results` | number | No | Maximum number of memory chunks to return (1-50, default: 10) |
|
|
15
|
+
| `mode` | string | No | Recall mode: `fast` for quick semantic search, `thinking` for deeper personalised recall with graph traversal (default: `thinking`) |
|
|
16
|
+
| `graph_context` | boolean | No | Whether to include knowledge graph relations in results (default: true) |
|
|
17
|
+
|
|
11
18
|
### **hydra_db_store**
|
|
12
19
|
|
|
13
|
-
Save important information to Hydra DB memory. Hydra DB automatically extracts insights, preferences, and builds a knowledge graph from the stored content.
|
|
20
|
+
Save important information to Hydra DB memory. Hydra DB automatically extracts insights, preferences, and builds a knowledge graph from the stored content. Supports plain text and markdown.
|
|
21
|
+
|
|
22
|
+
| Parameter | Type | Required | Description |
|
|
23
|
+
|-----------|------|----------|-------------|
|
|
24
|
+
| `text` | string | Yes | The information to store in memory |
|
|
25
|
+
| `title` | string | No | Title for the memory entry (default: `MCP Memory`) |
|
|
26
|
+
| `source_id` | string | No | Source identifier to group related memories together (e.g. session ID) |
|
|
27
|
+
| `infer` | boolean | No | Whether Hydra DB should extract insights and build knowledge graph (default: true) |
|
|
28
|
+
| `is_markdown` | boolean | No | Whether the text is in markdown format (default: false) |
|
|
14
29
|
|
|
15
30
|
### **hydra_db_ingest_conversation**
|
|
16
31
|
|
|
17
32
|
Ingest user-assistant conversation turns into Hydra DB memory. Hydra DB extracts insights, preferences, and knowledge graph entities from the conversation.
|
|
18
33
|
|
|
34
|
+
| Parameter | Type | Required | Description |
|
|
35
|
+
|-----------|------|----------|-------------|
|
|
36
|
+
| `turns` | array | Yes | Array of conversation turns, each with a `user` and `assistant` field |
|
|
37
|
+
| `source_id` | string | Yes | Source identifier to group all turns from the same session together |
|
|
38
|
+
| `user_name` | string | No | Name of the user for personalisation (default: `User`) |
|
|
39
|
+
|
|
19
40
|
### **hydra_db_list_memories**
|
|
20
41
|
|
|
21
|
-
List all stored user memories in Hydra DB. Returns memory IDs and their content.
|
|
42
|
+
List all stored user memories in Hydra DB. Returns memory IDs and their content. No parameters required.
|
|
22
43
|
|
|
23
44
|
### **hydra_db_delete_memory**
|
|
24
45
|
|
|
25
|
-
Delete a specific user memory from Hydra DB by its memory ID.
|
|
46
|
+
Delete a specific user memory from Hydra DB by its memory ID. This action is irreversible.
|
|
47
|
+
|
|
48
|
+
| Parameter | Type | Required | Description |
|
|
49
|
+
|-----------|------|----------|-------------|
|
|
50
|
+
| `memory_id` | string | Yes | The ID of the memory to delete |
|
|
26
51
|
|
|
27
52
|
### **hydra_db_fetch_content**
|
|
28
53
|
|
|
29
54
|
Fetch the full content of a specific source by its source ID.
|
|
30
55
|
|
|
56
|
+
| Parameter | Type | Required | Description |
|
|
57
|
+
|-----------|------|----------|-------------|
|
|
58
|
+
| `source_id` | string | Yes | The source ID to fetch content for |
|
|
59
|
+
| `mode` | string | No | Fetch mode: `content` for text, `url` for presigned URL, `both` for both (default: `content`) |
|
|
60
|
+
|
|
31
61
|
### **hydra_db_list_sources**
|
|
32
62
|
|
|
33
|
-
List all ingested sources in Hydra DB memory.
|
|
63
|
+
List all ingested sources in Hydra DB memory. Returns source IDs, titles, types, and metadata.
|
|
64
|
+
|
|
65
|
+
| Parameter | Type | Required | Description |
|
|
66
|
+
|-----------|------|----------|-------------|
|
|
67
|
+
| `source_ids` | array | No | Array of specific source IDs to filter by. If omitted, lists all sources |
|
|
34
68
|
|
|
35
69
|
## Configuration
|
|
36
70
|
|
|
@@ -43,19 +77,19 @@ List all ingested sources in Hydra DB memory.
|
|
|
43
77
|
|
|
44
78
|
| Variable | Description | Default |
|
|
45
79
|
| ------------------------ | ----------------------------------- | -------------- |
|
|
46
|
-
| `HYDRA_DB_API_KEY` | Your Hydra
|
|
47
|
-
| `HYDRA_DB_TENANT_ID` | Your Hydra
|
|
80
|
+
| `HYDRA_DB_API_KEY` | Your Hydra DB API key | *Required* |
|
|
81
|
+
| `HYDRA_DB_TENANT_ID` | Your Hydra DB tenant identifier | *Required* |
|
|
48
82
|
| `HYDRA_DB_SUB_TENANT_ID` | Sub-tenant for data partitioning | `hydra-db-mcp` |
|
|
49
|
-
| `HYDRA_DB_LOG_LEVEL` | Log level: DEBUG, INFO, WARN, ERROR | `ERROR`
|
|
83
|
+
| `HYDRA_DB_LOG_LEVEL` | Log level: DEBUG, INFO, WARN, ERROR | `ERROR` |
|
|
50
84
|
|
|
51
85
|
### Claude Desktop
|
|
52
86
|
|
|
53
87
|
```json
|
|
54
88
|
{
|
|
55
89
|
"mcpServers": {
|
|
56
|
-
|
|
90
|
+
"hydradb": {
|
|
57
91
|
"command": "npx",
|
|
58
|
-
"args": ["-y", "@
|
|
92
|
+
"args": ["-y", "@hydradb/mcp@latest"],
|
|
59
93
|
"env": {
|
|
60
94
|
"HYDRA_DB_API_KEY": "your-api-key",
|
|
61
95
|
"HYDRA_DB_TENANT_ID": "your-tenant-id"
|
|
@@ -75,9 +109,9 @@ List all ingested sources in Hydra DB memory.
|
|
|
75
109
|
```json
|
|
76
110
|
{
|
|
77
111
|
"mcpServers": {
|
|
78
|
-
|
|
112
|
+
"hydradb": {
|
|
79
113
|
"command": "npx",
|
|
80
|
-
"args": ["-y", "@
|
|
114
|
+
"args": ["-y", "@hydradb/mcp@latest"],
|
|
81
115
|
"env": {
|
|
82
116
|
"HYDRA_DB_API_KEY": "your-api-key",
|
|
83
117
|
"HYDRA_DB_TENANT_ID": "your-tenant-id"
|
|
@@ -94,10 +128,10 @@ Add to `.vscode/mcp.json`:
|
|
|
94
128
|
```json
|
|
95
129
|
{
|
|
96
130
|
"servers": {
|
|
97
|
-
|
|
131
|
+
"hydradb": {
|
|
98
132
|
"type": "stdio",
|
|
99
133
|
"command": "npx",
|
|
100
|
-
"args": ["-y", "@
|
|
134
|
+
"args": ["-y", "@hydradb/mcp@latest"],
|
|
101
135
|
"env": {
|
|
102
136
|
"HYDRA_DB_API_KEY": "your-api-key",
|
|
103
137
|
"HYDRA_DB_TENANT_ID": "your-tenant-id"
|
|
@@ -114,9 +148,9 @@ To partition data, set the `HYDRA_DB_SUB_TENANT_ID` environment variable:
|
|
|
114
148
|
```json
|
|
115
149
|
{
|
|
116
150
|
"mcpServers": {
|
|
117
|
-
|
|
151
|
+
"hydradb": {
|
|
118
152
|
"command": "npx",
|
|
119
|
-
"args": ["-y", "@
|
|
153
|
+
"args": ["-y", "@hydradb/mcp@latest"],
|
|
120
154
|
"env": {
|
|
121
155
|
"HYDRA_DB_API_KEY": "your-api-key",
|
|
122
156
|
"HYDRA_DB_TENANT_ID": "your-tenant-id",
|
|
@@ -129,17 +163,18 @@ To partition data, set the `HYDRA_DB_SUB_TENANT_ID` environment variable:
|
|
|
129
163
|
|
|
130
164
|
## How It Works
|
|
131
165
|
|
|
132
|
-
- **hydra_db_search** queries
|
|
133
|
-
- **hydra_db_store** sends text to
|
|
134
|
-
- **hydra_db_ingest_conversation** sends user-assistant pairs to
|
|
135
|
-
- **hydra_db_list_memories**
|
|
166
|
+
- **hydra_db_search** queries `POST /recall/recall_preferences` for relevant memories and returns graph-enriched context (entity paths, chunk relations, extra context). Supports `fast` and `thinking` recall modes.
|
|
167
|
+
- **hydra_db_store** sends text to `POST /memories/add_memory` with configurable `infer`, `upsert`, `is_markdown`, `title`, and `source_id` options. Hydra DB extracts insights and builds a knowledge graph automatically.
|
|
168
|
+
- **hydra_db_ingest_conversation** sends user-assistant pairs to `POST /memories/add_memory` as conversation turns, grouped by `source_id`.
|
|
169
|
+
- **hydra_db_list_memories** queries `POST /list/data` (kind: `memories`) to browse stored memories.
|
|
170
|
+
- **hydra_db_list_sources** queries `POST /list/data` (kind: `knowledge`) to browse ingested sources, with optional `source_ids` filter.
|
|
136
171
|
- **hydra_db_delete_memory** calls `DELETE /memories/delete_memory` to remove a specific memory.
|
|
137
|
-
- **hydra_db_fetch_content** calls
|
|
172
|
+
- **hydra_db_fetch_content** calls `POST /fetch/content` to retrieve the original ingested content, with mode options (`content`, `url`, or `both`).
|
|
138
173
|
|
|
139
174
|
## Development
|
|
140
175
|
|
|
141
176
|
```bash
|
|
142
|
-
npm
|
|
177
|
+
npm ci
|
|
143
178
|
npm run build
|
|
144
179
|
HYDRA_DB_API_KEY=your-key HYDRA_DB_TENANT_ID=your-tenant npm start
|
|
145
180
|
```
|
|
@@ -187,4 +222,3 @@ make check-types # Type-check without emitting
|
|
|
187
222
|
```
|
|
188
223
|
|
|
189
224
|
Run `make help` to see all available targets.
|
|
190
|
-
|
package/package.json
CHANGED