@getmarrow/mcp 2.8.0 → 2.9.1
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 +123 -267
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +487 -176
- 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,152 @@ 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
|
-
##
|
|
147
|
-
|
|
148
|
-
Use **`@getmarrow/mcp`** when:
|
|
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
|
|
153
|
-
|
|
154
|
-
Use **`@getmarrow/sdk`** when:
|
|
155
|
-
- you are integrating Marrow directly into application/runtime code
|
|
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()`
|
|
158
|
-
|
|
159
|
-
In short:
|
|
160
|
-
- **MCP** = tool-driven integration for agents
|
|
161
|
-
- **SDK** = code-level integration for runtimes and apps
|
|
162
|
-
|
|
163
|
-
---
|
|
110
|
+
## MCP Tools
|
|
164
111
|
|
|
165
|
-
|
|
112
|
+
### Core Loop Tools
|
|
166
113
|
|
|
167
|
-
|
|
168
|
-
|
|
114
|
+
#### `marrow_orient`
|
|
115
|
+
**Call this first** at session start. Returns failure warnings from your history so you avoid known mistakes immediately.
|
|
169
116
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
- recommended next step
|
|
173
|
-
- recent lessons (when available)
|
|
174
|
-
- canonical session-start nudge
|
|
117
|
+
#### `marrow_think`
|
|
118
|
+
Log intent before meaningful action. Returns pattern insights, similar past decisions, and a recommended next step.
|
|
175
119
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
- before planning or execution begins
|
|
120
|
+
#### `marrow_commit`
|
|
121
|
+
Log the outcome after acting. Closes the decision loop.
|
|
179
122
|
|
|
180
|
-
|
|
181
|
-
|
|
123
|
+
#### `marrow_run`
|
|
124
|
+
Zero-ceremony wrapper. Handles orient → think → commit in a single call.
|
|
182
125
|
|
|
183
|
-
|
|
184
|
-
-
|
|
185
|
-
- pattern intelligence
|
|
186
|
-
- loop metadata
|
|
187
|
-
- warnings / next-step guidance
|
|
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.
|
|
188
128
|
|
|
189
|
-
|
|
190
|
-
- before meaningful action
|
|
191
|
-
- before deploy / publish / send / external write work
|
|
192
|
-
- when shifting from planning into execution
|
|
129
|
+
### Memory Management Tools
|
|
193
130
|
|
|
194
|
-
|
|
195
|
-
|
|
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
|
|
196
137
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
- current recommended next step
|
|
200
|
-
- whether the session looks ready for completion
|
|
201
|
-
- warnings if outcome/context is still missing
|
|
138
|
+
#### `marrow_get_memory`
|
|
139
|
+
Get a single memory by ID.
|
|
202
140
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
- before "done"
|
|
206
|
-
- before outbound updates after meaningful work
|
|
141
|
+
#### `marrow_update_memory`
|
|
142
|
+
Update memory text, tags, or metadata.
|
|
207
143
|
|
|
208
|
-
|
|
209
|
-
|
|
144
|
+
#### `marrow_delete_memory`
|
|
145
|
+
Soft delete a memory.
|
|
210
146
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
- updated loop state
|
|
214
|
-
- recommended next step after closure
|
|
147
|
+
#### `marrow_mark_outdated`
|
|
148
|
+
Mark a memory as outdated.
|
|
215
149
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
- after a deploy / publish / send / write succeeds or fails
|
|
219
|
-
- before a clean handoff or completion
|
|
150
|
+
#### `marrow_supersede_memory`
|
|
151
|
+
Atomically replace a memory with a new version.
|
|
220
152
|
|
|
221
|
-
|
|
153
|
+
#### `marrow_share_memory`
|
|
154
|
+
Share a memory with specific agents.
|
|
222
155
|
|
|
223
|
-
|
|
156
|
+
#### `marrow_export_memories`
|
|
157
|
+
Export memories to JSON or CSV format.
|
|
224
158
|
|
|
225
|
-
|
|
226
|
-
|
|
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**.
|
|
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
|
|
337
225
|
|
|
338
|
-
|
|
339
|
-
-
|
|
340
|
-
-
|
|
341
|
-
-
|
|
342
|
-
-
|
|
343
|
-
- users should be able to export and own their memory data instead of being trapped in a closed system
|
|
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
|
|
344
231
|
|
|
345
|
-
|
|
346
|
-
- better agent memory
|
|
347
|
-
- stronger privacy posture
|
|
348
|
-
- clearer user ownership
|
|
232
|
+
**Marrow tells you what went wrong last time before you do it again.**
|
|
349
233
|
|
|
350
234
|
---
|
|
351
235
|
|
|
352
|
-
##
|
|
236
|
+
## License
|
|
353
237
|
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
> Tip: log plans, decisions, and outcomes to Marrow so your agent improves over time.
|
|
357
|
-
|
|
358
|
-
For agents that have not logged any decisions yet this session, Marrow can also steer them toward `marrow_think` before acting.
|
|
238
|
+
MIT
|
|
359
239
|
|
|
360
240
|
---
|
|
361
241
|
|
|
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:
|
|
242
|
+
## Related Packages
|
|
387
243
|
|
|
388
|
-
- [
|
|
244
|
+
- **[@getmarrow/sdk](https://www.npmjs.com/package/@getmarrow/sdk)** — TypeScript/Node.js SDK for programmatic access to Marrow. Use this for custom agent integrations outside of MCP.
|
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"}
|