feat(cli)+fix(mcpd): server-side LLM status + SPA fallback 500 #60
Reference in New Issue
Block a user
Delete Branch "feat/status-server-llms-and-spa-fix"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Two related fixes:
1. `mcpctl status` shows server-side LLMs. A new "Server LLMs:" section lists the mcpd-managed Llm rows (the ones registered via `mcpctl create llm`), grouped by tier with type, model, upstream URL, and key reference. JSON/YAML output gains a `serverLlms` array.
```
mcpctl v0.0.1
mcplocal: ... (connected)
mcpd: https://mcpctl.ad.itaz.eu (connected)
Auth: logged in as Michal
...
LLM: ... ✓ ok
Server LLMs: 2 registered
fast qwen3-thinking (openai → qwen3-thinking) http://litellm.../v1 key:litellm/MCPCTL_GATEWAY_TOKEN
heavy sonnet (anthropic → claude-sonnet-4-5) provider default no key
```
If mcpd is unreachable or returns a non-200 the section is silently omitted (the existing mcpd connectivity line already says that).
2. `/ui/` was 500ing. The SPA fallback called `reply.sendFile` but `@fastify/static` was registered with `decorateReply: false`, so the method was undefined. Read `index.html` once at startup and `reply.send(html)` instead — same effect, no per-request stat, no method missing.
Test plan
🤖 Generated with Claude Code