@infinitedusky/indusk-mcp 1.4.0 → 1.4.2
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.
|
@@ -95,6 +95,7 @@ export async function extensionsEnable(projectRoot, names) {
|
|
|
95
95
|
console.info(` ${name}: enabled (built-in)`);
|
|
96
96
|
runHook(projectRoot, name, "on_init");
|
|
97
97
|
installSkill(projectRoot, name);
|
|
98
|
+
installMcpServer(projectRoot, name);
|
|
98
99
|
continue;
|
|
99
100
|
}
|
|
100
101
|
console.info(` ${name}: not found — use 'extensions add ${name} --from <source>' for third-party`);
|
|
@@ -465,6 +466,54 @@ function runHook(projectRoot, name, hook) {
|
|
|
465
466
|
console.info(` ${name}: ${hook} hook failed`);
|
|
466
467
|
}
|
|
467
468
|
}
|
|
469
|
+
function installMcpServer(projectRoot, name) {
|
|
470
|
+
const extPath = join(extensionsDir(projectRoot), `${name}.json`);
|
|
471
|
+
const manifest = loadExtension(extPath);
|
|
472
|
+
if (!manifest?.mcp_server)
|
|
473
|
+
return;
|
|
474
|
+
const mcpJsonPath = join(projectRoot, ".mcp.json");
|
|
475
|
+
let mcpConfig = {};
|
|
476
|
+
if (existsSync(mcpJsonPath)) {
|
|
477
|
+
try {
|
|
478
|
+
mcpConfig = JSON.parse(readFileSync(mcpJsonPath, "utf-8"));
|
|
479
|
+
}
|
|
480
|
+
catch {
|
|
481
|
+
mcpConfig = {};
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
if (!mcpConfig.mcpServers)
|
|
485
|
+
mcpConfig.mcpServers = {};
|
|
486
|
+
if (mcpConfig.mcpServers[name]) {
|
|
487
|
+
console.info(` ${name}: .mcp.json entry already exists`);
|
|
488
|
+
}
|
|
489
|
+
else {
|
|
490
|
+
const serverConfig = {};
|
|
491
|
+
const srv = manifest.mcp_server;
|
|
492
|
+
if (srv.type)
|
|
493
|
+
serverConfig.type = srv.type;
|
|
494
|
+
if (srv.url)
|
|
495
|
+
serverConfig.url = srv.url;
|
|
496
|
+
if (srv.command)
|
|
497
|
+
serverConfig.command = srv.command;
|
|
498
|
+
if (srv.args)
|
|
499
|
+
serverConfig.args = srv.args;
|
|
500
|
+
if (srv.headers)
|
|
501
|
+
serverConfig.headers = srv.headers;
|
|
502
|
+
if (srv.env)
|
|
503
|
+
serverConfig.env = srv.env;
|
|
504
|
+
mcpConfig.mcpServers[name] = serverConfig;
|
|
505
|
+
writeFileSync(mcpJsonPath, JSON.stringify(mcpConfig, null, "\t") + "\n");
|
|
506
|
+
console.info(` ${name}: added to .mcp.json`);
|
|
507
|
+
}
|
|
508
|
+
// Print setup instructions if any
|
|
509
|
+
if (manifest.mcp_server.setup_instructions) {
|
|
510
|
+
console.info(`\n Setup required for ${name}:`);
|
|
511
|
+
for (const instruction of manifest.mcp_server.setup_instructions) {
|
|
512
|
+
console.info(` ${instruction}`);
|
|
513
|
+
}
|
|
514
|
+
console.info("");
|
|
515
|
+
}
|
|
516
|
+
}
|
|
468
517
|
function installSkill(projectRoot, name) {
|
|
469
518
|
const extPath = join(extensionsDir(projectRoot), `${name}.json`);
|
|
470
519
|
const manifest = loadExtension(extPath);
|
|
@@ -45,6 +45,16 @@ export interface ExtensionManifest {
|
|
|
45
45
|
on_onboard?: string;
|
|
46
46
|
};
|
|
47
47
|
detect?: DetectRule;
|
|
48
|
+
mcp_server?: {
|
|
49
|
+
type?: string;
|
|
50
|
+
url?: string;
|
|
51
|
+
command?: string;
|
|
52
|
+
args?: string[];
|
|
53
|
+
headers?: Record<string, string>;
|
|
54
|
+
env?: Record<string, string>;
|
|
55
|
+
env_from_shell?: string[];
|
|
56
|
+
setup_instructions?: string[];
|
|
57
|
+
};
|
|
48
58
|
}
|
|
49
59
|
export interface LoadedExtension {
|
|
50
60
|
manifest: ExtensionManifest;
|
|
@@ -1,17 +1,35 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dash0",
|
|
3
|
-
"description": "Dash0 observability — query logs, traces, and metrics from your OpenTelemetry data via MCP",
|
|
3
|
+
"description": "Dash0 observability — query logs, traces, and metrics from your OpenTelemetry data via MCP and CLI",
|
|
4
4
|
"provides": {
|
|
5
5
|
"skill": true,
|
|
6
6
|
"health_checks": [
|
|
7
7
|
{
|
|
8
8
|
"name": "dash0-mcp-configured",
|
|
9
9
|
"command": "node -e \"const m=JSON.parse(require('fs').readFileSync('.mcp.json','utf-8'));process.exit(m.mcpServers?.dash0 ? 0 : 1)\""
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"name": "dash0-cli-installed",
|
|
13
|
+
"command": "dash0 version --agent-mode"
|
|
10
14
|
}
|
|
11
15
|
]
|
|
12
16
|
},
|
|
17
|
+
"mcp_server": {
|
|
18
|
+
"type": "streamableHttp",
|
|
19
|
+
"url": "DASH0_ENDPOINT_MCP",
|
|
20
|
+
"headers": {
|
|
21
|
+
"Authorization": "Bearer DASH0_AUTH_TOKEN"
|
|
22
|
+
},
|
|
23
|
+
"setup_instructions": [
|
|
24
|
+
"1. Log into Dash0 > Organization Settings > Endpoints > MCP to get your endpoint URL",
|
|
25
|
+
"2. Create an auth token at Organization Settings > Auth Tokens",
|
|
26
|
+
"3. Edit .mcp.json: replace DASH0_ENDPOINT_MCP with your regional endpoint URL",
|
|
27
|
+
"4. Edit .mcp.json: replace DASH0_AUTH_TOKEN with your token",
|
|
28
|
+
"5. Optional: install CLI with 'brew install dash0hq/dash0-cli/dash0'"
|
|
29
|
+
]
|
|
30
|
+
},
|
|
13
31
|
"hooks": {
|
|
14
|
-
"
|
|
32
|
+
"on_enable": "echo 'Dash0 extension enabled.'"
|
|
15
33
|
},
|
|
16
34
|
"detect": {
|
|
17
35
|
"mcp_server": "dash0"
|
|
@@ -1,6 +1,25 @@
|
|
|
1
1
|
# Dash0 Observability
|
|
2
2
|
|
|
3
|
-
Dash0 provides access to your OpenTelemetry data — logs, traces, and metrics —
|
|
3
|
+
Dash0 provides access to your OpenTelemetry data — logs, traces, and metrics — via two interfaces: the MCP server (for in-session tool calls) and the CLI (for terminal operations and agent mode).
|
|
4
|
+
|
|
5
|
+
## Two Interfaces
|
|
6
|
+
|
|
7
|
+
**MCP Server (remote, streamable HTTP — NOT an npm package):**
|
|
8
|
+
- This is a remote server hosted by Dash0, not a local npm package. No `npx`, no `npm install`.
|
|
9
|
+
- Used by Claude Code tools directly during sessions
|
|
10
|
+
- Provides 23 tools for logs, traces, metrics, services
|
|
11
|
+
- Configured in `.mcp.json` with a URL and auth token
|
|
12
|
+
|
|
13
|
+
**CLI (`dash0` binary):**
|
|
14
|
+
- Installed via `brew install dash0hq/dash0-cli/dash0`
|
|
15
|
+
- Auto-detects Claude Code and enables agent mode (JSON output, no prompts)
|
|
16
|
+
- Use for: log queries, trace lookups, PromQL metrics, dashboard management, asset deployment
|
|
17
|
+
- Key commands:
|
|
18
|
+
- `dash0 logs query` — search logs
|
|
19
|
+
- `dash0 traces get <trace-id>` — fetch trace details
|
|
20
|
+
- `dash0 metrics instant --query 'sum(...)'` — PromQL queries
|
|
21
|
+
- `dash0 dashboards list` — view dashboards
|
|
22
|
+
- `dash0 apply -f assets.yaml` — deploy dashboards, views, checks (GitOps)
|
|
4
23
|
|
|
5
24
|
## When to Use Dash0
|
|
6
25
|
|
|
@@ -9,41 +28,52 @@ Dash0 provides access to your OpenTelemetry data — logs, traces, and metrics
|
|
|
9
28
|
- **Performance investigation**: query metrics (PromQL) to check latency, throughput, error rates
|
|
10
29
|
- **Deployment verification**: check traces and error rates after deploying a change
|
|
11
30
|
- **During /work verification**: if a verification step involves checking service health, query Dash0
|
|
31
|
+
- **Dashboard management**: use the CLI to create/update dashboards from YAML definitions
|
|
12
32
|
|
|
13
|
-
##
|
|
33
|
+
## When to Use MCP vs CLI
|
|
14
34
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
|
18
|
-
|
|
19
|
-
|
|
|
20
|
-
|
|
|
21
|
-
|
|
|
22
|
-
|
|
|
23
|
-
| Get trace details
|
|
35
|
+
| Task | Use |
|
|
36
|
+
|------|-----|
|
|
37
|
+
| Query logs during a session | MCP tools |
|
|
38
|
+
| Search traces by service or ID | MCP tools |
|
|
39
|
+
| Run PromQL metrics query | Either — MCP for simple, CLI for complex |
|
|
40
|
+
| Deploy dashboard from YAML | CLI (`dash0 apply -f`) |
|
|
41
|
+
| Diagnose a failing service | MCP tools (faster, in-session) |
|
|
42
|
+
| CI/CD observability checks | CLI (scriptable, agent mode) |
|
|
43
|
+
| Get trace details for debugging | Either |
|
|
24
44
|
|
|
25
45
|
## Setup
|
|
26
46
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
47
|
+
### MCP Server (enabled automatically by `extensions enable dash0`)
|
|
48
|
+
|
|
49
|
+
**Important:** The Dash0 MCP server is a remote hosted service, not an npm package. Do not use `npx` or install anything for the MCP server. You only need a URL and an auth token.
|
|
50
|
+
|
|
51
|
+
The `.mcp.json` entry is added when you enable the extension:
|
|
30
52
|
|
|
31
53
|
```json
|
|
32
|
-
{
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"env": {
|
|
38
|
-
"DASH0_API_TOKEN": "your-token-here",
|
|
39
|
-
"DASH0_DATASET": "default"
|
|
40
|
-
}
|
|
41
|
-
}
|
|
54
|
+
"dash0": {
|
|
55
|
+
"type": "streamableHttp",
|
|
56
|
+
"url": "YOUR_ENDPOINT_URL",
|
|
57
|
+
"headers": {
|
|
58
|
+
"Authorization": "Bearer YOUR_AUTH_TOKEN"
|
|
42
59
|
}
|
|
43
60
|
}
|
|
44
61
|
```
|
|
45
62
|
|
|
46
|
-
|
|
63
|
+
Get your endpoint URL and auth token from Dash0: Organization Settings > Endpoints > MCP, and Organization Settings > Auth Tokens.
|
|
64
|
+
|
|
65
|
+
### CLI
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
brew tap dash0hq/dash0-cli https://github.com/dash0hq/dash0-cli
|
|
69
|
+
brew install dash0hq/dash0-cli/dash0
|
|
70
|
+
|
|
71
|
+
dash0 config profiles create dev \
|
|
72
|
+
--api-url https://api.us-west-2.aws.dash0.com \
|
|
73
|
+
--auth-token YOUR_AUTH_TOKEN
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
The CLI auto-detects Claude Code sessions and switches to agent mode (JSON output, no confirmation prompts, structured errors on stderr).
|
|
47
77
|
|
|
48
78
|
## Workflow Integration
|
|
49
79
|
|
package/package.json
CHANGED
package/skills/toolbelt.md
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
# InDusk Toolbelt
|
|
2
2
|
|
|
3
|
-
You have MCP tools from
|
|
3
|
+
You have MCP tools from multiple servers. This skill tells you when to use them and how they connect.
|
|
4
|
+
|
|
5
|
+
## MCP Server Types
|
|
6
|
+
|
|
7
|
+
There are two types of MCP servers in your `.mcp.json`:
|
|
8
|
+
|
|
9
|
+
**Command-based** (`"command": "..."`) — a local process that runs on your machine. Examples: indusk, codegraphcontext. These start when Claude Code starts and communicate via stdio.
|
|
10
|
+
|
|
11
|
+
**Streamable HTTP** (`"type": "streamableHttp"`) — a remote server hosted externally. Example: Dash0. These connect over HTTPS to a URL. No local process, no npm package, no `npx`. They just need a URL and auth credentials in `.mcp.json`.
|
|
12
|
+
|
|
13
|
+
Both types expose tools the same way — you call them identically. The difference is where they run.
|
|
14
|
+
|
|
15
|
+
To see which MCP servers and extensions are active, call `extensions_status`.
|
|
4
16
|
|
|
5
17
|
## How the Skills Work Together
|
|
6
18
|
|