@infinitedusky/indusk-mcp 1.5.2 → 1.5.4
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.
|
@@ -78,6 +78,7 @@ export async function extensionsEnable(projectRoot, names) {
|
|
|
78
78
|
// Check if already enabled
|
|
79
79
|
if (isEnabled(projectRoot, name)) {
|
|
80
80
|
console.info(` ${name}: already enabled`);
|
|
81
|
+
printMcpSetup(projectRoot, name);
|
|
81
82
|
continue;
|
|
82
83
|
}
|
|
83
84
|
// Try to move from disabled
|
|
@@ -85,6 +86,7 @@ export async function extensionsEnable(projectRoot, names) {
|
|
|
85
86
|
console.info(` ${name}: enabled (was disabled)`);
|
|
86
87
|
runHook(projectRoot, name, "on_init");
|
|
87
88
|
installSkill(projectRoot, name);
|
|
89
|
+
printMcpSetup(projectRoot, name);
|
|
88
90
|
continue;
|
|
89
91
|
}
|
|
90
92
|
// Try to copy from built-in
|
|
@@ -96,6 +98,7 @@ export async function extensionsEnable(projectRoot, names) {
|
|
|
96
98
|
console.info(` ${name}: enabled (built-in)`);
|
|
97
99
|
runHook(projectRoot, name, "on_init");
|
|
98
100
|
installSkill(projectRoot, name);
|
|
101
|
+
printMcpSetup(projectRoot, name);
|
|
99
102
|
continue;
|
|
100
103
|
}
|
|
101
104
|
console.info(` ${name}: not found — use 'extensions add ${name} --from <source>' for third-party`);
|
|
@@ -480,6 +483,56 @@ function runHook(projectRoot, name, hook) {
|
|
|
480
483
|
console.info(` ${name}: ${hook} hook failed`);
|
|
481
484
|
}
|
|
482
485
|
}
|
|
486
|
+
function printMcpSetup(projectRoot, name) {
|
|
487
|
+
const manifestPath = resolveManifestPath(extensionsDir(projectRoot), name);
|
|
488
|
+
if (!manifestPath) {
|
|
489
|
+
// Try built-in
|
|
490
|
+
const builtinPath = join(builtinDir, name, "manifest.json");
|
|
491
|
+
if (!existsSync(builtinPath))
|
|
492
|
+
return;
|
|
493
|
+
const manifest = loadExtension(builtinPath);
|
|
494
|
+
if (!manifest?.mcp_server)
|
|
495
|
+
return;
|
|
496
|
+
printMcpInstructions(name, manifest);
|
|
497
|
+
return;
|
|
498
|
+
}
|
|
499
|
+
const manifest = loadExtension(manifestPath);
|
|
500
|
+
if (!manifest?.mcp_server)
|
|
501
|
+
return;
|
|
502
|
+
printMcpInstructions(name, manifest);
|
|
503
|
+
}
|
|
504
|
+
function printMcpInstructions(name, manifest) {
|
|
505
|
+
const server = manifest.mcp_server;
|
|
506
|
+
if (!server)
|
|
507
|
+
return;
|
|
508
|
+
const needsAuth = server.headers && Object.keys(server.headers).length > 0;
|
|
509
|
+
// Auto-run claude mcp add for no-auth HTTP servers
|
|
510
|
+
if (!needsAuth && server.type === "http" && server.url) {
|
|
511
|
+
const cmd = `claude mcp add -t http -s project -- ${name} ${server.url}`;
|
|
512
|
+
console.info(`\n ${name}: adding MCP server...`);
|
|
513
|
+
try {
|
|
514
|
+
execSync(cmd, { timeout: 15000, stdio: ["ignore", "pipe", "pipe"] });
|
|
515
|
+
console.info(` ${name}: MCP server added (restart Claude Code to load)`);
|
|
516
|
+
}
|
|
517
|
+
catch {
|
|
518
|
+
console.info(` ${name}: auto-add failed. Run manually:`);
|
|
519
|
+
console.info(` ${cmd}`);
|
|
520
|
+
}
|
|
521
|
+
return;
|
|
522
|
+
}
|
|
523
|
+
// For servers needing auth, print setup instructions
|
|
524
|
+
if (server.setup_instructions?.length) {
|
|
525
|
+
console.info(`\n ${name} MCP setup:`);
|
|
526
|
+
for (const instruction of server.setup_instructions) {
|
|
527
|
+
console.info(` ${instruction}`);
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
else if (server.type === "http" && server.url) {
|
|
531
|
+
console.info(`\n ${name} MCP setup:`);
|
|
532
|
+
console.info(` claude mcp add -t http -- ${name} ${server.url}`);
|
|
533
|
+
}
|
|
534
|
+
console.info("");
|
|
535
|
+
}
|
|
483
536
|
function installSkill(projectRoot, name) {
|
|
484
537
|
const manifestPath = resolveManifestPath(extensionsDir(projectRoot), name);
|
|
485
538
|
if (!manifestPath)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "excalidraw",
|
|
3
|
+
"description": "Hand-drawn diagrams via Excalidraw MCP — conceptual sketches, architecture visuals, debug illustrations",
|
|
4
|
+
"provides": {
|
|
5
|
+
"skill": true
|
|
6
|
+
},
|
|
7
|
+
"mcp_server": {
|
|
8
|
+
"type": "http",
|
|
9
|
+
"url": "https://mcp.excalidraw.com",
|
|
10
|
+
"setup_instructions": [
|
|
11
|
+
"claude mcp add -t http -- excalidraw https://mcp.excalidraw.com"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Excalidraw — Hand-Drawn Diagrams
|
|
2
|
+
|
|
3
|
+
Excalidraw creates hand-drawn style diagrams directly in chat. Use it for quick visual communication — architecture sketches, debug illustrations, conceptual overviews.
|
|
4
|
+
|
|
5
|
+
## When to Use Excalidraw vs Mermaid
|
|
6
|
+
|
|
7
|
+
| Need | Tool | Why |
|
|
8
|
+
|------|------|-----|
|
|
9
|
+
| Architecture overview for a brief or ADR | **Excalidraw** | Conceptual, hand-drawn feel |
|
|
10
|
+
| Sequence diagram in VitePress docs | **Mermaid** | Text-based, diffs in git, renders natively |
|
|
11
|
+
| Quick sketch during debugging | **Excalidraw** | Fast, visual, natural language |
|
|
12
|
+
| Flowchart in a docs page | **Mermaid** | Version-controlled, embedded in markdown |
|
|
13
|
+
| Conceptual diagram during teach mode | **Excalidraw** | Approachable, not overly formal |
|
|
14
|
+
| Class/entity relationship for reference docs | **Mermaid** | Precise, structured, text-diffable |
|
|
15
|
+
|
|
16
|
+
**Rule of thumb:** If it goes in the docs site, use Mermaid. If it's for in-session communication, use Excalidraw.
|
|
17
|
+
|
|
18
|
+
## How to Describe Diagrams
|
|
19
|
+
|
|
20
|
+
Be specific about components, connections, and layout. The more concrete the description, the better the result.
|
|
21
|
+
|
|
22
|
+
**Good descriptions:**
|
|
23
|
+
- "Draw an architecture diagram showing game-server connected to postgres and redis, with poker-app and dealer-app connecting to game-server via WebSocket, and admin-app connecting via HTTP REST"
|
|
24
|
+
- "Sketch the data flow: user action → WebSocket → game-server → advanceHand → broadcast state → all connected clients"
|
|
25
|
+
- "Draw a box diagram showing the three layers: Next.js apps on top, game-server in the middle, database + redis at the bottom, with arrows showing the communication patterns"
|
|
26
|
+
|
|
27
|
+
**Bad descriptions:**
|
|
28
|
+
- "Draw the architecture" (too vague)
|
|
29
|
+
- "Make a diagram" (no context)
|
|
30
|
+
- "Show how it works" (which part?)
|
|
31
|
+
|
|
32
|
+
## Setup
|
|
33
|
+
|
|
34
|
+
The Excalidraw MCP server is a **remote hosted service** — no npm package, no install, no auth.
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
claude mcp add -t http -- excalidraw https://mcp.excalidraw.com
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
That's it. No tokens, no config files, no environment variables.
|
|
41
|
+
|
|
42
|
+
## When to Create Diagrams
|
|
43
|
+
|
|
44
|
+
- **During `/plan` research or brief**: sketch the proposed architecture to make it concrete
|
|
45
|
+
- **During `/work` teach mode**: visualize what a phase is building before and after
|
|
46
|
+
- **During debugging**: draw the request flow to identify where things break
|
|
47
|
+
- **During retrospective**: before/after architecture comparison
|
|
48
|
+
- **When the user asks**: "draw this", "sketch that", "visualize the flow"
|
|
49
|
+
|
|
50
|
+
## Limitations
|
|
51
|
+
|
|
52
|
+
- Diagrams are in-session only — they don't persist to files automatically
|
|
53
|
+
- No version control (unlike Mermaid text)
|
|
54
|
+
- Depends on remote server availability
|
|
55
|
+
- Quality depends on description specificity
|
package/package.json
CHANGED
package/skills/document.md
CHANGED
|
@@ -108,10 +108,26 @@ The changelog lives at `changelog.md` in the docs site. It uses [Keep a Changelo
|
|
|
108
108
|
|
|
109
109
|
The `decisions/` and `lessons/` directories are **not** populated during normal impl work. They are populated during the retrospective/archival process by the retrospective skill. Don't write to them during `/work`.
|
|
110
110
|
|
|
111
|
-
##
|
|
111
|
+
## Diagrams
|
|
112
112
|
|
|
113
113
|
**Prefer diagrams over long prose for architecture, flows, and relationships.** A well-labeled diagram communicates structure faster than paragraphs of text.
|
|
114
114
|
|
|
115
|
+
### Mermaid vs Excalidraw
|
|
116
|
+
|
|
117
|
+
Two diagram tools are available. Use the right one for the context:
|
|
118
|
+
|
|
119
|
+
| Need | Tool | Why |
|
|
120
|
+
|------|------|-----|
|
|
121
|
+
| Formal diagram in the docs site | **Mermaid** | Text-based, diffs in git, renders natively in VitePress |
|
|
122
|
+
| Conceptual sketch during a session | **Excalidraw** | Hand-drawn style, natural language input, fast |
|
|
123
|
+
| Sequence/flowchart for reference docs | **Mermaid** | Structured, precise, version-controlled |
|
|
124
|
+
| Architecture overview for a brief or ADR | **Excalidraw** | Approachable, whiteboard feel |
|
|
125
|
+
| Debug illustration | **Excalidraw** | Quick visual communication |
|
|
126
|
+
|
|
127
|
+
**Rule of thumb:** If it goes in the docs site, use Mermaid. If it's for in-session communication, use Excalidraw. If the Excalidraw extension isn't enabled, use Mermaid for everything.
|
|
128
|
+
|
|
129
|
+
## Mermaid Diagrams
|
|
130
|
+
|
|
115
131
|
### When to Use Which Diagram Type
|
|
116
132
|
|
|
117
133
|
| Scenario | Diagram Type | Example |
|
package/skills/plan.md
CHANGED
|
@@ -72,7 +72,7 @@ Workflow templates are in `templates/workflows/` in the package. They describe w
|
|
|
72
72
|
For feature/spike workflows that need new research: Explore the problem space — read code, search the web, check Context7 for library docs. **Query the code graph before scoping** (see toolbelt "Before Modifying Code") — include structural findings in research.md with concrete numbers.
|
|
73
73
|
Document what you find. The research doc records findings and analysis, but saves the recommendation for the brief.
|
|
74
74
|
|
|
75
|
-
4. **If research is done**, write the brief. This is where a direction emerges from the research. The brief proposes what we're building and why, informed by what the research uncovered. **Present the brief and have a conversation about it.** Don't just ask "does this look good?" — walk the user through it: "Here's what I'm proposing we build. Does this match what you had in mind? Is there anything missing, or anything here you don't want?" Iterate until the user is genuinely happy with the direction, then mark it as `accepted`.
|
|
75
|
+
4. **If research is done**, write the brief. This is where a direction emerges from the research. The brief proposes what we're building and why, informed by what the research uncovered. **Consider creating a visual sketch** of the proposed architecture with Excalidraw (if the extension is enabled) — a hand-drawn diagram makes the proposal concrete and easier to discuss. **Present the brief and have a conversation about it.** Don't just ask "does this look good?" — walk the user through it: "Here's what I'm proposing we build. Does this match what you had in mind? Is there anything missing, or anything here you don't want?" Iterate until the user is genuinely happy with the direction, then mark it as `accepted`.
|
|
76
76
|
|
|
77
77
|
5. **If brief is accepted** and the workflow includes an ADR (feature only), write the ADR. The ADR formalizes the decisions that were discussed during research and led to the brief. It records what was chosen, what was rejected, and why. **After the ADR is accepted**, add a one-liner to CLAUDE.md's Key Decisions section per the context skill: `- {decision summary} — see planning/{plan}/adr.md`
|
|
78
78
|
|