fix: instance completions use server.name, smart attach/detach #32

Merged
michal merged 1 commits from fix/completion-instances-attach-detach into main 2026-02-23 19:32:35 +00:00
Owner

Summary

  • instances: no name field — use server.name for completions instead (was showing null)
  • attach-server: now shows only servers NOT already attached to the project
  • detach-server: now shows only servers currently IN the project
  • New helper functions: __mcpctl_get_project_value, __mcpctl_project_servers, __mcpctl_available_servers
  • 5 new tests covering all three fixes (both fish and bash)

Test plan

  • 288 CLI tests pass (19 completion tests)
  • Verified mcpctl get instances -o json | jq '.[][].server.name' returns instance server names
  • Verified mcpctl --project homeautomation get servers -o json | jq '.[][].name' returns project servers
## Summary - **instances**: no `name` field — use `server.name` for completions instead (was showing `null`) - **attach-server**: now shows only servers NOT already attached to the project - **detach-server**: now shows only servers currently IN the project - New helper functions: `__mcpctl_get_project_value`, `__mcpctl_project_servers`, `__mcpctl_available_servers` - 5 new tests covering all three fixes (both fish and bash) ## Test plan - [x] 288 CLI tests pass (19 completion tests) - [x] Verified `mcpctl get instances -o json | jq '.[][].server.name'` returns instance server names - [x] Verified `mcpctl --project homeautomation get servers -o json | jq '.[][].name'` returns project servers
michal added 1 commit 2026-02-23 19:32:27 +00:00
fix: instance completions use server.name, smart attach/detach
Some checks failed
CI / lint (pull_request) Has been cancelled
CI / typecheck (pull_request) Has been cancelled
CI / test (pull_request) Has been cancelled
CI / build (pull_request) Has been cancelled
CI / package (pull_request) Has been cancelled
c5b8cb60b7
- Instances have no name field — use server.name for completions
- attach-server: show only servers NOT in the project
- detach-server: show only servers IN the project
- Add helper functions for project-aware server completion
- 5 new tests covering all three fixes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
michal merged commit 677d34b868 into main 2026-02-23 19:32:35 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: michal/mcpctl#32