Surface better errors when MCP configs fail to unmarshal
Instructions for Warp Agent: Perform an investigation only, unless instructed otherwise. When investigating, do not take external actions like making Github comments or opening pull requests.
aloke said:
I had an MCP server that wasn't starting and I could not figure out why.
Ended up spending a ton of time debugging and turns out we require (?) an empty args field in each MCP definition for it to be valid. I've seen at least a few different MCP configs that omit args (see second screenshot) and it seems like an unnecessary requirement.
Also separately, this just silently failed for me. We need better error messaging, I was only able to debug by actually getting agent mode to add debug logs to warp.
Linear: APP-3075
@peicodes
Here's what I found while triaging this issue:
- This looks actionable as an MCP config error-surfacing bug: invalid config entries can fail without a clear visible error.
- Omitted
argsshould not be required for command-based servers in the current parser, so the exact config/version would help confirm whether that part is already fixed or still reproducing in a release build.
I have a few follow-up questions before I can narrow this down:
- Can you paste a redacted text version of the MCP config entry that failed, including the wrapper key it was under?
- Which Warp version/channel reproduced the silent failure?
Reply in-thread with those details and the triage workflow will automatically re-evaluate the issue and update the diagnosis, labels, and next steps.
Maintainer details
I concluded that MCP config-file failures can be swallowed as an empty detected-server set with no visible error, while the specific missing-args requirement is not confirmed in current code..
Triage
This looks like an actionable MCP config error-surfacing bug, with one nuance: the current code does not appear to intentionally require args for command-based MCP servers.
Observed symptom
- An MCP server config that fails to unmarshal/load can result in the server not starting or not appearing usable, without a clear user-facing error.
- The reporter found that adding an empty
argsfield made their config valid, but current code inspection suggests omittedargsshould be accepted in the current parser.
Code findings
app/src/ai/mcp/file_mcp_watcher.rsreads MCP config files and, on read/normalization/env-substitution/parse failures, logs viasafe_warn!and returnsvec![]. The callback then emitsFileMCPWatcherEvent::ConfigParsedwith an empty server list, so downstream UI has no structured error to display.app/src/ai/mcp/file_based_manager.rsapplies the parsed snapshot and drops entries without an installation, again with no parse-error state carried forward.app/src/settings_view/mcp_servers/list_page.rsrefreshes cards from detected installations/server states; it can display runtime server errors, but not config-file parse errors that were lost upstream.- For the
argsclaim specifically,app/src/ai/mcp/mod.rsandapp/src/ai/mcp/parsing.rsuse default empty vectors for command-server args in current code, andapp/src/ai/agent_sdk/mcp_config.rsvalidatesargsonly if the field is present. There is also a unit test covering command configs withoutargs.
Duplicate check
Searched open non-PR issues across the repository for MCP config, args, parse/unmarshal, silent failure, and server-start error candidates. Nearby issues such as #9798, #9111, #8706, and #6566 involve MCP config/save/start behavior, but they do not match this specific config-unmarshal/silent-error failure closely enough to mark as duplicates.
Likely next step
Track parse/load failures as structured file-based MCP config errors and surface them in Settings > MCP Servers and/or agent startup UI, including the config path/provider and validation message. Also verify whether any release branch still requires args despite current master accepting omission.
Question reasoning
- Can you paste a redacted text version of the MCP config entry that failed, including the wrapper key it was under? — The screenshots are not enough to verify whether the failure came from missing args, an unsupported wrapper/schema shape, or another JSON validation problem.
- Which Warp version/channel reproduced the silent failure? — Current master appears to accept command-based MCP configs without args, so version/channel determines whether the args-specific behavior is already fixed or still present in a shipped build.
This is my automated analysis and may be incorrect. A maintainer will verify the details.
Powered by Oz
This issue has been labeled ready-to-implement and is open for contributions involving code changes. If you'd like to tackle it, feel free to open a pull request against this issue. You can also comment @oz-agent on this issue to have the bot draft an implementation PR automatically.
@oss-maintainers Could you clarify how you would like me to handle #13964? This issue was labeled ready-to-implement on June 10, with the follow-up explicitly saying it was open for contributions. I opened #13964 on July 19 while that was still the only readiness state, and Oz reviewed the initial head with 0 critical, 0 important, and 0 suggestions. The warp:reserved-internal label was added on July 21, after the PR was already open, while ready-to-implement remains present. Today’s re-review was blocked solely by the later reservation label. If that reservation is intended to supersede the already-open contribution, I am happy to close the PR; otherwise, could this PR be allowed to continue through review?