aws / aws/amazon-q-developer-cli

qchat mcp add fails in workspace scope

Open
#2,852 0 comments 0 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.6.1 (24G90)

### Expected behaviour

Upon running a command such as:
qchat mcp add --scope workspace --name awslabs-aws-serverless --command uvx --args "awslabs.aws-serverless-mcp-server@latest,--allow-write,--allow-sensitive-data-access"

a .amazonq directory should be created if it doesnt already exist, and the configuration should be placed in this directory
It appears when a user runs the qchat mcp add command in the workspace scope, if there is not already a .amazonq directory, it fails.

### Actual behaviour

The user gets an error:
error: No such file or directory (os error 2)

because the .amazonq directory does not yet exist

### Steps to reproduce

```
mkdir ~/q-issue-test
cd ~/q-issue-test
qchat mcp add --scope workspace --name awslabs-aws-serverless --command uvx --args "awslabs.aws-serverless-mcp-server@latest,--allow-write,--allow-sensitive-data-access"
cd ~
rm -rf ~/q-issue-test
```

### Environment

```yaml

[q-details]
version = "1.15.0"
hash = "eb8db5c635fc469f3bd94ead16bb4bfb32d7443b"
date = "2025-09-02T17:57:24.662205Z (10d ago)"
variant = "full"

[system-info]
os = "macOS 15.6.1 (24G90)"
chip = "Apple M3 Pro"
total-cores = 12
memory = "36.00 GB"

[environment]
cwd = "/Users/USER/Downloads/project"
cli-path = "/Users/USER/Downloads/project"
os = "Mac"
shell-path = "/bin/zsh"
shell-version = "5.9"
terminal = "macOS"
install-method = "brew"
```

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.