@havesomecode/kibana-mcp-server 1.4.0 → 1.4.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 +7 -0
- package/dist/src/mcp_entry.js +1 -4
- package/package.json +6 -2
- package/plugins/kibana-log-investigation/.mcp.json +3 -2
- package/plugins/kibana-log-investigation/dist/LICENSE +21 -0
- package/plugins/kibana-log-investigation/dist/THIRD_PARTY_NOTICES.md +617 -0
- package/plugins/kibana-log-investigation/dist/mcp_entry.mjs +32046 -0
- package/plugins/kibana-log-investigation/dist/mcp_entry.mjs.LEGAL.txt +8 -0
- package/plugins/kibana-log-investigation/mcp-launcher.mjs +26 -0
- package/plugins/kibana-log-investigation/skills/ensure-node-runtime/SKILL.md +118 -0
- package/plugins/kibana-log-investigation/skills/install-and-configure/SKILL.md +55 -0
- package/skills/kibana-log-investigation/SKILL.md +12 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { existsSync } from "node:fs";
|
|
4
|
+
|
|
5
|
+
const bundle = new URL("./dist/mcp_entry.mjs", import.meta.url);
|
|
6
|
+
|
|
7
|
+
if (Number(process.versions.node.split(".")[0]) < 22) {
|
|
8
|
+
console.error("Kibana MCP requires Node.js 22 or newer. Update Node.js before restarting Codex.");
|
|
9
|
+
process.exitCode = 1;
|
|
10
|
+
} else if (!existsSync(bundle)) {
|
|
11
|
+
console.error(
|
|
12
|
+
"Kibana MCP plugin runtime is missing. Run npm ci and npm run build in the source checkout, " +
|
|
13
|
+
"then reinstall the built plugin into Codex. Opening another discussion cannot repair this installation.",
|
|
14
|
+
);
|
|
15
|
+
process.exitCode = 1;
|
|
16
|
+
} else {
|
|
17
|
+
try {
|
|
18
|
+
await import(bundle.href);
|
|
19
|
+
} catch (error) {
|
|
20
|
+
const code = typeof error?.code === "string" ? error.code : "STARTUP_ERROR";
|
|
21
|
+
console.error(
|
|
22
|
+
`Kibana MCP plugin could not load (${code}). Rebuild and reinstall the plugin; inspect sanitized startup stderr if the failure persists. Do not share credentials.`,
|
|
23
|
+
);
|
|
24
|
+
process.exitCode = 1;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ensure-node-runtime
|
|
3
|
+
description: Ensure Node.js 22+ is available for this repo using a user-level install path on Windows, macOS, or Linux.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Ensure Node Runtime
|
|
7
|
+
|
|
8
|
+
Use this skill when the repository has been cloned locally and Codex needs to make sure Node.js is available before building or running the Kibana MCP server.
|
|
9
|
+
|
|
10
|
+
This skill prefers user-level installation paths and avoids system-wide package installs.
|
|
11
|
+
|
|
12
|
+
## Goals
|
|
13
|
+
|
|
14
|
+
- detect whether `node` and `npm` are already usable
|
|
15
|
+
- install Node.js 22+ at user scope when missing
|
|
16
|
+
- choose commands based on the current operating system and shell
|
|
17
|
+
- verify the runtime before continuing with repo setup
|
|
18
|
+
|
|
19
|
+
## Detection
|
|
20
|
+
|
|
21
|
+
1. Check whether `node` and `npm` are already present:
|
|
22
|
+
- `node --version`
|
|
23
|
+
- `npm --version`
|
|
24
|
+
2. If `node` is present and major version is `22` or newer, stop here.
|
|
25
|
+
3. Otherwise install a user-level Node version manager, then install Node.js `22`.
|
|
26
|
+
|
|
27
|
+
## Preferred cross-platform strategy
|
|
28
|
+
|
|
29
|
+
Use `fnm` as the default version manager because it works on Windows, macOS, and Linux and supports shell auto-configuration.
|
|
30
|
+
|
|
31
|
+
The repo pins the desired major in `.node-version`, so after `fnm` is installed you can use either:
|
|
32
|
+
|
|
33
|
+
- `fnm install 22 && fnm default 22`
|
|
34
|
+
- or `fnm use --install-if-missing`
|
|
35
|
+
|
|
36
|
+
## Windows
|
|
37
|
+
|
|
38
|
+
Prefer a PowerShell-first install path.
|
|
39
|
+
|
|
40
|
+
Use `winget` when it is available. If it is blocked or unavailable, fall back to the official `fnm` release binary extracted into the user's home directory.
|
|
41
|
+
|
|
42
|
+
Reference basis:
|
|
43
|
+
|
|
44
|
+
- `fnm` officially documents Windows installation via `winget`
|
|
45
|
+
- `fnm` also supports installation from a release binary on Windows
|
|
46
|
+
- PowerShell profile setup is the standard way to enable `fnm` in Windows shells
|
|
47
|
+
|
|
48
|
+
### Recommended flow
|
|
49
|
+
|
|
50
|
+
1. If `fnm` already exists, skip to Node installation.
|
|
51
|
+
2. If `winget` is available:
|
|
52
|
+
- `winget install Schniz.fnm`
|
|
53
|
+
3. If `winget` is not available or is blocked:
|
|
54
|
+
- download the latest Windows `fnm` release binary from the official GitHub releases page
|
|
55
|
+
- extract it into a user-level directory such as `%USERPROFILE%\\.local\\bin\\fnm` or `%USERPROFILE%\\.fnm\\bin`
|
|
56
|
+
- add that directory to the user PATH in PowerShell
|
|
57
|
+
4. Configure the current PowerShell session:
|
|
58
|
+
- `fnm env --use-on-cd --shell powershell | Out-String | Invoke-Expression`
|
|
59
|
+
5. Persist shell integration for future PowerShell sessions:
|
|
60
|
+
- create `$PROFILE` if needed
|
|
61
|
+
- append `fnm env --use-on-cd --shell powershell | Out-String | Invoke-Expression` to `$PROFILE` if it is not already present
|
|
62
|
+
6. Install and select Node.js 22:
|
|
63
|
+
- `fnm install 22`
|
|
64
|
+
- `fnm default 22`
|
|
65
|
+
|
|
66
|
+
## macOS
|
|
67
|
+
|
|
68
|
+
Prefer a user-level `fnm` install using the official install script.
|
|
69
|
+
|
|
70
|
+
### Recommended flow
|
|
71
|
+
|
|
72
|
+
1. If `fnm` is missing:
|
|
73
|
+
- `curl -fsSL https://fnm.vercel.app/install | bash`
|
|
74
|
+
2. Configure the current shell:
|
|
75
|
+
- bash/zsh: `eval "$(fnm env --use-on-cd)"`
|
|
76
|
+
- fish: `fnm env --use-on-cd | source`
|
|
77
|
+
3. Persist shell integration:
|
|
78
|
+
- bash: add `eval "$(fnm env --use-on-cd)"` to `~/.bashrc`
|
|
79
|
+
- zsh: add `eval "$(fnm env --use-on-cd)"` to `~/.zshrc`
|
|
80
|
+
- fish: add `fnm env --use-on-cd | source` to `~/.config/fish/config.fish`
|
|
81
|
+
4. Install and select Node.js 22:
|
|
82
|
+
- `fnm install 22`
|
|
83
|
+
- `fnm default 22`
|
|
84
|
+
|
|
85
|
+
## Linux
|
|
86
|
+
|
|
87
|
+
Use the same user-level `fnm` flow as macOS.
|
|
88
|
+
|
|
89
|
+
### Recommended flow
|
|
90
|
+
|
|
91
|
+
1. If `fnm` is missing:
|
|
92
|
+
- `curl -fsSL https://fnm.vercel.app/install | bash`
|
|
93
|
+
2. Configure and persist shell integration for the active shell:
|
|
94
|
+
- bash: `eval "$(fnm env --use-on-cd)"` plus `~/.bashrc`
|
|
95
|
+
- zsh: `eval "$(fnm env --use-on-cd)"` plus `~/.zshrc`
|
|
96
|
+
- fish: `fnm env --use-on-cd | source` plus `~/.config/fish/config.fish`
|
|
97
|
+
3. Install and select Node.js 22:
|
|
98
|
+
- `fnm install 22`
|
|
99
|
+
- `fnm default 22`
|
|
100
|
+
|
|
101
|
+
## Verification
|
|
102
|
+
|
|
103
|
+
After installation, verify all of:
|
|
104
|
+
|
|
105
|
+
- `fnm --version`
|
|
106
|
+
- `node --version`
|
|
107
|
+
- `npm --version`
|
|
108
|
+
|
|
109
|
+
The resulting `node --version` must report major `22` or higher.
|
|
110
|
+
|
|
111
|
+
## Notes
|
|
112
|
+
|
|
113
|
+
- Prefer user-level installs over admin installs.
|
|
114
|
+
- On Windows, prefer PowerShell-native flows and avoid assuming Scoop is available.
|
|
115
|
+
- If the current shell cannot pick up the new PATH cleanly, restart the terminal or restart Codex after installation.
|
|
116
|
+
- Once Node is available, continue with:
|
|
117
|
+
- `npm install`
|
|
118
|
+
- `npm run build`
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: install-and-configure
|
|
3
|
+
description: Install the repo plugin with connection-only bootstrap.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Install and Configure
|
|
7
|
+
|
|
8
|
+
Use this skill only when the repository has been cloned locally and Codex needs the repo-scoped plugin. For public installs, use the canonical `skills/kibana-log-investigation` skill and the published npm package instead.
|
|
9
|
+
|
|
10
|
+
## Version-matched README handoff
|
|
11
|
+
|
|
12
|
+
Resolve the selected branch or tag to the full installation commit SHA before following installation instructions. Read the README at this immutable URL:
|
|
13
|
+
|
|
14
|
+
```text
|
|
15
|
+
https://raw.githubusercontent.com/Havesomecode/kibana-mcp-server/<resolved-commit>/README.md
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Branch and tag names are resolution inputs, not final handoff URLs. Use `INSTALL.md` and skills from the same resolved installation commit. Do not infer a Git tag from an npm version or silently fall back to master. Detached installs use `git rev-parse HEAD`'s full commit SHA.
|
|
19
|
+
|
|
20
|
+
From a maintained repository root containing the helper, run `node scripts/readme-handoff.mjs <resolved-installation-ref>`. Include its verified `url` and `commit` in agent handoffs. The helper resolves local refs and verifies the downloaded README against the selected Git object. Unknown refs, missing READMEs, or retrieval/content verification failures must be reported instead of presenting another version's instructions. The helper is repository-only; historical installations without it require explicit ref resolution and README retrieval verification.
|
|
21
|
+
|
|
22
|
+
## Workflow
|
|
23
|
+
|
|
24
|
+
1. Ensure Node.js 22+ is available. Use `ensure-node-runtime` when needed.
|
|
25
|
+
2. From the repository root:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
npm install
|
|
29
|
+
npm run build
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
3. Confirm the build produced `plugins/kibana-log-investigation/dist/mcp_entry.mjs`. Install `Kibana Log Investigation` from the repo-local Codex marketplace only after building. The built plugin includes runtime dependencies and launches from its installed directory, not the checkout.
|
|
33
|
+
4. Restart Codex if the plugin directory does not refresh automatically.
|
|
34
|
+
5. Resolve the Kibana connection through `KIBANA_BASE_URL`, `KIBANA_USERNAME`, and `KIBANA_PASSWORD`, or safe CLI alternatives.
|
|
35
|
+
6. Bootstrap only the connection, without registering a duplicate global MCP:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
node dist/src/bin/kibana-mcp-server.js bootstrap --client none
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
7. Confirm bootstrap reports an empty source catalog. It must not inspect or configure indexes.
|
|
42
|
+
8. In a fresh Codex session, call `discover`. When it reports no sources, ask the operator which exact index or index pattern to configure.
|
|
43
|
+
9. Only after the operator answers, call `configure_index` with exactly that value. Then run `discover` again.
|
|
44
|
+
|
|
45
|
+
## Rules
|
|
46
|
+
|
|
47
|
+
- Do not edit client configuration files.
|
|
48
|
+
- Separate saved configuration, process startup, tools in the current discussion, and real backend access. If startup fails, inspect sanitized stderr and repair/reinstall the plugin before requesting another discussion. Run `npm run verify:entrypoint` for the isolated packaged-plugin handshake; it is not a native Codex or real-backend check.
|
|
49
|
+
- Do not use the bundled example catalog unless the operator explicitly requests example data.
|
|
50
|
+
- Do not put passwords in command arguments or summaries.
|
|
51
|
+
- Do not guess, enumerate, scan, or auto-select Kibana indexes.
|
|
52
|
+
- Do not call `configure_index` until the operator explicitly names the index or pattern.
|
|
53
|
+
- Use `--profile NAME` for additional environments.
|
|
54
|
+
- Use `serve --profile NAME` when invoking a non-default profile outside the repo plugin.
|
|
55
|
+
- `KIBANA_BASE_URL` is a base prefix. Do not append `/internal/search/es`.
|
|
@@ -7,6 +7,18 @@ description: Bootstrap and use the Kibana log investigation MCP safely.
|
|
|
7
7
|
|
|
8
8
|
Use this skill when an operator wants to install, configure, or use the read-only Kibana MCP server from `@havesomecode/kibana-mcp-server`.
|
|
9
9
|
|
|
10
|
+
## Version-matched installation instructions
|
|
11
|
+
|
|
12
|
+
Before installing or generating a handoff, resolve the selected branch, tag, or package metadata to the full installation commit SHA. Read `README.md` at this immutable URL:
|
|
13
|
+
|
|
14
|
+
```text
|
|
15
|
+
https://raw.githubusercontent.com/Havesomecode/kibana-mcp-server/<resolved-commit>/README.md
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Branch and tag names are resolution inputs, not final handoff URLs. Read `INSTALL.md` and skills from the same resolved installation commit. Do not infer a Git tag from an npm version. Resolve the exact npm package's `gitHead` instead, or report missing metadata; pin the package installation to the same exact version. Never silently fall back to master if the ref or README is missing or retrieval fails.
|
|
19
|
+
|
|
20
|
+
In a maintained clone with the repository-only helper, run `node scripts/readme-handoff.mjs <resolved-installation-ref>` and use its verified `url` and `commit` in the handoff. The helper checks the retrieved README against that Git commit before output. It is not an npm command and need not exist in historical tags. If unavailable, resolve the selected ref and validate its raw README explicitly; do not invent successful retrieval. See `INSTALL.md`'s version-matched handoff section.
|
|
21
|
+
|
|
10
22
|
## Connection-only installation
|
|
11
23
|
|
|
12
24
|
Do not edit Codex, Claude Code, or other MCP configuration files by hand. Bootstrap establishes only the Kibana connection and an empty managed source catalog. It must not list, scan, infer, or configure indexes.
|