aws / aws/amazon-q-developer-cli
Feature request: Better debugging of MCP server failures
- Vorherrschende Sprache
- Rust
- Sterne
- 2k
- Forks
- 439
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
### Checks
- [x] I have searched [github.com/aws/amazon-q-developer-cli/issues](https://github.com/aws/amazon-q-developer-cli/issues?q=) and there are no duplicates of my issue
- [x] I have run `q doctor` in the affected terminal session
- [x] I have run `q restart` and replicated the issue again
### Operating system
macOS 15.4.1 (24E263)
### Expected behaviour
Often when trying to setup their own MCP server in Q CLI users see cryptic errors from Q like `Serialization error: invalid number at line 1 column 2`.
Example: https://github.com/aws/amazon-q-developer-cli/issues/1452
Q CLI should instead show a sample of the stdio stream that it failed to parse. This would often highlight a rogue `console.log()` statement or a crash that is polluting the stdio stream with an error message.
In the long run there is tremendous value in Q CLI helping manage the lifecycle (restarting if necessary) and debugging (what was the error message) of MCP servers as well, but it seems like we are currently doing a very minimal implementation that assumes the MCP server is always working properly, and leaves debugging the MCP server up to the user to handle on their own.
### Actual behaviour
Q CLI currently does not surface errors from MCP servers, and does now show any examples of what the stdio output that it failed on actually looked like.
### Steps to reproduce
Run a bad MCP server command, load a crashing MCP server, or launch an MCP server that has random `console.log()` debug statements that pollute the `stdio` stream.
### Environment
```yaml
[q-details]
version = "1.9.1"
hash = "5d2c2807cab9bc6c9dc5fcd05f92c7a979e8a4f7"
date = "2025-04-29T06:22:42.917989Z (6d ago)"
variant = "full"
[system-info]
os = "macOS 15.4.1 (24E263)"
chip = "Apple M3 Pro"
total-cores = 12
memory = "36.00 GB"
[environment]
cwd = "/Users/USER"
cli-path = "/Users/USER"
os = "Mac"
shell-path = "/bin/zsh"
shell-version = "5.9"
terminal = "iTerm 2"
install-method = "unknown"
[env-vars]
PATH = "/Users/USER/.nvm/versions/node/v20.16.0/bin:/Users/USER/.bun/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/opt/podman/bin:/Applications/iTerm.app/Contents/Resources/utilities:/Users/USER/.local/bin:/Users/USER/.toolbox/bin:/Users/USER/.toolbox/bin"
QTERM_SESSION_ID = "4405ee72749041348ac1efeed48f929b"
Q_SET_PARENT_CHECK = "1"
Q_TERM = "1.9.1"
SHELL = "/bin/zsh"
TERM = "xterm-256color"
__CFBundleIdentifier = "com.googlecode.iterm2"
```
Beitragsleitfaden
Rechercherichtung
Das Issue nennt keine Dateien oder Tests. Beginne damit, einen fehlschlagenden MCP-Server oder einen verunreinigten stdio-Stream zu reproduzieren, und finde den Einstiegspunkt für das Parsen von MCP-stdio; abgeschlossen ist die Aufgabe, wenn Q CLI zusammen mit dem Parsing-Fehler einen Ausschnitt des ungültigen Streams anzeigt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- rust
- Bereich
- cli
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100