One MCP server for every local model runtime. It knows what fits your GPU, and it never sends a prompt to the cloud unless you tell it to.
An operations-first control plane for the models on your own machine. Your agent can see what is installed and loaded across runtimes, check what will actually fit in your VRAM, get models ready, and hand work to the best local model with one delegate call. It runs over stdio only and never opens a network listener.
Each provider is local or hosted. Calls without a provider argument only use live local providers that have the model. Hosted APIs such as Moonshot are used only when named explicitly, or when you set LOCAL_AI_ALLOW_HOSTED_FALLBACK=1. Every result reports provider, host and local.
fit_check sizes the KV cache from the model's real layer architecture, sums VRAM across GPUs, models partial GPU/CPU offload and quantized KV caches, and understands Apple Silicon unified memory. Hardware probes cover NVIDIA, AMD (Linux sysfs, Windows registry), Intel, and Apple Silicon.
| Runtime | Enabled by | Notes |
|---|---|---|
| Ollama | default localhost:11434 | Full lifecycle; pull progress; contextLength sets num_ctx. |
| LM Studio | default localhost:1234 | Lifecycle via the lms CLI (TTL, context length). |
| llama.cpp | default localhost:8080 | /health, /props, /slots, embeddings. |
| Docker Model Runner | default localhost:12434 | Pull with progress, remove, OpenAI routes under /engines/v1. |
| MLX | MLX_HOST | mlx_lm.server on Apple Silicon. |
| vLLM | VLLM_HOST | KV-cache usage and queue depth from /metrics. |
| Foundry Local | FOUNDRY_LOCAL_HOST | Download, load and unload via its REST API. |
| OpenAI-compatible | OPENAI_COMPAT_HOST | Jan, LocalAI, and other /v1 servers. |
| Moonshot AI (Kimi) | MOONSHOT_API_KEY | Hosted: only used when named explicitly. |
One call: pick, ready, and run the best local model for a task.
Completion with JSON-schema output, images, context length, streaming.
Embeddings, one vector per input.
Pull, fit-check, evict-to-fit, load, verify.
gpu / partial / cpu / none, with the numbers.
Best models for a task on this machine.
Hugging Face GGUF search with per-quant fit.
Offline curated catalog.
Runtimes, kind, live status, capabilities.
Installed models per runtime.
Resident models and VRAM use.
Metadata and layer architecture.
Download with progress.
Asks you to confirm via elicitation.
Load with keep-alive and context length.
Free VRAM/RAM.
TTFT and tokens/sec; compare models.
Reachability, version, runtime metrics.
RAM, CPU, GPUs and VRAM.
Claude Code
claude mcp add local-ai -- npx -y @tmhs/local-ai-mcp
Claude Desktop: open the .mcpb bundle from the latest release. Any other client:
{ "mcpServers": { "local-ai": { "command": "npx", "args": ["-y", "@tmhs/local-ai-mcp"] } } }
Configuration is through environment variables; see the README and .env.example.