@selfagency/beans-mcp 0.5.0 → 0.6.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 +180 -30
- package/beans-mcp-server.cjs +560 -93
- package/index.cjs +562 -93
- package/index.d.ts +55 -2
- package/index.js +562 -94
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
# @selfagency/beans-mcp 🫘
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<img src="docs/assets/icon.png" alt="beans-mcp icon" width="300" />
|
|
4
|
+
|
|
5
|
+
[](https://github.com/selfagency/beans-mcp/actions/workflows/test.yml) [](https://codecov.io/gh/selfagency/beans-mcp) 
|
|
4
6
|
|
|
5
7
|
MCP (Model Context Protocol) server for [Beans](https://github.com/hmans/beans) issue tracker. Provides programmatic and CLI interfaces for AI-powered interactions with Beans workspaces.
|
|
6
8
|
|
|
9
|
+
Documentation: [beans-mcp.self.agency](https://beans-mcp.self.agency)
|
|
10
|
+
|
|
7
11
|
> 🤖 **Try Beans fully-integrated with GitHub Copilot in VS Code! Install the <a href="https://marketplace.visualstudio.com/items?itemName=selfagency.beans-vscode">selfagency.beans-vscode</a> extension.**
|
|
8
12
|
|
|
9
13
|
## Usage
|
|
@@ -30,33 +34,44 @@ CLI version. If they differ, it prints a warning to stderr and continues startup
|
|
|
30
34
|
|
|
31
35
|
## Summary of public MCP tools
|
|
32
36
|
|
|
33
|
-
| Tool
|
|
34
|
-
|
|
|
35
|
-
| `beans_init`
|
|
36
|
-
| `
|
|
37
|
-
| `
|
|
38
|
-
| `
|
|
39
|
-
| `
|
|
40
|
-
| `
|
|
41
|
-
| `
|
|
42
|
-
| `
|
|
43
|
-
| `
|
|
44
|
-
| `
|
|
45
|
-
| `
|
|
46
|
-
|
|
47
|
-
|
|
37
|
+
| Tool | Description |
|
|
38
|
+
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
39
|
+
| `beans_init` | Initialize the workspace (optional `prefix`). |
|
|
40
|
+
| `beans_archive` | Archive completed/scrapped beans. |
|
|
41
|
+
| `beans_view` | Fetch full bean details by `beanId` or `beanIds`. |
|
|
42
|
+
| `beans_create` | Create a new bean (title/type + optional body/parent). |
|
|
43
|
+
| `beans_bulk_create` | Create multiple beans in one call, optionally under a shared parent. |
|
|
44
|
+
| `beans_update` | Consolidated metadata + body updates (status/type/priority/parent/clearParent/blocking/blockedBy/body/bodyAppend/bodyReplace) plus optional optimistic concurrency hint (`ifMatch`). |
|
|
45
|
+
| `beans_bulk_update` | Update multiple beans in one call, optionally reassigning them to a shared parent. |
|
|
46
|
+
| `beans_complete_tasks` | Mark all markdown checklist tasks within a bean as complete. |
|
|
47
|
+
| `beans_delete` | Delete one or many beans (`beanId` or `beanIds`, optional `force`). |
|
|
48
|
+
| `beans_reopen` | Reopen a completed or scrapped bean to an active status. |
|
|
49
|
+
| `beans_query` | Unified list/search/filter/sort/ready operations, with GraphQL passthrough. |
|
|
50
|
+
| `beans_bean_file` | Read/edit/create/delete files under `.beans`. |
|
|
51
|
+
| `beans_output` | Read extension output logs or show guidance. |
|
|
52
|
+
|
|
53
|
+
<details>
|
|
54
|
+
<summary>Notes</summary>
|
|
48
55
|
|
|
49
56
|
- The `beans_query` tool is intentionally broad: prefer it for listing, searching, filtering or sorting beans, and for generating Copilot instructions (`operation: 'llm_context'`).
|
|
50
57
|
- All file and log operations validate paths to keep them within the workspace or the VS Code log directory. The `.beans/` prefix is automatically stripped from paths — you can pass either `some-bean.md` or `.beans/some-bean.md` and the result is the same.
|
|
51
58
|
- `beans_update` replaces many fine-grained update tools; callers should use it to keep the public tool surface small and predictable.
|
|
59
|
+
- `beans_archive` provides CLI parity for archiving completed/scrapped beans.
|
|
60
|
+
- Closing a parent bean via `beans_update` (`status: completed` or `status: scrapped`) cascades the same status to all descendants.
|
|
61
|
+
- Reopening a parent bean via `beans_reopen` cascades the target status to closed descendants (`completed` / `scrapped`).
|
|
52
62
|
- `beans_bulk_create` and `beans_bulk_update` are best-effort: they process each item sequentially and return a per-item result array with success/error entries rather than failing atomically.
|
|
53
63
|
- Frontmatter `title:` values are automatically double-quoted on write. Pass raw titles — quoting and escaping is handled for you.
|
|
64
|
+
- `beans_bean_file` supports `update_frontmatter` for atomic frontmatter-only writes; supported fields include `pr` and `branch`.
|
|
54
65
|
- Unfiltered list results are cached with a short burst TTL and a timestamp-probe refresh strategy. Mutation tools (`beans_create`, `beans_update`, `beans_delete`, etc.) invalidate the cache immediately.
|
|
55
66
|
- Version mismatches between `beans-mcp` and the Beans CLI are warning-only and non-blocking by design.
|
|
67
|
+
- When `beanId` is missing in tool input, validation errors include a hint: `Did you mean \`beanId\`?`.
|
|
68
|
+
|
|
69
|
+
</details>
|
|
56
70
|
|
|
57
71
|
## Examples
|
|
58
72
|
|
|
59
|
-
|
|
73
|
+
<details>
|
|
74
|
+
<summary>beans_init</summary>
|
|
60
75
|
|
|
61
76
|
Request:
|
|
62
77
|
|
|
@@ -70,7 +85,10 @@ Response (structuredContent):
|
|
|
70
85
|
{ "initialized": true }
|
|
71
86
|
```
|
|
72
87
|
|
|
73
|
-
|
|
88
|
+
</details>
|
|
89
|
+
|
|
90
|
+
<details>
|
|
91
|
+
<summary>beans_view</summary>
|
|
74
92
|
|
|
75
93
|
Request:
|
|
76
94
|
|
|
@@ -101,7 +119,27 @@ Response (structuredContent):
|
|
|
101
119
|
}
|
|
102
120
|
```
|
|
103
121
|
|
|
104
|
-
|
|
122
|
+
</details>
|
|
123
|
+
|
|
124
|
+
<details>
|
|
125
|
+
<summary>beans_archive</summary>
|
|
126
|
+
|
|
127
|
+
Request:
|
|
128
|
+
|
|
129
|
+
```json
|
|
130
|
+
{}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Response (example):
|
|
134
|
+
|
|
135
|
+
```json
|
|
136
|
+
{ "archived": true, "archivedCount": 3 }
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
</details>
|
|
140
|
+
|
|
141
|
+
<details>
|
|
142
|
+
<summary>beans_create</summary>
|
|
105
143
|
|
|
106
144
|
Request:
|
|
107
145
|
|
|
@@ -131,7 +169,10 @@ Response (structuredContent):
|
|
|
131
169
|
}
|
|
132
170
|
```
|
|
133
171
|
|
|
134
|
-
|
|
172
|
+
</details>
|
|
173
|
+
|
|
174
|
+
<details>
|
|
175
|
+
<summary>beans_bulk_create</summary>
|
|
135
176
|
|
|
136
177
|
Request:
|
|
137
178
|
|
|
@@ -163,7 +204,10 @@ Response (structuredContent):
|
|
|
163
204
|
}
|
|
164
205
|
```
|
|
165
206
|
|
|
166
|
-
|
|
207
|
+
</details>
|
|
208
|
+
|
|
209
|
+
<details>
|
|
210
|
+
<summary>beans_bulk_update</summary>
|
|
167
211
|
|
|
168
212
|
Request (move a batch of tasks to in-progress and assign them to a parent):
|
|
169
213
|
|
|
@@ -195,7 +239,10 @@ Response (structuredContent):
|
|
|
195
239
|
|
|
196
240
|
> Both bulk tools are best-effort: partial failures are reported per-item rather than aborting the whole batch.
|
|
197
241
|
|
|
198
|
-
|
|
242
|
+
</details>
|
|
243
|
+
|
|
244
|
+
<details>
|
|
245
|
+
<summary>beans_update</summary>
|
|
199
246
|
|
|
200
247
|
Request (change status and add blocking):
|
|
201
248
|
|
|
@@ -235,7 +282,10 @@ Response (structuredContent):
|
|
|
235
282
|
}
|
|
236
283
|
```
|
|
237
284
|
|
|
238
|
-
|
|
285
|
+
</details>
|
|
286
|
+
|
|
287
|
+
<details>
|
|
288
|
+
<summary>beans_delete</summary>
|
|
239
289
|
|
|
240
290
|
Request:
|
|
241
291
|
|
|
@@ -269,7 +319,10 @@ Batch response (summary):
|
|
|
269
319
|
}
|
|
270
320
|
```
|
|
271
321
|
|
|
272
|
-
|
|
322
|
+
</details>
|
|
323
|
+
|
|
324
|
+
<details>
|
|
325
|
+
<summary>beans_reopen</summary>
|
|
273
326
|
|
|
274
327
|
Request:
|
|
275
328
|
|
|
@@ -287,7 +340,35 @@ Response:
|
|
|
287
340
|
{ "bean": { "id": "bean-closed", "status": "todo" } }
|
|
288
341
|
```
|
|
289
342
|
|
|
290
|
-
|
|
343
|
+
</details>
|
|
344
|
+
|
|
345
|
+
<details>
|
|
346
|
+
<summary>beans_complete_tasks</summary>
|
|
347
|
+
|
|
348
|
+
Request:
|
|
349
|
+
|
|
350
|
+
```json
|
|
351
|
+
{ "beanId": "bean-abc" }
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
Response:
|
|
355
|
+
|
|
356
|
+
```json
|
|
357
|
+
{
|
|
358
|
+
"bean": {
|
|
359
|
+
"id": "bean-abc",
|
|
360
|
+
"status": "todo"
|
|
361
|
+
},
|
|
362
|
+
"totalTaskCount": 5,
|
|
363
|
+
"updatedTaskCount": 3,
|
|
364
|
+
"unchangedTaskCount": 2
|
|
365
|
+
}
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
</details>
|
|
369
|
+
|
|
370
|
+
<details>
|
|
371
|
+
<summary>beans_query examples</summary>
|
|
291
372
|
|
|
292
373
|
Refresh (list all beans):
|
|
293
374
|
|
|
@@ -346,7 +427,29 @@ Response (structuredContent):
|
|
|
346
427
|
}
|
|
347
428
|
```
|
|
348
429
|
|
|
349
|
-
|
|
430
|
+
Raw GraphQL passthrough (CLI parity with `beans query`):
|
|
431
|
+
|
|
432
|
+
```json
|
|
433
|
+
{
|
|
434
|
+
"operation": "graphql",
|
|
435
|
+
"graphql": "{ beans(filter: { type: [\"bug\"] }) { id title status } }"
|
|
436
|
+
}
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
With variables:
|
|
440
|
+
|
|
441
|
+
```json
|
|
442
|
+
{
|
|
443
|
+
"operation": "graphql",
|
|
444
|
+
"graphql": "query($q: String!) { beans(filter: { search: $q }) { id title } }",
|
|
445
|
+
"variables": { "q": "authentication" }
|
|
446
|
+
}
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
</details>
|
|
450
|
+
|
|
451
|
+
<details>
|
|
452
|
+
<summary>beans_bean_file</summary>
|
|
350
453
|
|
|
351
454
|
Request (read):
|
|
352
455
|
|
|
@@ -363,7 +466,39 @@ Response:
|
|
|
363
466
|
}
|
|
364
467
|
```
|
|
365
468
|
|
|
366
|
-
|
|
469
|
+
Request (atomic frontmatter update):
|
|
470
|
+
|
|
471
|
+
```json
|
|
472
|
+
{
|
|
473
|
+
"operation": "update_frontmatter",
|
|
474
|
+
"path": "beans-vscode-123--title.md",
|
|
475
|
+
"fields": {
|
|
476
|
+
"status": "in-progress",
|
|
477
|
+
"pr": "123",
|
|
478
|
+
"branch": "feature/cascade-status-and-skills-npm"
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
```
|
|
482
|
+
|
|
483
|
+
Response:
|
|
484
|
+
|
|
485
|
+
```json
|
|
486
|
+
{
|
|
487
|
+
"path": "/workspace/.beans/beans-vscode-123--title.md",
|
|
488
|
+
"bytes": 256,
|
|
489
|
+
"updatedFields": ["status", "pr", "branch"],
|
|
490
|
+
"frontmatter": {
|
|
491
|
+
"status": "in-progress",
|
|
492
|
+
"pr": "123",
|
|
493
|
+
"branch": "feature/cascade-status-and-skills-npm"
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
```
|
|
497
|
+
|
|
498
|
+
</details>
|
|
499
|
+
|
|
500
|
+
<details>
|
|
501
|
+
<summary>beans_output</summary>
|
|
367
502
|
|
|
368
503
|
Request (read last 200 lines):
|
|
369
504
|
|
|
@@ -381,6 +516,8 @@ Response:
|
|
|
381
516
|
}
|
|
382
517
|
```
|
|
383
518
|
|
|
519
|
+
</details>
|
|
520
|
+
|
|
384
521
|
## Programmatic usage
|
|
385
522
|
|
|
386
523
|
### Installation
|
|
@@ -392,11 +529,11 @@ npm install beans-mcp
|
|
|
392
529
|
### Example
|
|
393
530
|
|
|
394
531
|
```typescript
|
|
395
|
-
import { createBeansMcpServer, parseCliArgs } from
|
|
532
|
+
import { createBeansMcpServer, parseCliArgs } from '@selfagency/beans-mcp';
|
|
396
533
|
|
|
397
534
|
const server = await createBeansMcpServer({
|
|
398
|
-
workspaceRoot:
|
|
399
|
-
cliPath:
|
|
535
|
+
workspaceRoot: '/path/to/workspace',
|
|
536
|
+
cliPath: 'beans', // or path to beans CLI
|
|
400
537
|
});
|
|
401
538
|
|
|
402
539
|
// Connect to stdio transport or your own transport
|
|
@@ -433,6 +570,19 @@ CLI-compatible entrypoint for launching the server.
|
|
|
433
570
|
|
|
434
571
|
Export of GraphQL schema, Zod validation schemas, and TypeScript types for Beans records and operations.
|
|
435
572
|
|
|
573
|
+
## Agent Skills (`skills-npm`, `skills.sh`)
|
|
574
|
+
|
|
575
|
+
This package ships a built-in Agent Skill under `skills/` and also publishes that skill in a format that fits the broader open skills ecosystem surfaced by [skills.sh](https://skills.sh/).
|
|
576
|
+
|
|
577
|
+
- Skill path in package: `skills/beans-mcp/SKILL.md`
|
|
578
|
+
- Published skill artifact: `https://beans-mcp.self.agency/.well-known/agent-skills/beans-mcp/SKILL.md`
|
|
579
|
+
- Published discovery index: `https://beans-mcp.self.agency/.well-known/agent-skills/index.json`
|
|
580
|
+
- Compatible with discovery tools that scan: `node_modules/**/skills/*/SKILL.md`
|
|
581
|
+
|
|
582
|
+
That means you can use it with npm-based workflows such as `skills-npm`, while also pointing ecosystem tooling at the published skill artifact and discovery index used by skills catalogs like `skills.sh`.
|
|
583
|
+
|
|
584
|
+
To symlink installed npm-packaged skills into your agent workspace, you can use `skills-npm` in your consuming project.
|
|
585
|
+
|
|
436
586
|
## License
|
|
437
587
|
|
|
438
588
|
MIT
|