aws / aws/amazon-q-developer-cli

MCP servers not loading due to "Agent missing path info" error

Đang mở
#2,452 20 bình luận 4 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Rust
Star
2k
Fork
439
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### 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.5.0 (24F74)

### Expected behaviour

MCP servers should load properly and be available for use in Q chat. The `q mcp list` command should show configured servers with their status.

### Actual behaviour

MCP servers fail to load with "Agent missing path info" error. When running `q mcp list`, it returns "error: Agent missing path info". The `q agent list` command shows "q_cli_default **No path found**" indicating the default agent configuration is corrupted or missing path information.

```
[chat-transcript]
Great! I can see that `export PATH="$HOME/.local/bin:$PATH"` is already in your `.zshrc` file. However, the Q CLI agent migh

The issue is that we're running bash but trying to source a zsh configuration file. Let's check the current PATH to see if `~/.local/bin` is there:
[Tool uses: execute_bash]

The PATH issue is still there. Let's manually add `~/.local/bin` to the PATH for this session and then restart the Q CLI:
[Tool uses: execute_bash]

[Tool uses: execute_bash]

[Tool uses: execute_bash]

The PATH export didn't work as expected. Let me try a different approach. The issue might be that the Q CLI agent is running with a different environment. Let's try to kill all Q CLI processes and restart them:
[Tool uses: execute_bash]

[Tool uses: execute_bash]

The processes are still running. Let me try a more forceful approach:
[Tool uses: execute_bash]

Now let's try a different approach. The issue might be that the MCP servers configuration is pointing to the wrong path for `uvx`. Let's modify the MCP configuration to use the full path:
[Tool uses: fs_read]

> you've tried all of this before. i dont understand how your edits arent working

You're absolutely right - I apologize for going in circles. Let me take a step back and think about this differently.

The core issue is that the Q CLI is giving an "Agent missing path info" error, which suggests there's a fundamental problem with how the Q CLI agent is configured or running, not just a PATH issue.

Let me try a few more targeted approaches:

1. **Check if there's an agent configuration issue:**
[Tool uses: execute_bash]

2. **Try updating Q CLI to see if it's a version issue:**
[Tool uses: execute_bash]

[Tool uses: execute_bash]

3. **The "Agent missing path info" error might be a known issue. Let me check if there's a way to reinitialize the agent:**
[Tool uses: execute_bash]

This is interesting! There are agent commands. Let me check what agents are available:
[Tool uses: execute_bash]

There it is! The agent `q_cli_default` has "**No path found**" - this is exactly the "Agent missing path info" issue. This suggests the default agent configuration is broken.

Let me try to see if we can fix this by setting a default agent or recreating the agent configuration:
[Tool uses: execute_bash]

The issue seems to be that the default agent configuration is missing its path. This might be a bug or corruption in the Q CLI installation.

At this point, I think the best approach would be to:

1. **Report this as a bug** since "Agent missing path info" with "No path found" suggests a corrupted installation
2. **Try reinstalling Q CLI** to fix the agent configuration

Would you like me to help you report this issue or try a reinstallation? The MCP servers themselves seem to be configured correctly - the problem is with the Q CLI agent system that manages them.
[Tool uses: none]

> both please

I'll help you with both - reporting the issue and trying a reinstallation.

## 1. First, let's report this as a bug:
[Tool uses: report_issue]

(...truncated)
```

### Steps to reproduce

1. Configure MCP servers in ~/.config/q/mcp-servers.json (servers are properly configured with valid paths)
2. Run `q mcp list` - returns "Agent missing path info" error
3. Run `q agent list` - shows "q_cli_default **No path found**"
4. Run `q doctor` - shows PATH issues but MCP servers still don't load even after fixing PATH
5. MCP server executables exist and are accessible (uvx, builder-mcp, amzn-mcp all found in expected locations)

### Environment

```yaml

[q-details]
version = "1.13.0"
hash = "7dee6efdf68f6343e80a56028e6b40f8eff77746"
date = "2025-07-31T02:57:26.581678Z (21h ago)"

[system-info]
os = "macOS 15.5.0 (24F74)"
chip = "Apple M1 Pro"
total-cores = 10
memory = "32.00 GB"

[environment]
cwd = "/Users/USER/10_ATOM_Active/current"
cli-path = "/Users/USER/10_ATOM_Active/current"
install-method = "toolbox"

[env-vars]
PATH = "/opt/homebrew/bin:/opt/homebrew/sbin:/Users/USER/.toolbox/bin:/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:/usr/local/go/bin:/Users/USER/.cargo/bin:/Applications/Visual Studio Code.app/Contents/Resources/app/bin:/opt/homebrew/opt/fzf/bin:/Users/USER/Library/Application Support/Code/User/globalStorage/github.copilot-chat/debugCommand"
SHELL = "/bin/zsh"
TERM = "xterm-256color"
ZDOTDIR = "/Users/USER"
__CFBundleIdentifier = "com.microsoft.VSCode"

[chat-settings]

[chat-trusted_tools]
execute_bash=trusted
fs_read=trusted

[chat-failed_request_ids]
none

[chat-context]
current_profile=q_cli_default
profile_context=
AmazonQ.md
README.md
.amazonq/rules/**/*.md

files=none
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện lỗi với ~/.config/q/mcp-servers.json, sau đó so sánh đầu ra của q mcp list, q agent list và q doctor trên phiên bản và môi trường macOS được báo cáo. Truy vết cấu hình tác nhân q_cli_default mặc định và các điểm vào của việc tải MCP; công việc được hoàn tất khi các máy chủ đã cấu hình được tải và q mcp list báo cáo trạng thái của chúng mà không có lỗi thiếu đường dẫn.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
rust, shell
Lĩnh vực
cli
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.