cmd.exe interprets & as a command separator, truncating the authorize
URL at the first query parameter. Use windowsVerbatimArguments and /s
to pass the quoted URL through without shell mangling.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Addresses PR review feedback:
- enforceSchemaStringTypes() now early-returns when no number
values are present, avoiding an unconditional loadToolMetadata
call before every tool invocation
- String type check now handles union schemas like
type: ["string", "null"] in addition to type: "string"
Closes#140
When using key=value syntax (e.g. thread_ts=1234567890.123456),
mcporter was coercing numeric-looking values to numbers before
tool invocation. This broke Slack MCP tools where thread_ts is
declared as string in the tool schema.
Added enforceSchemaStringTypes() in call-command.ts that loads
the tool schema after argument parsing and converts any coerced
number back to string if the schema declares that field as
type: string.
When an MCP tool schema declares a parameter with type 'object' (e.g.
Atlassian's editJiraIssue fields parameter), the generated CLI previously
passed the value as a raw string, causing MCP validation errors.
Root cause: inferType() didn't recognize 'object' as a valid type, so it
returned 'unknown'. optionParser() had no case for 'object', so no
JSON.parse was generated for the Commander option.
Changes:
- Add 'object' to GeneratedOption type union in tools.ts
- Add 'object' to resolveType whitelist in inferType()
- Add 'case object' returning JSON.parse in optionParser()
Fixes#113
In Bun compiled binaries, process.argv[1] is a virtual /$bunfs/...
path that Bun auto-injects into every spawned child process. The
daemon launcher was including this path explicitly in the spawn args,
causing it to appear twice in the child's argv. The child then parsed
the duplicate path as the CLI command instead of "daemon", silently
failing to start.
Detect the /$bunfs/ prefix and omit the entry from spawn args, letting
Bun handle it automatically.
Track OAuth flow failures separately from post-auth reconnect
failures so Streamable HTTP can still fall back to legacy SSE
on real 404/405 transport mismatches without masking terminal
provider errors.
Also recreate transports after finishAuth and add regression
coverage for generic 401 promotions, OAuth flow failures, and
post-auth retry paths.
When mcporter imports server definitions from external clients that
include static Authorization headers, these override the OAuth access
token in the SDK, causing 401 retry storms.
Fixes#121
MCP SDK's StreamableHTTPError/SseError store the HTTP status code in
error.code, but the message text may not contain the numeric status.
analyzeConnectionError now reads error.code (100-599) before falling
back to message-text parsing, so OAuth promotion triggers correctly
for 401 responses on Streamable HTTP transport.