renovate-mcp 0.10.0 → 0.11.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 CHANGED
@@ -48,7 +48,7 @@ See [Design notes](#design-notes) for implementation details (timeouts, safety c
48
48
  - **Not a Renovate replacement.** This server doesn't open PRs, run scheduled updates, or execute in CI — it's a design-time companion for a local `renovate.json`. Use the real Renovate for the actual dependency-update pipeline.
49
49
  - **`resolve_config` is preview-quality.** Preset expansion runs against a committed snapshot, and template substitution implements only positional `{{argN}}` placeholders — non-positional tokens and Handlebars helpers are flagged in `warnings` and pass through verbatim. For authoritative output, run `dry_run`.
50
50
  - **`preview_custom_manager` is a subset of Renovate's regex manager.** It covers `customType: "regex"`, `matchStringsStrategy` of `any` / `combination` / `recursive`, and `{{groupName}}` template substitution only — other custom types and full Handlebars (helpers, conditionals) are not implemented. Use it for fast regex iteration; confirm with `dry_run`.
51
- - **`validate_config` / `dry_run` aren't exercised in CI.** CI deliberately doesn't install Renovate, so tools that shell out to it are only covered by unit/integration tests that don't require the binary. Run them locally against the Renovate install you intend to deploy with.
51
+ - **`validate_config` / `dry_run` aren't exercised end-to-end in CI.** The bundled Renovate is available (it's a runtime dep), but the integration tests use fake binaries via `RENOVATE_BIN` / `RENOVATE_CONFIG_VALIDATOR_BIN` env overrides for determinism and speed. Run the tools locally against a real config to validate behaviour.
52
52
 
53
53
  ## Requirements
54
54
 
