@mushi-mushi/mcp 0.13.0 → 0.14.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 +31 -0
- package/dist/catalog.d.ts +69 -0
- package/dist/catalog.js +14 -0
- package/dist/chunk-QWZEQYCN.js +595 -0
- package/dist/index.js +536 -20
- package/dist/server.d.ts +54 -0
- package/dist/server.js +1715 -0
- package/package.json +26 -14
- package/dist/index.d.ts +0 -2
package/README.md
CHANGED
|
@@ -132,6 +132,15 @@ The endpoint accepts JSON-RPC 2.0 over POST (returns `application/json` or `text
|
|
|
132
132
|
| `get_knowledge_graph` | Traverse the knowledge graph from a seed component or page |
|
|
133
133
|
| `setup_check` | The 4 **dispatch-readiness** checks (GitHub repo, codebase indexed, Anthropic key, autofix enabled) — run before `dispatch_fix` |
|
|
134
134
|
| `ingest_setup_check` | The 4 **required ingest** checks (project, active API key, SDK heartbeat, first report) + `last_sdk_seen_at` diagnostics — run after wiring env vars to confirm the SDK is reporting |
|
|
135
|
+
| `get_activation_status` | Unified setup posture for the active project — required steps, SDK heartbeat, dispatch preflight, and the next best action. Run first when a user says setup is broken |
|
|
136
|
+
| `get_reporter_thread` | Unified report timeline — the reporter/admin comment thread (including verify/reopen signals) plus fix, QA, and status lanes. Use when triaging whether an end user still sees a bug as unfixed |
|
|
137
|
+
| `list_projects` | Discover all Mushi projects accessible to this API key. Returns project id, name, and created date |
|
|
138
|
+
| `get_project_context` | Rich context snapshot: SDK heartbeat, ingest status, autofix readiness, and open report counts |
|
|
139
|
+
| `get_pipeline_logs` | Recent log entries from fix-worker, pipeline, and QA story runner — filterable by service, level, time, and limit |
|
|
140
|
+
| `get_report_evidence` | Focused evidence package for a report: screenshot URL, console logs, network excerpts, environment, and user comments (lighter than `get_report_detail`) |
|
|
141
|
+
| `triage_issue` | **Primary triage entry point** — combines report detail, evidence, similar bugs, fix context, blast radius, pipeline logs, and recommended next actions in one packet |
|
|
142
|
+
| `query_lessons` | Token-budget retrieval of relevant learning rules for a code diff |
|
|
143
|
+
| `list_lessons` | List promoted learning rules (lessons) for the current project |
|
|
135
144
|
|
|
136
145
|
### Write / agentic
|
|
137
146
|
|
|
@@ -360,6 +369,28 @@ Rebuild the package (`pnpm --filter @mushi-mushi/mcp build`) after any MCP sourc
|
|
|
360
369
|
|
|
361
370
|
In Cursor chat, type `/` — you should see the Mushi Mushi slash-prompts (`/summarize_report_for_fix`, `/explain_judge_result`, `/triage_next_steps`). Or ask the agent directly: _"Use the Mushi MCP to list my recent reports"_. If scope is wrong you'll see the `[INSUFFICIENT_SCOPE]` error text verbatim — rotate the key with the right scope and retry.
|
|
362
371
|
|
|
372
|
+
## Debug MCP logs in Cursor
|
|
373
|
+
|
|
374
|
+
If tools are not showing up or returning unexpected errors:
|
|
375
|
+
|
|
376
|
+
1. **Check the Cursor MCP logs**: Cursor → Help → Toggle Developer Tools → Console. Filter by `mushi`.
|
|
377
|
+
2. **Verify the server started**: In the MCP panel (Cursor → Settings → MCP), look for a green dot next to the Mushi server.
|
|
378
|
+
3. **Check scope errors**: A `INSUFFICIENT_SCOPE` response means your API key lacks the required scope — mint a new key with `mcp:read` (or `mcp:write` for mutating tools).
|
|
379
|
+
4. **Run the health check**: `/test-mushi-mcp` command or call `list_projects` — a clean response confirms auth is working.
|
|
380
|
+
5. **Restart Cursor**: After changing environment variables or `mcp.json`, restart Cursor to pick up the new config.
|
|
381
|
+
|
|
382
|
+
## Mushi vs Sentry MCP
|
|
383
|
+
|
|
384
|
+
| | Sentry MCP | Mushi MCP |
|
|
385
|
+
|--|-----------|-----------|
|
|
386
|
+
| Signal source | Thrown exceptions | User-felt bugs (rage-click, console errors, network failures flagged by real users) |
|
|
387
|
+
| Evidence | Stack traces, breadcrumbs | Screenshots, console logs, network excerpts, user comments, replay pointers |
|
|
388
|
+
| Triage tool | `sentry_get_issue` | `triage_issue` (evidence + similar bugs + blast radius + logs + recommended actions) |
|
|
389
|
+
| Fix dispatch | — | `dispatch_fix` → draft GitHub PR → human review |
|
|
390
|
+
| QA coverage | — | QA story runner, PDCA improvement loop |
|
|
391
|
+
|
|
392
|
+
Both are complementary — use Sentry for exception noise, Mushi for "the user says it's broken" signal.
|
|
393
|
+
|
|
363
394
|
## See also
|
|
364
395
|
|
|
365
396
|
- [V5.3 whitepaper §2.10](../../MushiMushi_Whitepaper_V5.md) — the agentic fix architecture this server feeds into.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FILE: packages/mcp/src/catalog.ts
|
|
3
|
+
* PURPOSE: Single source of truth for the MCP tool catalog — names, titles,
|
|
4
|
+
* descriptions, annotation hints, and short "use case" strings.
|
|
5
|
+
*
|
|
6
|
+
* Extracted into its own module so two consumers can share it:
|
|
7
|
+
* • `server.ts` — feeds `title`, `annotations`, and `description`
|
|
8
|
+
* into `registerTool()` so MCP clients (Cursor, Claude Desktop)
|
|
9
|
+
* render a proper UI and auto-approve read-only calls.
|
|
10
|
+
* • The admin `/mcp` page — renders the same catalog visually so
|
|
11
|
+
* humans see exactly what an agent can do with a given API key
|
|
12
|
+
* scope, without having to crack open the README.
|
|
13
|
+
*
|
|
14
|
+
* Because the admin imports from this package (via a type-only
|
|
15
|
+
* import), anything we add here shows up in both places on the
|
|
16
|
+
* next build. Don't fork the list in two.
|
|
17
|
+
*/
|
|
18
|
+
/** Raw-scope vocabulary — must match the CHECK constraint in migration 20260421003000. */
|
|
19
|
+
type McpScope = 'mcp:read' | 'mcp:write';
|
|
20
|
+
/** Set of all defined scopes — convenient default when no caller restricts. */
|
|
21
|
+
declare const ALL_SCOPES: readonly McpScope[];
|
|
22
|
+
/** How a client should treat a tool. Maps 1:1 to MCP `annotations`. */
|
|
23
|
+
interface ToolHints {
|
|
24
|
+
/** Read-only tool — clients MAY auto-approve. */
|
|
25
|
+
readOnly: boolean;
|
|
26
|
+
/** Performs a destructive operation (delete, dismiss). Only meaningful when !readOnly. */
|
|
27
|
+
destructive?: boolean;
|
|
28
|
+
/** Running the tool twice with the same args has the same effect. */
|
|
29
|
+
idempotent?: boolean;
|
|
30
|
+
/** Tool interacts with an external system whose state can change (the Mushi API). */
|
|
31
|
+
openWorld?: boolean;
|
|
32
|
+
}
|
|
33
|
+
interface ToolSpec {
|
|
34
|
+
/** Machine name — matches `tools/list` and `tools/call`. Stable contract. */
|
|
35
|
+
name: string;
|
|
36
|
+
/** Human-readable title surfaced in MCP clients + the /mcp admin page. */
|
|
37
|
+
title: string;
|
|
38
|
+
/** One-paragraph description for the LLM. Explains when to call the tool. */
|
|
39
|
+
description: string;
|
|
40
|
+
/** Scope required to call the tool — gates UI rendering and server auth. */
|
|
41
|
+
scope: McpScope;
|
|
42
|
+
/** MCP annotation hints. */
|
|
43
|
+
hints: ToolHints;
|
|
44
|
+
/**
|
|
45
|
+
* One-liner that tells a human "what problem does calling this tool solve?".
|
|
46
|
+
* Shown on the admin /mcp catalog cards — should be end-user-shaped, not
|
|
47
|
+
* engineer-shaped ("What should I fix next?" not "GET /v1/admin/reports").
|
|
48
|
+
*/
|
|
49
|
+
useCase: string;
|
|
50
|
+
}
|
|
51
|
+
declare const TOOL_CATALOG: ToolSpec[];
|
|
52
|
+
interface ResourceSpec {
|
|
53
|
+
name: string;
|
|
54
|
+
uri: string;
|
|
55
|
+
title: string;
|
|
56
|
+
description: string;
|
|
57
|
+
scope: McpScope;
|
|
58
|
+
}
|
|
59
|
+
declare const RESOURCE_CATALOG: ResourceSpec[];
|
|
60
|
+
interface PromptSpec {
|
|
61
|
+
name: string;
|
|
62
|
+
title: string;
|
|
63
|
+
description: string;
|
|
64
|
+
useCase: string;
|
|
65
|
+
}
|
|
66
|
+
declare const PROMPT_CATALOG: PromptSpec[];
|
|
67
|
+
declare const TDD_TOOL_CATALOG: ToolSpec[];
|
|
68
|
+
|
|
69
|
+
export { ALL_SCOPES, type McpScope, PROMPT_CATALOG, type PromptSpec, RESOURCE_CATALOG, type ResourceSpec, TDD_TOOL_CATALOG, TOOL_CATALOG, type ToolHints, type ToolSpec };
|
package/dist/catalog.js
ADDED