Skip to content

fix: enhance configuration resolution and client snippet generation for frontmcp#430

Merged
frontegg-david merged 6 commits into
mainfrom
fix/400-config-expansion
May 24, 2026
Merged

fix: enhance configuration resolution and client snippet generation for frontmcp#430
frontegg-david merged 6 commits into
mainfrom
fix/400-config-expansion

Conversation

@frontegg-david
Copy link
Copy Markdown
Contributor

@frontegg-david frontegg-david commented May 17, 2026

Summary by CodeRabbit

  • New Features
    • Unified config resolution with clear precedence (CLI → env → upward discovery → package.json fallback)
    • Per-mode env overlays and expanded config fields (transport, clients, test, skills)
    • New eject-mcp-config command to emit copy/paste MCP client snippets
  • Documentation
    • Expanded config guide: file resolution, override precedence, per-command consumption
  • Improvements
    • Dev/test/inspector now honor resolved config and merged env; scaffolds include a default config template

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 17, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 28faee4a-64ba-4a4d-8b74-1f05e3c10200

📥 Commits

Reviewing files that changed from the base of the PR and between ec2512c and c41725c.

📒 Files selected for processing (4)
  • libs/cli/src/config/__tests__/frontmcp-config.schema.spec.ts
  • libs/cli/src/config/frontmcp-config.schema.ts
  • libs/utils/src/fs/fs.ts
  • libs/utils/src/index.ts
✅ Files skipped from review due to trivial changes (1)
  • libs/utils/src/index.ts

📝 Walkthrough

Walkthrough