@@ -56,11 +56,12 @@ See [Design notes](#design-notes) for implementation details (timeouts, safety c
56
56
 
57
57
  - Linux or macOS. Windows is not supported — `package.json` declares `"os": ["darwin", "linux"]`, so `npm i` surfaces an `EBADPLATFORM` warning on Windows, and the server exits with a clear stderr message at startup. Run on WSL2 or a Linux/macOS host instead.
58
58
  - Node.js ≥ 24 (aligns with Renovate's own engine requirement).
59
- - Renovate on your `PATH` — either a global install (`npm i -g renovate`) or a project-local install that exposes `renovate` + `renovate-config-validator` via `npm exec`. Only needed for `validate_config`, `dry_run`, and `write_config`; the offline tools (`read_config`, `resolve_config`, `preview_custom_manager`, `lint_config`) work without it.
59
+
60
+ Renovate ships bundled — the `renovate` package is a runtime dependency, so `validate_config`, `dry_run`, and `write_config` work out of the box with no separate install. The offline tools (`read_config`, `resolve_config`, `explain_config`, `preview_custom_manager`, `lint_config`) never spawn Renovate at all.
60
61
 
61
62
  **Optional**
62
63
 
63
- - `RENOVATE_BIN` / `RENOVATE_CONFIG_VALIDATOR_BIN` — override binary locations.
64
+ - `RENOVATE_BIN` / `RENOVATE_CONFIG_VALIDATOR_BIN` — override the bundled binaries (e.g., to point at a different Renovate install). When set, the override always wins.
64
65
  - `RENOVATE_MCP_REQUIRE_CLI=false` — suppress the startup "partial availability" notice when you only intend to use the offline tools.
65
66
  - Platform env vars — `RENOVATE_PLATFORM`, `RENOVATE_ENDPOINT`, and a token (`RENOVATE_TOKEN` / `GITHUB_TOKEN` / `GITLAB_TOKEN`). Needed for `dry_run` against a remote platform and for `resolve_config` with `externalPresets: true`. See [Platform setup](#platform-setup) for the matrix and a worked example.
66
67
  - Private-registry credentials for `dry_run` — whatever Renovate itself would need at lookup time (`COMPOSER_AUTH`, `NPM_TOKEN` / `.npmrc`, Docker registry creds, or a `RENOVATE_HOST_RULES` JSON blob). Alternatively encode these as `hostRules` in the Renovate config, or pass them per-call via the `hostRules` input on `dry_run` (no MCP restart needed). Per-call `hostRules` are appended to whatever the repo's own config declares. Values reach Renovate as JSON through the tool-call transport, so the calling LLM sees them in its context — prefer the env route if that matters. Without any of these, Renovate's lookup often returns 0 updates silently; `dry_run` scans its logs for auth failures and surfaces them under `problems`.
@@ -255,6 +256,7 @@ Secrets required on the repo: `RELEASE_PLEASE_TOKEN` (a PAT for release-please).
255
256
  Scope and non-goals are summarized in [What this is NOT](#what-this-is-not); this section covers implementation decisions behind the scope that *is* supported.
256
257
 
257
258
  - `validate_config`, `dry_run`, and `write_config` shell out to the Renovate CLI rather than importing Renovate as a library — this decouples our Node version from Renovate's (currently Node 24).
259
+ - The `renovate` package is bundled as a runtime dependency so users don't need a separate `npm i -g renovate`. We still spawn the binary as a child process (via `node node_modules/renovate/dist/renovate.js`) — never `import "renovate"` from `src/`. Resolution order is `RENOVATE_BIN` env override → bundled JS entry resolved via `require.resolve("renovate/package.json")` → bare tool name on `PATH`. The env override is the supported escape hatch when a user wants a different Renovate version.
258
260
  - `resolve_config`, `preview_custom_manager`, and `lint_config` are fully in-process and never invoke the Renovate CLI, so they work without a Renovate install.
259
261
  - `lint_config` is a semantic lint pass that sits alongside `validate_config` rather than replacing it: schema validation catches structural bugs, the linter catches Renovate-specific footguns that schema validation declares valid — most commonly a pattern like `"matchPackageNames": ["/devops\\/pipelines\\/.+"]` where a trailing `/` is missing and Renovate silently degrades the value to an exact-string match that never hits, or a typo like `"matchManagers": ["npmm"]` that silently applies the rule to zero packages. The ruleset is intentionally small (three rules: `dead-regex-missing-slash`, `unwrapped-regex`, `matchManagers-unknown-name`), scoped to the four regex-aware fields plus `matchManagers` / `excludeManagers`, and tuned to avoid false positives on benign exact strings containing a `.`. The valid-manager list is snapshotted from the `renovate` devDep at `src/data/managers.generated.ts` (regenerate with `npm run generate:managers`), and unknown names get a Damerau-Levenshtein "did you mean?" suggestion when something close enough exists. Rule IDs are stable so findings can be suppressed by callers.
260
262
  - `preview_custom_manager` honors `.gitignore` (including nested `.gitignore`s and `.git/info/exclude`) when walking the repo, so generated/vendored directories like `dist/`, `.next/`, `target/`, `__pycache__/` don't crowd out real hits against the `maxFilesWalked` cap. `node_modules/` and `.git/` are always skipped as a safety net even when no `.gitignore` is present.
@@ -274,4 +276,4 @@ Scope and non-goals are summarized in [What this is NOT](#what-this-is-not); thi
274
276
  - `dry_run` emits MCP progress notifications only when the caller's `tools/call` includes `_meta.progressToken` — no-op otherwise, so legacy clients see zero overhead. A 5-second heartbeat ticks while the child runs; each tick's message is best-effort enriched with the latest Renovate JSON-log `msg` seen on stdout. Notifications are also emitted at start and completion. We deliberately don't couple to Renovate's log schema beyond reading `msg`, since that schema isn't a stable API.
275
277
  - `dry_run_diff` is stateless on purpose: both reports are passed as inputs, no per-repo state is kept on the server. Updates are keyed by `(manager, packageFile, depName)` so a version bump on the same dep shows up once under `changed` rather than twice as `removed + added`. Compared per identity: `newValue`, `newVersion`, `updateType`, `branchName`, `groupName`, `schedule`. Either input can be the raw Renovate report or the full `dry_run` summary (with the `report` key) — the tool unwraps `report` automatically.
276
278
  - `write_config` writes to a temp file, validates, then atomically renames — so a failed validation never leaves a broken config on disk. The `force: true` escape hatch is gated behind a separate `confirmForce: "YES_OVERRIDE_VALIDATION"` literal: a single boolean is too easy for a prompt-injected agent to flip, but emitting an unusual sentinel string is a deliberate step that's harder to navigate accidentally.
277
- - `check_setup` and the shell-out tools (`validate_config`, `write_config`, `dry_run`) detect Renovate runtime conditions that degrade the tool silently — currently the bundled `re2` native module failing to load (typically after a Node major-version upgrade leaves a prebuilt `re2.node` compiled against the old ABI). When the WARN appears in Renovate's stderr, the tool response carries a `warnings: [{ kind: "re2-unusable", … }]` entry alongside its normal output and `check_setup` aggregates the same warning into `SetupStatus.warnings` plus the startup `instructions` banner. Renovate keeps running on JavaScript `RegExp` so calls don't fail, but regex-heavy operations (custom managers, validation, lookups) are noticeably slower; the fix hint is `cd $(npm root -g)/renovate && npm rebuild re2` (or reinstall Renovate). This is passive detection only — the server doesn't rebuild anything itself.
279
+ - `check_setup` and the shell-out tools (`validate_config`, `write_config`, `dry_run`) detect Renovate runtime conditions that degrade the tool silently — currently the bundled `re2` native module failing to load (typically after a Node major-version upgrade leaves a prebuilt `re2.node` compiled against the old ABI). When the WARN appears in Renovate's stderr, the tool response carries a `warnings: [{ kind: "re2-unusable", … }]` entry alongside its normal output and `check_setup` aggregates the same warning into `SetupStatus.warnings` plus the startup `instructions` banner. Renovate keeps running on JavaScript `RegExp` so calls don't fail, but regex-heavy operations (custom managers, validation, lookups) are noticeably slower; the fix hint is to reinstall renovate-mcp (which reinstalls the bundled `renovate` and rebuilds its native deps), or run `npm rebuild re2` inside the renovate-mcp install's `node_modules/renovate`. This is passive detection only — the server doesn't rebuild anything itself.
@@ -31,17 +31,41 @@ export interface RunOptions {
31
31
  * timeouts.
32
32
  */
33
33
  export declare function run(cmd: string, args: string[], opts?: RunOptions): Promise<RunResult>;
34
+ export interface ResolvedRenovateTool {
35
+ /** Process to spawn. */
36
+ cmd: string;
37
+ /** Args prepended to the caller's args (e.g., the JS file path when `cmd` is `node`). */
38
+ prefixArgs: string[];
39
+ /** Where the binary came from — drives setup-status messaging. */
40
+ source: "env" | "bundled" | "path";
41
+ /**
42
+ * Raw user-visible identifier for the resolved binary. For `env` it's the
43
+ * env-var value (often an absolute path); for `bundled` and `path` it's the
44
+ * tool name. Callers compose this with `source` when rendering a label —
45
+ * keeping it raw avoids producing nested parens in error messages like
46
+ * `MISSING — <err> (<command>)`.
47
+ */
48
+ command: string;
49
+ }
34
50
  /**
35
- * Resolve how to invoke a Renovate CLI tool. Users can override via env:
36
- * RENOVATE_BIN — path to the `renovate` binary
37
- * RENOVATE_CONFIG_VALIDATOR_BIN — path to the validator binary
38
- * Otherwise we rely on PATH resolution (globally installed Renovate, or a
39
- * `npm exec` from a project with Renovate installed locally).
51
+ * Resolve how to invoke a Renovate CLI tool. Resolution order:
52
+ * 1. `RENOVATE_BIN` / `RENOVATE_CONFIG_VALIDATOR_BIN` env override — if set,
53
+ * always wins (even if it points at a broken path; we surface the spawn
54
+ * error rather than silently falling through).
55
+ * 2. Bundled binary — the `renovate` package is a runtime dep, so its
56
+ * `bin/renovate.js` / `bin/config-validator.js` ship with the install.
57
+ * Spawned as `node <jsPath>` to sidestep shebang/permission concerns.
58
+ * 3. Bare tool name on `PATH` — last-resort fallback for the unusual case
59
+ * where the bundled lookup fails (e.g. a corrupted node_modules). Only
60
+ * manually tested; unit-testing this branch would require monkey-patching
61
+ * `require.resolve` to fake a bundled-lookup failure.
40
62
  */
41
- export declare function resolveRenovateTool(tool: "renovate" | "renovate-config-validator"): string;
63
+ export declare function resolveRenovateTool(tool: "renovate" | "renovate-config-validator"): ResolvedRenovateTool;
42
64
  /**
43
65
  * Centralized message for when a Renovate CLI binary can't be spawned (ENOENT,
44
66
  * permission denied, etc.). Used by all tools that shell out so users get
45
- * consistent, actionable hints instead of raw spawn errors.
67
+ * consistent, actionable hints instead of raw spawn errors. Renovate ships
68
+ * bundled with the server, so the most likely cause of failure here is a
69
+ * deliberately broken `RENOVATE_BIN` override or a corrupted install.
46
70
  */
47
71
  export declare function formatMissingBinaryError(tool: "renovate" | "renovate-config-validator", cause: Error): string;
@@ -1,5 +1,9 @@
1
1
  import { spawn } from "node:child_process";
2
+ import { createRequire } from "node:module";
3
+ import path from "node:path";
4
+ import fs from "node:fs";
2
5
  import { detectRuntimeWarnings } from "./runtimeWarnings.js";
6
+ const requireFromHere = createRequire(import.meta.url);
3
7
  /**
4
8
  * Spawn a command and capture stdout/stderr. Never throws on non-zero exit —
5
9
  * caller inspects exitCode. Throws only for spawn errors (ENOENT etc.) and
@@ -95,26 +99,66 @@ export function run(cmd, args, opts = {}) {
95
99
  });
96
100
  }
97
101
  /**
98
- * Resolve how to invoke a Renovate CLI tool. Users can override via env:
99
- * RENOVATE_BIN — path to the `renovate` binary
100
- * RENOVATE_CONFIG_VALIDATOR_BIN — path to the validator binary
101
- * Otherwise we rely on PATH resolution (globally installed Renovate, or a
102
- * `npm exec` from a project with Renovate installed locally).
102
+ * Locate the JS entry-point for one of Renovate's CLI tools inside the
103
+ * `renovate` npm package shipped as a runtime dep. Returns `null` if the
104
+ * package can't be resolved or its `bin` field doesn't list the tool —
105
+ * callers fall back to PATH lookup so a user with a deliberately broken
106
+ * `renovate` install (or an unusual install topology that hides it from
107
+ * `require.resolve`) still has an escape hatch.
108
+ */
109
+ function resolveBundledBinary(tool) {
110
+ try {
111
+ const pkgPath = requireFromHere.resolve("renovate/package.json");
112
+ const pkg = JSON.parse(fs.readFileSync(pkgPath, "utf8"));
113
+ const binEntry = pkg.bin?.[tool];
114
+ if (typeof binEntry !== "string")
115
+ return null;
116
+ const binAbs = path.join(path.dirname(pkgPath), binEntry);
117
+ if (!fs.existsSync(binAbs))
118
+ return null;
119
+ return binAbs;
120
+ }
121
+ catch {
122
+ return null;
123
+ }
124
+ }
125
+ /**
126
+ * Resolve how to invoke a Renovate CLI tool. Resolution order:
127
+ * 1. `RENOVATE_BIN` / `RENOVATE_CONFIG_VALIDATOR_BIN` env override — if set,
128
+ * always wins (even if it points at a broken path; we surface the spawn
129
+ * error rather than silently falling through).
130
+ * 2. Bundled binary — the `renovate` package is a runtime dep, so its
131
+ * `bin/renovate.js` / `bin/config-validator.js` ship with the install.
132
+ * Spawned as `node <jsPath>` to sidestep shebang/permission concerns.
133
+ * 3. Bare tool name on `PATH` — last-resort fallback for the unusual case
134
+ * where the bundled lookup fails (e.g. a corrupted node_modules). Only
135
+ * manually tested; unit-testing this branch would require monkey-patching
136
+ * `require.resolve` to fake a bundled-lookup failure.
103
137
  */
104
138
  export function resolveRenovateTool(tool) {
105
139
  const envKey = tool === "renovate" ? "RENOVATE_BIN" : "RENOVATE_CONFIG_VALIDATOR_BIN";
106
- return process.env[envKey] || tool;
140
+ const envValue = process.env[envKey];
141
+ if (envValue) {
142
+ return { cmd: envValue, prefixArgs: [], source: "env", command: envValue };
143
+ }
144
+ const bundled = resolveBundledBinary(tool);
145
+ if (bundled) {
146
+ return { cmd: process.execPath, prefixArgs: [bundled], source: "bundled", command: tool };
147
+ }
148
+ return { cmd: tool, prefixArgs: [], source: "path", command: tool };
107
149
  }
108
150
  /**
109
151
  * Centralized message for when a Renovate CLI binary can't be spawned (ENOENT,
110
152
  * permission denied, etc.). Used by all tools that shell out so users get
111
- * consistent, actionable hints instead of raw spawn errors.
153
+ * consistent, actionable hints instead of raw spawn errors. Renovate ships
154
+ * bundled with the server, so the most likely cause of failure here is a
155
+ * deliberately broken `RENOVATE_BIN` override or a corrupted install.
112
156
  */
113
157
  export function formatMissingBinaryError(tool, cause) {
114
158
  const envKey = tool === "renovate" ? "RENOVATE_BIN" : "RENOVATE_CONFIG_VALIDATOR_BIN";
115
159
  return [
116
160
  `Failed to run \`${tool}\`: ${cause.message}.`,
117
- `Install Renovate globally with \`npm i -g renovate\`, or set ${envKey} to point at an existing binary.`,
161
+ `Renovate ships bundled with renovate-mcp; if the bundled binary fails to load, set ${envKey} to a working binary or reinstall renovate-mcp.`,
118
162
  "Call the `check_setup` tool for a full diagnostic.",
119
163
  ].join(" ");
120
164
  }
@@ -16,7 +16,7 @@
16
16
  */
17
17
  const MAX_DETAIL_LENGTH = 300;
18
18
  const MAX_WARNINGS = 10;
19
- const RE2_FIX_HINT = "The RE2 native module bundled with Renovate failed to load (likely after a Node version upgrade). Renovate is falling back to JavaScript `RegExp`, which is significantly slower for regex-heavy operations. To restore vectorized regex: `cd $(npm root -g)/renovate && npm rebuild re2`, or reinstall Renovate (`npm i -g renovate`). If `RENOVATE_BIN` points at a project-local install, run `npm rebuild re2` in that project instead.";
19
+ const RE2_FIX_HINT = "The RE2 native module bundled with Renovate failed to load (likely after a Node version upgrade). Renovate is falling back to JavaScript `RegExp`, which is significantly slower for regex-heavy operations. To restore vectorized regex: reinstall renovate-mcp (which reinstalls the bundled `renovate` and rebuilds its native deps), or run `npm rebuild re2` inside the renovate-mcp install's `node_modules/renovate`. If `RENOVATE_BIN` points at a different Renovate install, run `npm rebuild re2` there instead.";
20
20
  const RE2_MESSAGE = "Renovate's RE2 native module is unusable; falling back to JavaScript `RegExp` (slower).";
21
21
  function truncate(s) {
22
22
  if (s.length <= MAX_DETAIL_LENGTH)
@@ -3,6 +3,13 @@ export type RenovateBinary = "renovate" | "renovate-config-validator";
3
3
  export interface BinaryStatus {
4
4
  tool: RenovateBinary;
5
5
  command: string;
6
+ /**
7
+ * Where the resolved binary came from. `bundled` means renovate-mcp's own
8
+ * `node_modules/renovate` was used (the default); `env` means the user set
9
+ * `RENOVATE_BIN` / `RENOVATE_CONFIG_VALIDATOR_BIN`; `path` means the bundled
10
+ * lookup failed and we fell through to the bare tool name on `PATH`.
11
+ */
12
+ source: "env" | "bundled" | "path";
6
13
  found: boolean;
7
14
  version?: string;
8
15
  error?: string;
@@ -2,16 +2,20 @@ import { run, resolveRenovateTool } from "./renovateCli.js";
2
2
  import { dedupeRuntimeWarnings } from "./runtimeWarnings.js";
3
3
  const DRY_RUN_PLATFORMS = ["local", "github", "gitlab"];
4
4
  const VERSION_TIMEOUT_MS = 10_000;
5
- const INSTALL_HINT = "Install Renovate globally with `npm i -g renovate`, or set RENOVATE_BIN / RENOVATE_CONFIG_VALIDATOR_BIN to existing binaries.";
5
+ const INSTALL_HINT = "Renovate ships bundled with renovate-mcp; if that fails to load, set RENOVATE_BIN / RENOVATE_CONFIG_VALIDATOR_BIN to a working binary or reinstall renovate-mcp.";
6
6
  async function checkBinary(tool) {
7
- const command = resolveRenovateTool(tool);
7
+ const resolved = resolveRenovateTool(tool);
8
+ const command = resolved.command;
8
9
  try {
9
- const result = await run(command, ["--version"], { timeoutMs: VERSION_TIMEOUT_MS });
10
+ const result = await run(resolved.cmd, [...resolved.prefixArgs, "--version"], {
11
+ timeoutMs: VERSION_TIMEOUT_MS,
12
+ });
10
13
  const runtimeWarnings = result.runtimeWarnings.length ? result.runtimeWarnings : undefined;
11
14
  if (result.exitCode !== 0) {
12
15
  return {
13
16
  tool,
14
17
  command,
18
+ source: resolved.source,
15
19
  found: false,
16
20
  error: (result.stderr || result.stdout).trim() || `exit code ${result.exitCode}`,
17
21
  runtimeWarnings,
@@ -20,6 +24,7 @@ async function checkBinary(tool) {
20
24
  return {
21
25
  tool,
22
26
  command,
27
+ source: resolved.source,
23
28
  found: true,
24
29
  version: result.stdout.trim() || undefined,
25
30
  runtimeWarnings,
@@ -29,6 +34,7 @@ async function checkBinary(tool) {
29
34
  return {
30
35
  tool,
31
36
  command,
37
+ source: resolved.source,
32
38
  found: false,
33
39
  error: err.message,
34
40
  };
@@ -160,9 +166,9 @@ export function startupBanner(status) {
160
166
  const offlineList = OFFLINE_TOOLS.map((n) => `\`${n}\``).join(", ");
161
167
  sections.push([
162
168
  "Partial availability:",
163
- ` Renovate CLI not found — only blocks: ${unavailList}.`,
169
+ ` Renovate CLI not reachable — only blocks: ${unavailList}.`,
164
170
  ` Offline tools (${offlineList}) still work; do not flag this as a setup problem when the task only needs those.`,
165
- " Install Renovate (`npm i -g renovate`) before calling the blocked tools, or call `check_setup` for a full diagnostic.",
171
+ " Renovate ships bundled with renovate-mcp; if you see this banner, the bundled binary failed to spawn or `RENOVATE_BIN` / `RENOVATE_CONFIG_VALIDATOR_BIN` points at a broken binary. Call `check_setup` for a full diagnostic.",
166
172
  " Set `RENOVATE_MCP_REQUIRE_CLI=false` to suppress this notice if you have consciously chosen the offline subset.",
167
173
  ].join("\n"));
168
174
  }
@@ -222,7 +228,14 @@ export function describeSetup(status) {
222
228
  return lines.join("\n");
223
229
  }
224
230
  function formatBinary(s) {
225
- if (s.found)
226
- return `${s.version ?? "(version unknown)"} (${s.command})`;
227
- return `MISSING — ${s.error ?? "unknown error"}`;
231
+ if (s.found) {
232
+ const version = s.version ?? "(version unknown)";
233
+ if (s.source === "bundled")
234
+ return `${version} (bundled)`;
235
+ const prefix = s.source === "env" ? "env" : "PATH";
236
+ return `${version} (${prefix}: ${s.command})`;
237
+ }
238
+ if (s.source === "bundled")
239
+ return `MISSING — ${s.error ?? "unknown error"} (bundled)`;
240
+ return `MISSING — ${s.error ?? "unknown error"} (${s.command})`;
228
241
  }
@@ -1,4 +1,4 @@
1
- export declare const SERVER_VERSION = "0.10.0";
1
+ export declare const SERVER_VERSION = "0.11.0";
2
2
  export type BuildMode = "local" | "released";
3
3
  export interface VersionInfo {
4
4
  version: string;
@@ -1,5 +1,5 @@
1
1
  import { fileURLToPath } from "node:url";
2
- export const SERVER_VERSION = "0.10.0"; // x-release-please-version
2
+ export const SERVER_VERSION = "0.11.0"; // x-release-please-version
3
3
  // "released" = the server is running from a `node_modules/` install (global
4
4
  // `npm i -g`, project-local `npm i`, or `npx renovate-mcp`). Anything else —
5
5
  // most commonly an MCP config of `{"command": "node", "args": [".../dist/index.js"]}`
@@ -132,7 +132,7 @@ export function registerDryRun(server) {
132
132
  }
133
133
  }
134
134
  const reportPath = path.join(tmpdir(), `renovate-mcp-report-${randomUUID()}.json`);
135
- const bin = resolveRenovateTool("renovate");
135
+ const tool = resolveRenovateTool("renovate");
136
136
  const ruleList = hostRules ?? [];
137
137
  // When the caller doesn't pass `platform`, fall back to RENOVATE_PLATFORM
138
138
  // from the MCP server's env before defaulting to `local`. Without this,
@@ -291,7 +291,7 @@ export function registerDryRun(server) {
291
291
  emit(`Starting Renovate dry-run (${dryRunMode})`);
292
292
  heartbeat = setInterval(() => emit(buildDryRunHeartbeatMessage(Date.now() - startedAt, lastLogMsg)), HEARTBEAT_MS);
293
293
  }
294
- const result = await run(bin, args, {
294
+ const result = await run(tool.cmd, [...tool.prefixArgs, ...args], {
295
295
  cwd: repoPath,
296
296
  env: childEnv,
297
297
  timeoutMs,
@@ -37,12 +37,12 @@ export function registerValidateConfig(server) {
37
37
  };
38
38
  }
39
39
  try {
40
- const bin = resolveRenovateTool("renovate-config-validator");
40
+ const tool = resolveRenovateTool("renovate-config-validator");
41
41
  const args = [];
42
42
  if (strict)
43
43
  args.push("--strict");
44
44
  args.push(target);
45
- const result = await run(bin, args, { timeoutMs: 30_000 });
45
+ const result = await run(tool.cmd, [...tool.prefixArgs, ...args], { timeoutMs: 30_000 });
46
46
  const valid = result.exitCode === 0;
47
47
  const output = (result.stdout + result.stderr).trim();
48
48
  const payload = { valid, output };
@@ -86,8 +86,8 @@ export function registerWriteConfig(server) {
86
86
  let validatorMissing = false;
87
87
  let runtimeWarnings = [];
88
88
  try {
89
- const bin = resolveRenovateTool("renovate-config-validator");
90
- const v = await run(bin, [tmp], { timeoutMs: 30_000 });
89
+ const tool = resolveRenovateTool("renovate-config-validator");
90
+ const v = await run(tool.cmd, [...tool.prefixArgs, tmp], { timeoutMs: 30_000 });
91
91
  validationOutput = (v.stdout + v.stderr).trim();
92
92
  valid = v.exitCode === 0;
93
93
  runtimeWarnings = v.runtimeWarnings;
@@ -102,7 +102,7 @@ export function registerWriteConfig(server) {
102
102
  reason: validatorMissing ? "validator-unavailable" : "validation-failed",
103
103
  validationOutput,
104
104
  hint: validatorMissing
105
- ? "Install renovate-config-validator (or set RENOVATE_CONFIG_VALIDATOR_BIN), then retry. Pass force=true to skip validation entirely."
105
+ ? "The bundled renovate-config-validator failed to spawn. Set RENOVATE_CONFIG_VALIDATOR_BIN to a working binary or reinstall renovate-mcp, then retry. Pass force=true to skip validation entirely."
106
106
  : "Pass force=true to write anyway.",
107
107
  };
108
108
  if (runtimeWarnings.length > 0)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "renovate-mcp",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "description": "MCP server for designing Renovate configurations interactively.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -59,12 +59,17 @@
59
59
  "@modelcontextprotocol/sdk": "^1.29.0",
60
60
  "ignore": "^7.0.5",
61
61
  "json5": "^2.2.3",
62
+ "renovate": "^43.139.5",
62
63
  "zod": "^4.0.0"
63
64
  },
65
+ "overrides": {
66
+ "fast-uri": "^3.1.2",
67
+ "fast-xml-builder": "^1.1.7",
68
+ "simple-git": "^3.36.0"
69
+ },
64
70
  "devDependencies": {
65
71
  "@types/node": "^24.0.0",
66
72
  "@vitest/coverage-v8": "^4.1.0",
67
- "renovate": "^43.139.5",
68
73
  "typescript": "^6.0.0",
69
74
  "vitest": "^4.1.0"
70
75
  },