Skip to content

fix(mcp): stop pointing users at removed gaia mcp add after init - #1377

Merged
kovtcharov-amd merged 3 commits into
mainfrom
fix/mcp-init-dead-add-guidance
Jun 3, 2026
Merged

kovtcharov-amd merged 3 commits into
mainfrom
fix/mcp-init-dead-add-guidance

Conversation

@kovtcharov-amd

Copy link
Copy Markdown
Collaborator

gaia init --profile mcp finishes by telling the user to run gaia mcp add time "uvx mcp-server-time", and gaia mcp list (empty state) says the same. That command was removed in #977 — anyone who follows the on-screen guidance hits an "invalid choice" error on their very first step. This swaps both messages for the path that works today: edit ~/.gaia/mcp_servers.json directly (shown with a correct mcpServers example) and verify with gaia mcp list. The stale /docs/ doc link is corrected to the live https://amd-gaia.ai/guides/mcp/client too.

Split out of #1298, which purged these same dead gaia mcp add/remove references from the docs but deliberately scoped itself to docs/ — this fixes the matching runtime CLI output that #1298 left untouched. Related to #1075 (init profiles need attention) but distinct from it: #1075 tracks model-download profiles collapsing to Gemma-4-E4B, whereas the mcp profile downloads no model at all and was failing purely on its post-setup guidance.

Test plan

  • pytest tests/unit/installer/test_mcp_init.py — new regression test asserts the guidance contains no gaia mcp add and does point at editing mcp_servers.json
  • gaia init --profile mcp --yes — "Next steps" shows the config-file edit + gaia mcp list, no dead command
  • gaia mcp list (no servers configured) — empty-state guidance shows the config example, no dead command
  • python util/lint.py --black --isort passes

`gaia init --profile mcp` and `gaia mcp list` both printed
`gaia mcp add ...` as the way to register a server, but that command
was removed in #977 — copy-pasting it errors out. Point users at the
path that actually works today: edit ~/.gaia/mcp_servers.json directly
(with a correct mcpServers example) and run `gaia mcp list` to verify.

Runtime counterpart to the docs-only fixes in #1298.
@github-actions github-actions Bot added cli CLI changes tests Test changes labels Jun 3, 2026
@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Code Review

Approve. Tight, correct, well-scoped fix: both runtime messages that pointed users at the removed gaia mcp add now show the path that actually works (edit mcp_servers.json, verify with gaia mcp list), and the new regression test locks the behavior in. I verified every claim in the description holds against the current tree.

Summary

gaia init --profile mcp and the gaia mcp list empty state were both telling first-time users to run a command deleted in #977 — guaranteeing an "invalid choice" error on step one. This swaps both for a valid mcpServers JSON example plus gaia mcp list, and fixes the stale /docs/ link. Confirmed add/remove are gone from the mcp subparsers (src/gaia/cli.py:2496 onward — only start/status/stop/test/agent/docker/serve/list/tools/test-client remain), the JSON example parses, the doc link now resolves to a real page (docs/guides/mcp/client.mdx), and both files use the same canonical https://amd-gaia.ai/guides/mcp/client URL.

Issues

🟢 Same dead reference still lives in the Settings UI (src/gaia/apps/webui/src/components/SettingsModal.tsx:565) — the modal tells users to run gaia mcp add-to-claude, which isn't a registered subcommand anywhere in the backend (not in cli.py, not under connectors). Out of scope for this PR, but it's the same gaia mcp <removed-cmd> class of breakage you're cleaning up here — worth a quick follow-up so the UI doesn't undo the fix.

🟢 Empty-state branch is untested (src/gaia/cli.py:6756) — the new test covers the mcp_init guidance but not handle_mcp_list's no-servers output, so a future edit could silently reintroduce a dead command there. Low risk (plain print() calls), and a CLI test would need to construct args; fine to leave, just flagging the coverage gap.

Strengths

Verdict

Approve — ready to merge. The two 🟢 notes are optional follow-ups, not blockers.

Ovtcharov added 2 commits June 2, 2026 22:55
Restore the amd-gaia.ai/docs/ prefix on the two MCP guidance links —
issue #1058's invariant (tests/unit/test_amd_gaia_urls.py) requires it
for URLs in src/. Also strip newlines before substring-checking the
init guidance, since rich wraps the long config path across lines on
CI's 80-col terminal.
Records the rule that broke this PR's first CI run: amd-gaia.ai URLs in
src/gaia/ must keep the /docs/ prefix (enforced by
tests/unit/test_amd_gaia_urls.py, issue #1058).
@github-actions github-actions Bot added the devops DevOps/infrastructure changes label Jun 3, 2026
@kovtcharov-amd
kovtcharov-amd enabled auto-merge June 3, 2026 06:26
@kovtcharov-amd
kovtcharov-amd added this pull request to the merge queue Jun 3, 2026
Merged via the queue into main with commit f6d21c9 Jun 3, 2026
37 of 38 checks passed
@kovtcharov-amd
kovtcharov-amd deleted the fix/mcp-init-dead-add-guidance branch June 3, 2026 06:27
kovtcharov-amd pushed a commit that referenced this pull request Jun 3, 2026
pull Bot pushed a commit to bhardwajRahul/gaia that referenced this pull request Jun 3, 2026
…p 429 flakes (amd#1379)

The Linux "Full Integration" CI job has been flaking on every release/PR
— including the v0.20.0 release PR (amd#1334) and amd#1377. Root cause: it
pulls `Qwen3-0.6B-GGUF` from HuggingFace **unauthenticated**, so shared
GitHub runners hit `429 Too Many Requests`, Lemonade fails to start, and
the whole job (summarizer/RAG/lemonade-client integration) fails. The
Windows CLI, SD, and Agent SDK jobs already pass `HF_TOKEN` and never
flake — this just brings the Linux job to parity.

After this, the Linux integration job authenticates its model pulls and
stops 429-flaking.

## Test plan
- [ ] CI on this PR: **GAIA CLI Tests (Linux) → Test GAIA CLI on Linux
(Full Integration)** reaches the model pull without a `429` and passes
- [ ] Confirm no secret leakage in logs (GitHub masks `secrets.*`
automatically)

Co-authored-by: Ovtcharov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI changes devops DevOps/infrastructure changes tests Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants