aws / aws/amazon-q-developer-cli

bug: Workspace specific mcp config (.amazonq/mcp.json) is not loaded

Open
#2,478 5 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

Ubuntu

### Expected behaviour

https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/command-line-mcp-understanding-config.html

Documentation says that q chat will load mcp tools defined in `.amazonq/mcp.json` - Specific to the current workspace, however that file is never loaded.

### Actual behaviour

q chat never loads .amazonq/mcp.json

### Steps to reproduce

```
mkdir q-chat-workspace
cd $_
mkdir .amazonq
echo > .amazonq/mcp.json '{
"mcpServers": {
"false": {
"command": "false",
"timeout": 6000
}
}
}'
q chat
```

q chat does not load the mcp server, there's no error or printed. If you write the same file to the global config (~/.aws/amazonq/mcp.json) you will get an error, so there's nothing wrong with the file format.
```
⚠ 0 of 1 mcp servers initialized. Servers still loading:
- false
```

Running strace to see what files are opened I see that it never references the documented path.
However, it does read some files from .amazonq.
```
$ strace -f q chat |& rg '.amazonq'
[pid 1097374] open("~/q-chat-workspace/.amazonq/cli-agents", O_RDONLY|O_LARGEFILE|O_CLOEXEC|O_DIRECTORY) = -1 ENOENT (No such file or directory)
[pid 1097374] open("~/.aws/amazonq/cli-agents", O_RDONLY|O_LARGEFILE|O_CLOEXEC|O_DIRECTORY
[pid 1097354] stat("~/.aws/amazonq/cli-agents/agent_config.json.example", {st_mode=S_IFREG|0644, st_size=658, ...}) = 0
[pid 1097374] open("~/.aws/amazonq/mcp.json", O_RDONLY|O_LARGEFILE|O_CLOEXEC
[pid 1097354] stat("~/q-chat-workspace/.amazonq", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
[pid 1097354] stat("~/q-chat-workspace/.amazonq", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
[pid 1097354] stat("~/q-chat-workspace/.amazonq/rules", 0x7fffae03fef0) = -1 ENOENT (No such file or directory)
[pid 1097354] stat("~/q-chat-workspace/.amazonq/rules", 0x7fffae03fef0) = -1 ENOENT (No such file or directory)
[pid 1097354] lstat("~/q-chat-workspace/.amazonq/rules", 0x7fffae03fef0) = -1 ENOENT (No such file or directory)

```

### Environment

```yaml
q diagnostic

[q-details]
version = "1.13.0"
hash = "5f91e9a7619f1460eb2a017f4df5ca8d6bcd01fa"
date = "2025-07-31T03:22:55.322798Z (3d ago)"
variant = "minimal"

[system-info]
chip = "Intel(R) Core(TM) Ultra 7 165U"
total-cores = 12
memory = "30.79 GB"

[system-info.os.linux]
kernel_version = "6.11.0-29-generic"
id = "ubuntu"
name = "Ubuntu"
pretty_name = "Ubuntu 24.04.2 LTS"
version_id = "24.04"
version = "24.04.2 LTS (Noble Numbat)"

[environment]
cwd = "~/q-chat-workspace"
cli-path = "~/q-chat-workspace"
os = "Linux"
shell-path = "/usr/bin/zsh"
shell-version = "5.9"
terminal = "Kitty"
install-method = "toolbox"

[env-vars]
DISPLAY = ":0"
GTK_IM_MODULE = "ibus"
PATH = "..."
QT_IM_MODULE = "ibus"
SHELL = "/usr/bin/zsh"
TERM = "xterm-kitty"
XDG_SESSION_DESKTOP = "herbstluftwm"
XDG_SESSION_TYPE = "x11"
XMODIFIERS = "@im=ibus"
```

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.