@getmarrow/mcp 2.7.0 → 2.9.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 +121 -271
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +566 -117
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +23 -98
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +53 -23
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +111 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +6 -0
- package/dist/types.js.map +1 -0
- package/package.json +9 -3
package/README.md
CHANGED
|
@@ -10,51 +10,45 @@ With `@getmarrow/mcp`, any MCP-compatible client can log intent before acting, i
|
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
-
## What's New in v2.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
- `
|
|
37
|
-
- `
|
|
38
|
-
- `
|
|
39
|
-
- `
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
- `
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
npx @getmarrow/mcp
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
Or register it in your MCP client config.
|
|
13
|
+
## What's New in v2.8.0
|
|
14
|
+
|
|
15
|
+
**Backend API Enhancements** — New MCP tools for memory lifecycle management:
|
|
16
|
+
|
|
17
|
+
### Cross-Agent Memory Sharing
|
|
18
|
+
Share memories across agents in your account:
|
|
19
|
+
- `marrow_share_memory` — Share a memory with specific agents
|
|
20
|
+
- Memories shared with your agents automatically appear in `marrow_list_memories`
|
|
21
|
+
|
|
22
|
+
### Memory Export/Import
|
|
23
|
+
Backup and restore memories:
|
|
24
|
+
- `marrow_export_memories` — Export to JSON or CSV format
|
|
25
|
+
- `marrow_import_memories` — Import with merge (dedup) or replace mode
|
|
26
|
+
|
|
27
|
+
### Advanced FTS Filters
|
|
28
|
+
Precision search in `marrow_retrieve_memories`:
|
|
29
|
+
- `from` / `to` — Date range filters
|
|
30
|
+
- `tags` — Filter by tags (AND logic)
|
|
31
|
+
- `source` — Filter by source (e.g., `session_bootstrap`, `think`)
|
|
32
|
+
- `status` — Filter by status (`active`, `outdated`, `deleted`)
|
|
33
|
+
|
|
34
|
+
### New MCP Tools
|
|
35
|
+
- `marrow_list_memories` — List memories with pagination
|
|
36
|
+
- `marrow_get_memory` — Get single memory by ID
|
|
37
|
+
- `marrow_update_memory` — Update memory text, tags, or metadata
|
|
38
|
+
- `marrow_mark_outdated` — Mark memory as outdated
|
|
39
|
+
- `marrow_supersede_memory` — Atomically replace memory with new version
|
|
40
|
+
- `marrow_delete_memory` — Soft delete memory
|
|
41
|
+
- `marrow_export_memories` — Export to JSON or CSV
|
|
42
|
+
- `marrow_import_memories` — Import memories
|
|
43
|
+
- `marrow_share_memory` — Share with agents
|
|
44
|
+
- `marrow_retrieve_memories` — FTS search with filters
|
|
45
|
+
|
|
46
|
+
### Security Hardening
|
|
47
|
+
- Account isolation enforced (no cross-account leakage)
|
|
48
|
+
- Agent ID validation on all tools
|
|
49
|
+
- Audit logging for export/import operations
|
|
50
|
+
- Rate limiting on export (5/hour)
|
|
51
|
+
- SHA-256 dedup on import
|
|
58
52
|
|
|
59
53
|
---
|
|
60
54
|
|
|
@@ -99,290 +93,146 @@ That gives agents an actual memory discipline:
|
|
|
99
93
|
- **check** → inspect whether the loop is still open or missing something
|
|
100
94
|
- **commit** → log the outcome and close the loop
|
|
101
95
|
|
|
102
|
-
The result is memory that is useful during execution, not just after the fact.
|
|
103
|
-
|
|
104
96
|
---
|
|
105
97
|
|
|
106
|
-
##
|
|
98
|
+
## Install
|
|
107
99
|
|
|
108
|
-
|
|
100
|
+
Run it directly with `npx`:
|
|
109
101
|
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
"mcpServers": {
|
|
113
|
-
"marrow": {
|
|
114
|
-
"command": "npx",
|
|
115
|
-
"args": ["@getmarrow/mcp"],
|
|
116
|
-
"env": {
|
|
117
|
-
"MARROW_API_KEY": "mrw_your_key_here"
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
}
|
|
102
|
+
```bash
|
|
103
|
+
npx @getmarrow/mcp
|
|
122
104
|
```
|
|
123
105
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
If your MCP host supports command-based servers, point it at:
|
|
127
|
-
|
|
128
|
-
- command: `npx`
|
|
129
|
-
- args: `@getmarrow/mcp`
|
|
130
|
-
- env: `MARROW_API_KEY=...`
|
|
131
|
-
|
|
132
|
-
---
|
|
133
|
-
|
|
134
|
-
## Automatic Prompts (Zero-Config)
|
|
135
|
-
|
|
136
|
-
When added to a compatible MCP client, Marrow automatically exposes a `marrow-always-on` prompt that instructs your agent to use the memory loop without any manual setup.
|
|
137
|
-
|
|
138
|
-
In Claude Desktop — the prompt appears in the prompt picker. Select it once and your agent orients, thinks, and commits automatically every session.
|
|
139
|
-
|
|
140
|
-
In compatible clients — the prompt can be auto-injected into the system context so the loop fires without the user doing anything.
|
|
141
|
-
|
|
142
|
-
This is how Marrow works right after install with zero user instruction.
|
|
106
|
+
Or register it in your MCP client config.
|
|
143
107
|
|
|
144
108
|
---
|
|
145
109
|
|
|
146
|
-
##
|
|
110
|
+
## MCP Tools
|
|
147
111
|
|
|
148
|
-
|
|
149
|
-
- your agent already speaks MCP
|
|
150
|
-
- you want Marrow exposed as tools
|
|
151
|
-
- you want loop state visible during the session
|
|
152
|
-
- you want hosts/orchestrators to inspect whether work is ready for completion
|
|
112
|
+
### Core Loop Tools
|
|
153
113
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
- you want wrapper-level enforcement around deploy, publish, outbound sends, or external writes
|
|
157
|
-
- you want programmatic control through `beforeAction()`, `afterAction()`, `wrap()`, and `check()`
|
|
114
|
+
#### `marrow_orient`
|
|
115
|
+
**Call this first** at session start. Returns failure warnings from your history so you avoid known mistakes immediately.
|
|
158
116
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
- **SDK** = code-level integration for runtimes and apps
|
|
117
|
+
#### `marrow_think`
|
|
118
|
+
Log intent before meaningful action. Returns pattern insights, similar past decisions, and a recommended next step.
|
|
162
119
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
## Tools
|
|
166
|
-
|
|
167
|
-
### `marrow_orient` / `orient`
|
|
168
|
-
Start the session with Marrow context.
|
|
120
|
+
#### `marrow_commit`
|
|
121
|
+
Log the outcome after acting. Closes the decision loop.
|
|
169
122
|
|
|
170
|
-
|
|
171
|
-
-
|
|
172
|
-
- recommended next step
|
|
173
|
-
- recent lessons (when available)
|
|
174
|
-
- canonical session-start nudge
|
|
123
|
+
#### `marrow_run`
|
|
124
|
+
Zero-ceremony wrapper. Handles orient → think → commit in a single call.
|
|
175
125
|
|
|
176
|
-
|
|
177
|
-
-
|
|
178
|
-
- before planning or execution begins
|
|
126
|
+
#### `marrow_auto`
|
|
127
|
+
Fire-and-forget logging. Pass what you're about to do (and optionally the outcome). Marrow handles everything in the background.
|
|
179
128
|
|
|
180
|
-
###
|
|
181
|
-
Log intent and get decision intelligence back.
|
|
129
|
+
### Memory Management Tools
|
|
182
130
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
-
|
|
186
|
-
-
|
|
187
|
-
-
|
|
131
|
+
#### `marrow_list_memories`
|
|
132
|
+
List memories with optional filters:
|
|
133
|
+
- `status` — Filter by status (active, outdated, deleted)
|
|
134
|
+
- `query` — Search query
|
|
135
|
+
- `limit` — Max results
|
|
136
|
+
- `agentId` — Include memories shared with this agent
|
|
188
137
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
- before deploy / publish / send / external write work
|
|
192
|
-
- when shifting from planning into execution
|
|
138
|
+
#### `marrow_get_memory`
|
|
139
|
+
Get a single memory by ID.
|
|
193
140
|
|
|
194
|
-
|
|
195
|
-
|
|
141
|
+
#### `marrow_update_memory`
|
|
142
|
+
Update memory text, tags, or metadata.
|
|
196
143
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
- current recommended next step
|
|
200
|
-
- whether the session looks ready for completion
|
|
201
|
-
- warnings if outcome/context is still missing
|
|
144
|
+
#### `marrow_delete_memory`
|
|
145
|
+
Soft delete a memory.
|
|
202
146
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
- before "done"
|
|
206
|
-
- before outbound updates after meaningful work
|
|
147
|
+
#### `marrow_mark_outdated`
|
|
148
|
+
Mark a memory as outdated.
|
|
207
149
|
|
|
208
|
-
|
|
209
|
-
|
|
150
|
+
#### `marrow_supersede_memory`
|
|
151
|
+
Atomically replace a memory with a new version.
|
|
210
152
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
- updated loop state
|
|
214
|
-
- recommended next step after closure
|
|
153
|
+
#### `marrow_share_memory`
|
|
154
|
+
Share a memory with specific agents.
|
|
215
155
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
- after a deploy / publish / send / write succeeds or fails
|
|
219
|
-
- before a clean handoff or completion
|
|
156
|
+
#### `marrow_export_memories`
|
|
157
|
+
Export memories to JSON or CSV format.
|
|
220
158
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
Single call. Handles orient → think → commit automatically.
|
|
224
|
-
|
|
225
|
-
Input:
|
|
226
|
-
```json
|
|
227
|
-
{
|
|
228
|
-
"description": "What the agent did",
|
|
229
|
-
"success": true,
|
|
230
|
-
"outcome": "One-line summary of what happened",
|
|
231
|
-
"type": "implementation"
|
|
232
|
-
}
|
|
233
|
-
```
|
|
159
|
+
#### `marrow_import_memories`
|
|
160
|
+
Import memories with merge (dedup) or replace mode.
|
|
234
161
|
|
|
235
|
-
|
|
162
|
+
#### `marrow_retrieve_memories`
|
|
163
|
+
Full-text search with filters:
|
|
164
|
+
- `query` — Search query (required)
|
|
165
|
+
- `limit` — Max results
|
|
166
|
+
- `from` / `to` — Date range (ISO-8601)
|
|
167
|
+
- `tags` — Comma-separated tags
|
|
168
|
+
- `source` — Source filter
|
|
169
|
+
- `status` — Status filter
|
|
170
|
+
- `shared` — Include shared memories
|
|
236
171
|
|
|
237
|
-
|
|
172
|
+
### Query Tools
|
|
238
173
|
|
|
239
|
-
|
|
240
|
-
|
|
174
|
+
#### `marrow_ask`
|
|
175
|
+
Query the collective hive in plain English. Ask about failure patterns, what worked, what broke, or get a recommendation.
|
|
241
176
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
- learning what tends to work for a task type
|
|
245
|
-
- orienting around recent drift or recurring mistakes
|
|
177
|
+
#### `marrow_status`
|
|
178
|
+
Check Marrow platform health and status.
|
|
246
179
|
|
|
247
180
|
---
|
|
248
181
|
|
|
249
|
-
##
|
|
250
|
-
|
|
251
|
-
Use `marrow_run` instead of chaining `marrow_think` + `marrow_commit`:
|
|
182
|
+
## Claude Desktop Config
|
|
252
183
|
|
|
253
184
|
```json
|
|
254
185
|
{
|
|
255
|
-
"
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
186
|
+
"mcpServers": {
|
|
187
|
+
"marrow": {
|
|
188
|
+
"command": "npx",
|
|
189
|
+
"args": ["@getmarrow/mcp"],
|
|
190
|
+
"env": {
|
|
191
|
+
"MARROW_API_KEY": "mrw_your_api_key"
|
|
192
|
+
}
|
|
193
|
+
}
|
|
261
194
|
}
|
|
262
195
|
}
|
|
263
196
|
```
|
|
264
197
|
|
|
265
|
-
Marrow handles the full loop internally.
|
|
266
|
-
|
|
267
198
|
---
|
|
268
199
|
|
|
269
200
|
## Environment Variables
|
|
270
201
|
|
|
271
202
|
| Variable | Required | Description |
|
|
272
203
|
|----------|----------|-------------|
|
|
273
|
-
| `MARROW_API_KEY` | Yes | Your
|
|
274
|
-
| `MARROW_BASE_URL` | No |
|
|
275
|
-
| `MARROW_SESSION_ID` | No | Session identifier
|
|
276
|
-
|
|
277
|
-
---
|
|
278
|
-
|
|
279
|
-
## Example Workflow
|
|
280
|
-
|
|
281
|
-
### Example: deployment task
|
|
282
|
-
|
|
283
|
-
1. Call `marrow_orient`
|
|
284
|
-
2. Call `marrow_think` with something like:
|
|
285
|
-
- action: `Deploy auth refactor to staging`
|
|
286
|
-
- type: `implementation`
|
|
287
|
-
3. Perform the deploy
|
|
288
|
-
4. Call `marrow_check`
|
|
289
|
-
5. Call `marrow_commit` with outcome:
|
|
290
|
-
- success: `true`
|
|
291
|
-
- outcome: `Staging deploy passed smoke tests`
|
|
292
|
-
|
|
293
|
-
This gives the next session or next agent real context:
|
|
294
|
-
- what was attempted
|
|
295
|
-
- whether it worked
|
|
296
|
-
- what patterns Marrow saw around it
|
|
297
|
-
- whether the loop was actually closed
|
|
204
|
+
| `MARROW_API_KEY` | Yes | Your API key from getmarrow.ai |
|
|
205
|
+
| `MARROW_BASE_URL` | No | Custom API URL (default: `https://api.getmarrow.ai`) |
|
|
206
|
+
| `MARROW_SESSION_ID` | No | Session identifier for multi-agent setups |
|
|
298
207
|
|
|
299
208
|
---
|
|
300
209
|
|
|
301
|
-
##
|
|
302
|
-
|
|
303
|
-
Marrow MCP tools expose more than a raw ID.
|
|
210
|
+
## The Always-On Prompt
|
|
304
211
|
|
|
305
|
-
|
|
306
|
-
- recent lessons
|
|
307
|
-
- similar past outcomes
|
|
308
|
-
- warnings about recurring failure patterns
|
|
309
|
-
- current loop state
|
|
310
|
-
- recommended next step
|
|
311
|
-
- session guidance to close the loop cleanly
|
|
212
|
+
Marrow includes a built-in prompt called `marrow-always-on` that instructs agents to use Marrow automatically. Install it once and it works for every session.
|
|
312
213
|
|
|
313
|
-
|
|
214
|
+
**To use:** In your MCP client, request the `marrow-always-on` prompt and include it in your system instructions.
|
|
314
215
|
|
|
315
216
|
---
|
|
316
217
|
|
|
317
|
-
## Why
|
|
218
|
+
## Why This Matters
|
|
318
219
|
|
|
319
220
|
Without Marrow:
|
|
320
|
-
- the
|
|
321
|
-
-
|
|
322
|
-
-
|
|
323
|
-
-
|
|
324
|
-
|
|
325
|
-
With Marrow MCP:
|
|
326
|
-
- the agent can orient before acting
|
|
327
|
-
- meaningful work can be tracked in-session
|
|
328
|
-
- hosts can inspect loop state before completion or handoff
|
|
329
|
-
- outcomes become structured memory instead of vague summaries
|
|
330
|
-
- memory becomes operational, not decorative
|
|
331
|
-
|
|
332
|
-
---
|
|
333
|
-
|
|
334
|
-
## Privacy, Sanitization, and Data Ownership
|
|
335
|
-
|
|
336
|
-
Marrow should make agents smarter **without turning user sessions into careless raw-data collection**.
|
|
337
|
-
|
|
338
|
-
Key trust properties:
|
|
339
|
-
- sensitive inputs can be sanitized before storage when possible
|
|
340
|
-
- privacy-preserving learning matters more than retaining raw personal data forever
|
|
341
|
-
- MCP hosts should pass API keys through environment variables, not embed them in source or config blobs committed to git
|
|
342
|
-
- the product direction is anonymized pattern learning, not exposing private user context across the hive
|
|
343
|
-
- users should be able to export and own their memory data instead of being trapped in a closed system
|
|
344
|
-
|
|
345
|
-
In short:
|
|
346
|
-
- better agent memory
|
|
347
|
-
- stronger privacy posture
|
|
348
|
-
- clearer user ownership
|
|
349
|
-
|
|
350
|
-
---
|
|
351
|
-
|
|
352
|
-
## Session Hint
|
|
353
|
-
|
|
354
|
-
At session start, Marrow nudges clients with the canonical reminder:
|
|
221
|
+
- Agents repeat the same failures session after session
|
|
222
|
+
- Successful patterns get lost when the context window clears
|
|
223
|
+
- There's no structured trail of what was tried and what worked
|
|
224
|
+
- Every new session starts from zero
|
|
355
225
|
|
|
356
|
-
|
|
226
|
+
With Marrow:
|
|
227
|
+
- Failure patterns surface before you repeat them
|
|
228
|
+
- Successful outcomes compound across sessions
|
|
229
|
+
- Every decision has a trail: intent → action → outcome
|
|
230
|
+
- The hive gets smarter with every logged decision
|
|
357
231
|
|
|
358
|
-
|
|
232
|
+
**Marrow tells you what went wrong last time before you do it again.**
|
|
359
233
|
|
|
360
234
|
---
|
|
361
235
|
|
|
362
|
-
##
|
|
363
|
-
|
|
364
|
-
Use environment variables for your API key.
|
|
365
|
-
|
|
366
|
-
Correct:
|
|
367
|
-
- `MARROW_API_KEY` passed through MCP host config or runtime environment
|
|
368
|
-
|
|
369
|
-
Do not:
|
|
370
|
-
- hardcode production API keys into source files
|
|
371
|
-
- commit real keys into config
|
|
372
|
-
- paste secrets into README examples
|
|
373
|
-
|
|
374
|
-
Placeholder examples like `mrw_your_key_here` are documentation only.
|
|
375
|
-
|
|
376
|
-
---
|
|
377
|
-
|
|
378
|
-
## Get an API Key
|
|
379
|
-
|
|
380
|
-
Sign up at [getmarrow.ai](https://getmarrow.ai)
|
|
381
|
-
|
|
382
|
-
---
|
|
383
|
-
|
|
384
|
-
## Related Package
|
|
385
|
-
|
|
386
|
-
If you want direct runtime integration instead of MCP tools:
|
|
236
|
+
## License
|
|
387
237
|
|
|
388
|
-
|
|
238
|
+
MIT
|
package/dist/cli.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;;GAGG"}
|