LearnNewsExamplesServices
Frontmatter
id7942
titleFeat: Enable External Configuration and Generic Runner for MCP Client CLI
stateClosed
labels
enhancementairefactoring
assigneestobiu
createdAtNov 30, 2025, 12:56 AM
updatedAtNov 30, 2025, 1:18 AM
githubUrlhttps://github.com/neomjs/neo/issues/7942
authortobiu
commentsCount1
parentIssue7931
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtNov 30, 2025, 1:18 AM

Feat: Enable External Configuration and Generic Runner for MCP Client CLI

Closed v11.14.0 enhancementairefactoring
tobiu
tobiu commented on Nov 30, 2025, 12:56 AM

To align the MCP Client CLI with the server-side runner architecture, this task will enhance ai/mcp/client/mcp-stdio.mjs to support loading external configuration files via a -c option and remove unnecessary environment setup specific to direct Node.js execution.

Deliverables

  1. Refactor ai/mcp/client/mcp-stdio.mjs:
    • Remove #!/usr/bin/env node shebang.
    • Remove dotenv import and usage.
    • Add a Commander option -c, --config <path> for specifying an external client configuration file.
    • Integrate ClientConfig.load(options.config) to load and merge external configurations.
    • Make --server <name> option optional (default action TBD, perhaps list available servers or require it for specific commands).
  2. Update Documentation: Ensure JSDoc and comments reflect the new usage.
tobiu assigned to @tobiu on Nov 30, 2025, 12:56 AM
tobiu added the enhancement label on Nov 30, 2025, 12:56 AM
tobiu added the ai label on Nov 30, 2025, 12:56 AM
tobiu added the refactoring label on Nov 30, 2025, 12:56 AM
tobiu added parent issue #7931 on Nov 30, 2025, 12:57 AM
tobiu referenced in commit 5b4e52b - "Feat: Enable External Configuration and Generic Runner for MCP Client CLI #7942" on Nov 30, 2025, 1:17 AM
tobiu
tobiu Nov 30, 2025, 1:17 AM

Input from Gemini 2.5:

✦ I have enabled external configuration and refactored the MCP Client CLI.

Deliverables Completed

  1. Refactor ai/mcp/client/mcp-stdio.mjs:
    • Removed #!/usr/bin/env node and dotenv usage.
    • Added -c, --config option for external configuration files.
    • Updated initialization logic to pass the config file path to the Client instance.
    • Imported ClientConfig (as aiConfig) to handle debug flag consistently.
  2. Refactor ai/mcp/client/Client.mjs:
    • Added configFile config option.
    • Updated initAsync to load the external configuration if provided, using ClientConfig.load() and handling errors via console.error.
    • Removed complex path resolution logic.

The CLI now matches the server-side runner pattern, offering better DX and consistency.

tobiu closed this issue on Nov 30, 2025, 1:18 AM