feat: mcpctl provider <name> {up,down,status} for managed LLMs #73
Reference in New Issue
Block a user
Delete Branch "feat/provider-lifecycle-cli"
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
Lifecycle control for managed local LLM providers without restarting
mcplocal (which would drop the SSE connection to mcpd and force every
virtual Llm to re-publish).
mcplocal exposes three endpoints:
GET /llm/providers/:name/statusPOST /llm/providers/:name/startPOST /llm/providers/:name/stopup/downreturn 400 for non-managed providers (anthropic, openai,gemini-cli) — stopping an API-key provider is meaningless.
statusreturns
{ managed: false }for them so introspection still works.enable/disable(persistent across mcplocal restarts) is deferred —needs a
disabledflag on the config schema, which is a bigger change.Test plan
mcpctl provider vllm-local statusreturns running statemcpctl provider vllm-local downreleases GPU memory (verify withnvidia-smi)mcpctl provider vllm-local upbrings it back, next chat worksmcpctl provider anthropic upreturns the "not managed" 400🤖 Generated with Claude Code
Adds lifecycle control for managed local LLM providers (vllm-managed) without the nuclear option of restarting mcplocal. Practical use: mcpctl provider vllm-local down # release GPU memory now mcpctl provider vllm-local up # warm up before the next chat mcpctl provider vllm-local status # see state, pid, uptime mcplocal exposes three new endpoints: GET /llm/providers/:name/status → returns lifecycle state for managed providers, { managed: false } for unmanaged (anthropic, openai, …) POST /llm/providers/:name/start → calls warmup() (202 + initial state) POST /llm/providers/:name/stop → calls dispose() (200 + post-stop state) Stop and start return 400 for non-managed providers — stopping an API-key provider is meaningless. The CLI surfaces the error verbatim. Restarting mcplocal would also free the GPU but drops the SSE connection to mcpd and forces every virtual Llm to re-publish; this is the targeted, non-disruptive escape hatch. The completions test gained a `topLevelMarkers` filter so a sub-command named `status` (under `provider`) doesn't trip the existing "non-project commands must guard with __mcpctl_has_project" rule. Tests: cli 437/437, mcplocal 731/731. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>