This PR (#430) implements a unified FrontMCP configuration resolution system: new Zod schemas and TypeScript types for transport/env/clients/test/skills; a multi-format loader (JSON/TS/JS with CJS/ESM/esbuild fallbacks) and explicit-file helpers; resolveConfig enforcing precedence (CLI > FRONTMCP_CONFIG > upward discovery to 10 levels > package.json fallback) and composing effectiveEnv; CLI wiring (-c/--config, ParsedArgs updates); dev/test/inspector consumption of resolved config; eject-mcp-config and client snippet generation; scaffolding; docs; schema emitter; and tests.

Changes

Config Resolution & Command Integration

Layer / File(s) Summary
Config schema, types, and public API
libs/cli/src/config/frontmcp-config.types.ts, libs/cli/src/config/frontmcp-config.schema.ts, libs/cli/src/config/index.ts
New exported types for TransportConfig, EnvOverlays, ClientConnection/ClientsConfig, TestConfig, SkillsCliConfig wired into FrontMcpConfig. Zod schemas added and indexed. Public re-exports expanded to surface new types and resolve API.
Config file loading with multi-format support
libs/cli/src/config/frontmcp-config.loader.ts, libs/utils/src/path/*, libs/utils/src/fs/fs.ts
loadFrontMcpConfigFromFile and findConfigDir helpers. JSON parsing, TypeScript loading via esbuild (CommonJS) or Node runtime loaders (ESM with fallback). JavaScript via require/import. Legacy shape detection and soft-loading. deriveFromPackageJson made async. Path utilities extended with pathToFileURL.
Unified config resolution and environment composition
libs/cli/src/config/frontmcp-config.resolve.ts
resolveConfig enforces precedence (explicit configPath, FRONTMCP_CONFIG, upward discovery to 10 levels, undefined). Composes effectiveEnv by layering process.env, config.env.shared, mode-specific overlays (dev/test/ship), and CLI overrides.
CLI argument forwarding and program setup
libs/cli/src/core/args.ts, libs/cli/src/core/bridge.ts, libs/cli/src/core/program.ts
Top-level -c, --config option added. ParsedArgs extended with config, out, dryRun, provider, bundle, exportTarget fields. toParsedArgs forwards options. eject command module registered.
Dev command with config-driven entry and port selection
libs/cli/src/commands/dev/dev.ts, libs/cli/src/commands/dev/register.ts
runDev resolves config in dev mode, selects entry from CLI or cfg.entry, derives port from CLI or cfg.transport.http.port, merges effectiveEnv into spawned child processes. Parent --config forwarded via register handler.
Inspector command with transport-specific args
libs/cli/src/commands/dev/inspector.ts, libs/cli/src/commands/dev/register.ts, libs/cli/src/commands/dev/__tests__/inspector.spec.ts
buildInspectorArgs constructs npx @modelcontextprotocol/inspector args for http (--transport http --server-url), sse (--transport sse --server-url/sse), stdio (-- <command> [args...]). runInspector resolves config, applies effectiveEnv, forwards config from parent. Tests validate arg generation and fallback paths.
Test command with config-driven Jest defaults
libs/cli/src/commands/dev/test.ts, libs/cli/src/commands/dev/register.ts
runTest resolves config in test mode, extracts testDefaults (timeout, testMatch, coverage), merges with CLI options. generateJestConfig accepts testDefaults parameter and uses for fallback injection. Merged options drive Jest config and arg construction.
Eject-mcp-config command and client snippet generation
libs/cli/src/commands/eject/register.ts, libs/cli/src/commands/eject/mcp-client.ts, libs/cli/src/commands/eject/__tests__/mcp-client.spec.ts
New eject-mcp-config validates client, resolves project config, generates per-client MCP snippet (stdio with defaults, http/sse with URL derivation from connection.url or transport.http or deployment ports). Wraps { mcpServers }, writes/prints with --out/--dry-run. Tests cover snippet shapes and error cases.
Starter config template for new projects
libs/cli/src/commands/scaffold/create.ts
renderFrontmcpConfigTemplate generates frontmcp.config.ts with sanitized project name, deployments, port 3000 /mcp HTTP transport, default claude-code client, and env.shared/env.dev sections. Scaffolder writes template into new projects.

Tests, Documentation, and Build Utilities

Layer / File(s) Summary
Documentation and config resolution tests
docs/frontmcp/deployment/frontmcp-config.mdx, libs/skills/catalog/frontmcp-config/references/configure-deployment-targets.md, libs/cli/src/config/__tests__/frontmcp-config.resolve.spec.ts
Docs expanded with file resolution order (CLI, env var, upward search 10 levels, package.json), extension probe order, override precedence (CLI > env > config > defaults), and per-command field consumption. Tests validate config discovery, precedence, and effectiveEnv composition across modes.
JSON schema generation from Zod config schema
libs/cli/scripts/emit-schema.ts
New emit-schema.ts script dynamically requires zod-to-json-schema, converts frontmcpConfigSchema to JSON Schema 7 with $schema/$id/title/description metadata, writes formatted JSON to frontmcp.schema.json, logs output path or error with devDependency hint.
CLI test updates and path/fs utilities
libs/cli/src/core/__tests__/program.spec.ts, libs/utils/src/index.ts, libs/utils/src/path/, libs/utils/src/fs/fs.ts
Program test expects eject-mcp-config in command list. Path utilities reformatted and extended with pathToFileURL re-export (Node from url module, browser stub). runCmd extended to accept env in opts parameter.

Sequence Diagram

sequenceDiagram
  participant UserCLI as User CLI
  participant Program as createProgram
  participant resolveConfig as resolveConfig
  participant Loader as frontmcp-config.loader
  participant FS as Filesystem
  UserCLI->>Program: run command with --config?/env/opts
  Program->>resolveConfig: resolve({ configPath?, cwd, mode, cliOptions })
  resolveConfig->>Loader: tryLoadFrontMcpConfigFromFile or findConfigDir
  Loader->>FS: read/load candidate file (json/ts/mjs/js)
  Loader-->>resolveConfig: parsed config or undefined
  resolveConfig->>resolveConfig: compose effectiveEnv (process.env ⊕ config.env.shared ⊕ config.env[mode] ⊕ cliOptions.env)
  resolveConfig-->>Program: ResolvedFrontMcpConfig (config?, configDir, configPath, effectiveEnv)
  Program-->>UserCLI: command runs using resolved config and environment
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • agentfront/frontmcp#425: Modifies Jest configuration injection in frontmcp test and relates to this PR's test-default merging changes.
  • agentfront/frontmcp#421: Touches dev port resolution and EADDRINUSE-aware probing that the updated dev command now consumes.

"🐰
I sniffed the configs in the night,
Brought schemas, loaders, and flags to light.
CLI leads, envs layer, snippets gleam—
A tidy hop toward a calmer stream."

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 61.76% which is insufficient. The required threshold is 65.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main focus of the changeset: enhanced configuration resolution and client snippet generation capabilities.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/400-config-expansion

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 12

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@libs/cli/src/commands/dev/test.ts`:
- Around line 189-194: The status logging uses the original opts while runTest
runs with mergedOpts, causing mismatched logs; update the logging calls that
reference opts (the ones around where runTest is invoked) to use mergedOpts
instead so reported values (runInBand, coverage, timeout) reflect the actual
parameters passed to runTest (keep mergedOpts variable name and behavior
intact).

In `@libs/cli/src/commands/eject/mcp-client.ts`:
- Around line 30-77: Add unit tests that exercise buildServerEntry and
emitClientSnippet covering all branches: (1) missing client -> expect throw from
buildServerEntry, (2) stdio path -> verify default command 'npx', default args
['-y', config.name], and env copying when present, (3) http/sse path -> verify
URL is derived from transport.http.port or deployment server.http.port and
transport is set on the ServerEntry, and (4) missing URL -> expect throw when
neither connection.url nor fallback port exists; also assert emitClientSnippet
returns the correct JSON payload with the server key chosen from connection.name
or config.name. Use the exported functions buildServerEntry and
emitClientSnippet and create minimal FrontMcpConfigParsed fixtures to drive each
branch.
- Around line 51-55: The fallback URL selection is ambiguous because httpPort is
chosen from the first deployment, which can point to the wrong server when
multiple deployments exist; update the logic in the block that computes
httpPort/httpHost/httpPath/fallbackUrl/url so that if connection.url is absent
you first try config.transport?.http, then search config.deployments for the
deployment that matches the connection (e.g., compare deployment.name or
deployment.id to connection.deployment or connection.target) and use that
deployment's .server?.http?.port/host/path; if no matching deployment exists,
fall back to undefined (or throw) instead of using the first deployment; update
variables httpPort, fallbackUrl and url accordingly so the selected deployment
is explicitly matched to the connection.

In `@libs/cli/src/commands/scaffold/create.ts`:
- Line 178: The stdio client branch uses sanitizeForFolder(projectName) to build
the safeName for command args, but scaffoldProject uses
sanitizeForNpm(projectName) for package.json, causing scoped names to diverge;
change the stdio usage to use sanitizeForNpm so both client invocation and
published package name match. Locate the safeName assignment (currently using
sanitizeForFolder) in the stdio/stdio args code and replace it with
sanitizeForNpm(projectName) (and update the other occurrence around line 198
similarly) so the stdio command uses the exact package name that scaffoldProject
will publish; ensure variable name and downstream uses remain unchanged.
- Around line 179-183: The stdio client/transport branch is dead because
isHttpTarget (used in create.ts) always evaluates true for deploymentTarget
('node'|'vercel'|'lambda'|'cloudflare'); either remove the stdio block (delete
the stdio client/transport code) or make stdio reachable by changing
isHttpTarget to exclude 'node' (or update the DeploymentTarget type to add a
distinct 'desktop' target) so the stdio branch can execute; if you choose to
reintroduce stdio, also fix the package-name mismatch by using the same
sanitization function as scaffoldProject (replace sanitizeForFolder usage with
sanitizeForNpm or unify both to one function) so scoped packages like
`@myorg/my-app` run and declare the correct name.

In `@libs/cli/src/config/__tests__/frontmcp-config.resolve.spec.ts`:
- Around line 13-15: The tests import fs directly; replace that with async
helpers from `@frontmcp/utils` (import mkdtemp, mkdir, writeFile) while keeping
os.tmpdir() for the prefix, update the helper function makeTempProject to be
async and use await mkdtemp(...) instead of fs.mkdtempSync and await mkdir(...)
/ await writeFile(...) instead of fs.mkdirSync/fs.writeFileSync, then await
every call site that invokes makeTempProject (the calls at the test locations)
and replace any other direct fs.mkdtempSync or fs.mkdirSync usages with the
async mkdtemp/mkdir equivalents.

In `@libs/cli/src/config/frontmcp-config.loader.ts`:
- Around line 48-55: The loader is directly using fs.existsSync and other fs
APIs instead of the shared FS abstraction; update loadFrontMcpConfigFromFile to
call the fileExists (and readFile/readFileBuffer or readJSON as appropriate)
helpers from `@frontmcp/utils` rather than fs.existsSync or fs/promises, and
ensure imports are added from `@frontmcp/utils`; also audit and replace similar
direct fs usage in the same module (including the logic around loadRawFileAtPath
and the other blocks flagged) so all filesystem access goes through the shared
utilities (e.g., use fileExists, readFile/readFileBuffer, etc.) and remove any
direct node:fs or fs/promises usage.
- Around line 195-217: Dynamic imports use a plain filesystem path which fails
on Windows; convert configPath to a file:// URL before calling import in both
the early TS branch (where you do const mod = await import(configPath)) and the
.mjs branch (where you do const mod = await import(configPath)); import and use
pathToFileURL from 'url' and pass pathToFileURL(configPath).href (or the URL
object) to import() so Windows absolute paths are valid ESM specifiers, keeping
the existing mod.default ?? mod behavior and error handling around
loadTsConfigViaEsbuild and requireErr unchanged.

In `@libs/cli/src/config/frontmcp-config.resolve.ts`:
- Around line 112-129: The current explicitPath and configDir branches call
hard-validating loaders (loadFrontMcpConfigFromFile and loadFrontMcpConfig) and
throw on errors, bypassing the legacy-config fallback; change these branches to
use the non-throwing path in tryLoadFrontMcpConfig (or catch the loader error
and return { config: undefined } instead of throwing) so that exec-only/legacy
configs produce a graceful undefined config rather than an exception; ensure you
still set configPath when explicitPath succeeds and preserve the existing error
surfacing for real schema/load failures only when tryLoadFrontMcpConfig
indicates it’s not a legacy shape.
- Around line 101-104: The current unchecked cast of options.cliOptions?.['env']
to Record<string,string> can allow non-string values; replace it by building
cliEnv from Object.entries(options.cliOptions?.['env'] ?? {}) and only include
keys whose values satisfy typeof value === 'string' (e.g., filter or reduce to a
Record<string,string>), so cliEnv becomes a safe Record<string,string> of only
string values before merging into effectiveEnv; apply the same validation logic
to the other occurrence referenced around the symbol on line ~144.
- Around line 112-118: The explicitPath branch currently returns the
caller-supplied string and leaves configDir unset; update the branch that calls
loadFrontMcpConfigFromFile(explicitPath) to normalize/resolve configPath to an
absolute path and populate configDir with its parent directory before returning
a ResolvedFrontMcpConfig. Concretely, after successful load in the explicitPath
branch (the block using loadFrontMcpConfigFromFile and setting configPath =
explicitPath), replace the verbatim assignment with logic that resolves
explicitPath to an absolute path (e.g., via path.resolve or equivalent), set
configPath to that normalized absolute path, and set configDir to
path.dirname(configPath) so the returned ResolvedFrontMcpConfig always contains
a canonical absolute configPath and its containing directory.

In `@libs/cli/src/config/frontmcp-config.schema.ts`:
- Around line 382-390: The clientConnectionSchema currently lets any string
through for the url field; update the schema so provided URLs are validated by
Zod. Replace the url: z.string().optional() entry in clientConnectionSchema with
url: z.string().url().optional() (or z.string().url({ message: "invalid url"
}).optional() if you want a custom message) so clients[*].url is syntactically
validated at parse time.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2ed7c0a9-f530-4140-96e2-aaa925ecaf4a

📥 Commits

Reviewing files that changed from the base of the PR and between 4328981 and f673b91.

📒 Files selected for processing (20)
  • docs/frontmcp/deployment/frontmcp-config.mdx
  • libs/cli/scripts/emit-schema.ts
  • libs/cli/src/commands/dev/dev.ts
  • libs/cli/src/commands/dev/inspector.ts
  • libs/cli/src/commands/dev/register.ts
  • libs/cli/src/commands/dev/test.ts
  • libs/cli/src/commands/eject/mcp-client.ts
  • libs/cli/src/commands/eject/register.ts
  • libs/cli/src/commands/scaffold/create.ts
  • libs/cli/src/config/__tests__/frontmcp-config.resolve.spec.ts
  • libs/cli/src/config/frontmcp-config.loader.ts
  • libs/cli/src/config/frontmcp-config.resolve.ts
  • libs/cli/src/config/frontmcp-config.schema.ts
  • libs/cli/src/config/frontmcp-config.types.ts
  • libs/cli/src/config/index.ts
  • libs/cli/src/core/__tests__/program.spec.ts
  • libs/cli/src/core/args.ts
  • libs/cli/src/core/bridge.ts
  • libs/cli/src/core/program.ts
  • libs/skills/catalog/frontmcp-config/references/configure-deployment-targets.md

Comment thread libs/cli/src/commands/dev/test.ts
Comment thread libs/cli/src/commands/eject/mcp-client.ts
Comment thread libs/cli/src/commands/eject/mcp-client.ts Outdated
Comment thread libs/cli/src/commands/scaffold/create.ts
Comment thread libs/cli/src/commands/scaffold/create.ts Outdated
Comment thread libs/cli/src/config/frontmcp-config.loader.ts
Comment thread libs/cli/src/config/frontmcp-config.resolve.ts Outdated
Comment thread libs/cli/src/config/frontmcp-config.resolve.ts
Comment thread libs/cli/src/config/frontmcp-config.resolve.ts
Comment thread libs/cli/src/config/frontmcp-config.schema.ts
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@libs/cli/src/commands/eject/__tests__/mcp-client.spec.ts`:
- Around line 30-33: Update the throw-path tests to also assert the error class
(use instanceof checks) in addition to the message pattern: instead of only
using expect(() => emitClientSnippet(...)).toThrow(/.../), execute the call
inside a try/catch (or capture the thrown value) and assert both
expect(err).toBeInstanceOf(Error) (or the specific error constructor used in the
module) and expect(err.message).toMatch(/no `clients\.claude-code` entry/);
apply the same pattern to the other throw-path tests referenced (around the
blocks using emitClientSnippet and the other failing cases at the regions noted)
so every test validates both the error class and the message.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 214bcf22-bc6e-419d-8765-f277aece3007

📥 Commits

Reviewing files that changed from the base of the PR and between f673b91 and 52ac313.

📒 Files selected for processing (14)
  • .gitignore
  • libs/cli/src/commands/dev/test.ts
  • libs/cli/src/commands/eject/__tests__/mcp-client.spec.ts
  • libs/cli/src/commands/eject/mcp-client.ts
  • libs/cli/src/commands/scaffold/create.ts
  • libs/cli/src/config/__tests__/frontmcp-config.resolve.spec.ts
  • libs/cli/src/config/frontmcp-config.loader.ts
  • libs/cli/src/config/frontmcp-config.resolve.ts
  • libs/cli/src/config/frontmcp-config.schema.ts
  • libs/cli/src/core/program.ts
  • libs/utils/src/index.ts
  • libs/utils/src/path/browser-path.ts
  • libs/utils/src/path/index.ts
  • libs/utils/src/path/node-path.ts
✅ Files skipped from review due to trivial changes (3)
  • libs/utils/src/path/index.ts
  • .gitignore
  • libs/utils/src/index.ts

Comment thread libs/cli/src/commands/eject/__tests__/mcp-client.spec.ts Outdated
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
libs/cli/src/commands/dev/inspector.ts (1)

52-64: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Use resolved.effectiveEnv when spawning Inspector.

resolveConfig({ mode: 'inspector' }) computes env overlays, but they are never applied to the spawned npx process. In stdio mode, this can break server startup when config-driven env vars are required.

Proposed fix
-  await runCmd('npx', args);
+  await runCmd('npx', args, { env: resolved.effectiveEnv });

If runCmd typing currently only allows { cwd?: string }, please widen its options type to include env?: NodeJS.ProcessEnv so this call remains type-safe.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@libs/cli/src/commands/dev/inspector.ts` around lines 52 - 64,
resolveConfig(...) computes environment overlays into resolved.effectiveEnv but
the spawned Inspector process isn't receiving them; update the run of the
inspector so that runCmd('npx', args) is called with the resolved.effectiveEnv
passed as the env option (e.g., runCmd('npx', args, { env:
resolved.effectiveEnv, cwd: process.cwd() })), and if runCmd's options type only
includes cwd extend its signature/type to accept env?: NodeJS.ProcessEnv so the
call remains type-safe; locate usages around buildInspectorArgs, resolveConfig,
and the runCmd invocation to apply the change.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@libs/cli/src/commands/dev/inspector.ts`:
- Around line 31-33: Normalize transport.http.path to always start with a single
leading slash before composing the server URL: when computing mountPath (used in
the args.push call that builds
`http://${host}:${transport.http.port}${mountPath}`) ensure you prepend a '/' if
transport.http.path is present without one and strip any duplicate slashes so
you don't produce `//`; apply the same normalization logic wherever
transport.http.path is used (including the SSE branch guarded by `else if
(transport?.default === 'sse' && transport.http?.port)`), then use the
normalized mountPath when pushing `--server-url`.

---

Outside diff comments:
In `@libs/cli/src/commands/dev/inspector.ts`:
- Around line 52-64: resolveConfig(...) computes environment overlays into
resolved.effectiveEnv but the spawned Inspector process isn't receiving them;
update the run of the inspector so that runCmd('npx', args) is called with the
resolved.effectiveEnv passed as the env option (e.g., runCmd('npx', args, { env:
resolved.effectiveEnv, cwd: process.cwd() })), and if runCmd's options type only
includes cwd extend its signature/type to accept env?: NodeJS.ProcessEnv so the
call remains type-safe; locate usages around buildInspectorArgs, resolveConfig,
and the runCmd invocation to apply the change.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 516b55f0-de63-4e1d-8749-1a4ca07a677e

📥 Commits

Reviewing files that changed from the base of the PR and between 52ac313 and 792298b.

📒 Files selected for processing (2)
  • libs/cli/src/commands/dev/__tests__/inspector.spec.ts
  • libs/cli/src/commands/dev/inspector.ts

Comment thread libs/cli/src/commands/dev/inspector.ts Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 24, 2026

Performance Test Results

Status: ✅ All tests passed

Summary

Project Tests Passed Warnings Failed Leaks
✅ demo-e2e-agents 4 4 0 0 0
✅ demo-e2e-cache 11 11 0 0 0
✅ demo-e2e-codecall 4 4 0 0 0
✅ demo-e2e-config 4 4 0 0 0
✅ demo-e2e-direct 3 3 0 0 0
✅ demo-e2e-elicitation 1 1 0 0 0
✅ demo-e2e-errors 4 4 0 0 0
✅ demo-e2e-hooks 3 3 0 0 0
✅ demo-e2e-multiapp 4 4 0 0 0
✅ demo-e2e-notifications 3 3 0 0 0
✅ demo-e2e-openapi 2 2 0 0 0
✅ demo-e2e-providers 4 4 0 0 0
✅ demo-e2e-public 4 4 0 0 0
✅ demo-e2e-redis 15 15 0 0 0
✅ demo-e2e-remember 4 4 0 0 0
✅ demo-e2e-remote 5 5 0 0 0
✅ demo-e2e-serverless 2 2 0 0 0
✅ demo-e2e-skills 15 15 0 0 0
✅ demo-e2e-standalone 2 2 0 0 0
✅ demo-e2e-transport-recreation 3 3 0 0 0
✅ demo-e2e-ui 4 4 0 0 0

Total: 101 tests across 21 projects

📊 View full report in workflow run


Generated at: 2026-05-24T17:57:29.187Z
Commit: 4d5e1a37

@frontegg-david frontegg-david merged commit 24a3358 into main May 24, 2026
32 checks passed
@frontegg-david frontegg-david deleted the fix/400-config-expansion branch May 24, 2026 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

frontmcp has no project config file — every build/run target is CLI flags or scattered scripts

1 participant