镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

CLI (v2.13.0): server command placed after --tool-arg flags fails with "Invalid parameter format: node" — make positional parsing order-tolerant or fix the error message #2860

Closed

Description

@wenbiyou

Environment

  • @modelcontextprotocol/inspector 2.13.0, CLI mode (--cli)
  • Linux (WSL2), Node v26.12.1; reproduced 2026-10-30 against a local stdio MCP server

Problem

With --tool-arg present, the server command must precede the flags. Placing it after the options — a common CLI convention — fails with Invalid parameter format: node: the first token of the server command is apparently consumed as a parameter value.

Minimal repro (works — command first, per our docs)

inspector --cli node dist/server.mjs --format json --method tools/call \
  --tool-name code-search --tool-arg action=dirs --tool-arg project=web-fms \
  --tool-arg path=src --tool-arg depth=1
# ✓ exit 0, JSON result

Minimal repro (fails — command last)

inspector --cli --format json --method tools/call \
  --tool-name code-search --tool-arg action=dirs node dist/server.mjs
# ✗ Invalid parameter format: node

Expected

  1. Order tolerance: treat the first non-flag token(s) as the server command regardless of position; or
  2. If strict ordering is intended, the error should say so, e.g. "Server command must be the first positional argument, before options such as --tool-arg" — Invalid parameter format: node reads like a data-format error in the tool arguments and misdirects debugging.

Notes

Activity

  1. added
    v2Issues and PRs for v2
    bugSomething isn't working
    on Nov 5, 2026
  2. cliffhall commented on Nov 5, 2026

    @cliffhall
    Member

    Triage: Priority Low (total 5)

    • Severity 2 — minor friction with an easy workaround (put the server command before the options, as documented); the misleading Invalid parameter format message is the real cost
    • Urgency 2 — wanted eventually, nothing blocked on it
    • Bonuses: +1 bug label

    Board: #28, Status Incoming (awaiting maintainer review — no milestone yet).

  3. added this to the v2.15.0 milestone on Nov 5, 2026
  4. self-assigned this
    on Nov 5, 2026
  5. cliffhall commented on Nov 5, 2026

    @cliffhall
    Member

    Fixed by #2892 (merged into v2/main as 9965347).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingv2Issues and PRs for v2

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions