Skip to content

Feat/cli mcp config - #27

Merged
osimuka merged 8 commits into
mainfrom
feat/cli-mcp-config
Oct 13, 2026
Merged

osimuka merged 8 commits into
mainfrom
feat/cli-mcp-config

Conversation

@osimuka

@osimuka osimuka commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Describe the problem and the changes in this pull request.

Validation

  • npm run typecheck
  • npm run build
  • npm test

Checklist

  • Tests added or updated where behavior changed
  • Documentation updated where needed
  • No secrets or generated credentials are included
  • Changes are focused and backward-compatible, or breaking changes are documented

osimuka and others added 2 commits October 11, 2026 22:48
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Invalid enabled values can silently enable servers, and the new documentation interrupts existing runtime instructions.

2 open findings
What changed in this PR

Adds JSON-based MCP server configuration to interactive CLI chat.

Changes:

  • Adds --mcp-config parsing and agent integration.
  • Adds parser tests and usage documentation.
  • Bumps package version to 0.4.2.
File Description
cli.ts Loads MCP configuration for chat mode.
api/​core/​library/​mcpSettings.ts Parses and sanitizes configuration files.
tests/​mcpSettings.test.ts Tests supported and malformed configurations.
README.md Documents CLI MCP usage.
package.json, package-lock.json Bumps package version.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread api/core/library/mcpSettings.ts Outdated
Comment thread README.md Outdated
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The parser rejects common keyed MCP configurations and silently rewrites malformed executable fields.

0 open findings

2 resolved since last review
Previously missed (1)

In code that hasn't changed since last review

Medium severity Support keyed-object MCP configurations

api/​core/​library/​mcpSettings.ts:281

mcpServers is commonly an object keyed by server name (for example, { "mcpServers": { "filesystem": { "command": "npx", ... } } }), but this parser only accepts an array. As a result, existing Claude/Cursor-style MCP config files passed to the new CLI option are rejected even though the option is presented as loading an MCP config. Please accept the keyed-object form as well and derive stable id/name values from each key.

🧠 Review effort: Balanced

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@osimuka
osimuka requested a balanced review from Copilot October 13, 2026 17:27
@osimuka osimuka self-assigned this Oct 13, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Config validation can silently switch malformed remote entries to local execution and discard invalid authentication headers.

2 open findings

🧠 Review effort: Balanced

Comment thread api/core/library/mcpSettings.ts
Comment thread api/core/library/mcpSettings.ts
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Malformed HTTP headers can pass configuration validation and cause the MCP server to be silently skipped.

0 open findings

2 resolved since last review

🧠 Review effort: Balanced

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Configured PATH environment overrides are discarded before MCP child processes launch.

0 open findings

Previously missed (2)

In code that hasn't changed since last review

Medium severity Report an explicit error for URLs exceeding the maximum length

api/​core/​library/​mcpSettings.ts:358

URLs over MAX_URL_LENGTH take this branch but report that the value is not a non-empty string, which gives users the wrong remediation. Split the length check so oversized URLs get an explicit size-limit error.

Medium severity Preserve configured PATH when building child process environment

api/​core/​library/​mcpSettings.ts:435

A PATH supplied through this config is not actually preserved for the child process: createTransportParams merges server.env and then unconditionally replaces env.PATH in api/core/agent/tools/mcpTools.ts:207-211. This contradicts the documented merged env behavior and can prevent configured executables from being found. Build the augmented path from the merged value, or otherwise retain the config override.

🧠 Review effort: Balanced

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

PATH augmentation corrupts configured Windows PATH values by using a POSIX-only separator.

2 open findings

🧠 Review effort: Balanced

Comment thread api/core/agent/tools/mcpTools.ts
Comment thread tests/mcpTools.test.ts Outdated
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The implementation is validated, documented, backward-compatible, and has focused automated tests.

0 open findings

2 resolved since last review

🧠 Review effort: Balanced

@osimuka
osimuka merged commit 17b8cc1 into main Oct 13, 2026
5 checks passed
@osimuka
osimuka deleted the feat/cli-mcp-config branch October 13, 2026 23:21
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.

2 participants