aws / aws/amazon-q-developer-cli

[MCP] Docker container keep running after IDE exit

Open
#1,863 5 comments 2 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
2k
Forks
439
PR merge metrics
No merged PRs in 30d

Description

### 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)
IntelliJ IDEA 2025.1.1.1 (Ultimate Edition)

### Expected behaviour

Quitting IntelliJ should make Q Chat exit graciously, letting Q chat stop any running MCP server container.

### Actual behaviour

When IntelliJ stops, MCP servers keep running in the docker daemon.
(that doesn't happen when Q exits via Cmd+C or /quit)

### Steps to reproduce

1. Launch Q Chat with a docker-based MCP server (try the great `aws-service-authorization-reference-mcp-server`if you haven't given it a try yet)

```
{
"mcpServers": {
"aws-service-authorization-reference": {
"command": "docker",
"args": ["run", "-i", "--rm", "psantus86/aws-service-authorization-reference-mcp-server:latest"]
}
}
}

```

2. Exit IntelliJ using Cmd+Q or menu

### Environment

```yaml

[q-details]
version = "1.10.0"
hash = "d1552a6c1523a4235fc321a46ec16d0fc5b01c5c"
date = "2025-05-15T23:15:42.473878Z (12h ago)"
variant = "full"

[system-info]
os = "macOS 15.4.1 (24E263)"
chip = "Apple M2 Pro"
total-cores = 10
memory = "16.00 GB"

[environment]
cwd = "/Users/USER/IdeaProjects/Emiles/emiles-shop-v2"
cli-path = "/Users/USER/IdeaProjects/Emiles/emiles-shop-v2"
os = "Mac"
shell-path = "/bin/zsh"
shell-version = "5.9"
terminal = "IDEA Ultimate"
install-method = "unknown"

[env-vars]
DISPLAY = "/private/tmp/com.apple.launchd.BI12LIGnmn/org.xquartz:0"
PATH = "/Users/USER/Library/pnpm:/opt/homebrew/opt/mysql-client@8.4/bin:/opt/homebrew/opt/mysql-client/bin:/Users/USER/.nvm/versions/node/v22.14.0/bin:/Users/USER/.goenv/versions/1.20.7/bin:/Users/USER/.goenv/bin:/Library/Frameworks/Python.framework/Versions/3.12/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/X11/bin:/Library/Apple/usr/bin:/usr/local/MacGPG2/bin:/Users/USER/IdeaProjects/Emiles/emiles-shop-v2/node_modules/.bin:/Users/USER/.local/bin:/Users/USER/.goenv/shims:/Users/USER/go/1.20.7/bin:/Users/USER/Library/Python/3.9/bin:/Users/USER/Library/apache-maven-3.9.5/bin"
QTERM_SESSION_ID = "9cfc5a89d34343819b5f5f09a78dba17"
Q_SET_PARENT_CHECK = "1"
Q_TERM = "1.10.0"
SHELL = "/bin/zsh"
TERM = "xterm-256color"
__CFBundleIdentifier = "com.jetbrains.intellij"
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.