Local AI MCP
v0.6.1Run, fit, and route work to local LLMs (Ollama, LM Studio, llama.cpp, MLX, vLLM, and more).
Values you need
| Variable | What it is | |
|---|---|---|
OLLAMA_HOST | optional | Ollama base URL Default: http://localhost:11434 |
LMSTUDIO_HOST | optional | LM Studio server base URL Default: http://localhost:1234 |
LLAMACPP_HOST | optional | llama.cpp server (llama-server) base URL Default: http://localhost:8080 |
DOCKER_MODEL_RUNNER_HOST | optional | Docker Model Runner host TCP endpoint Default: http://localhost:12434 |
MLX_HOST | optional | mlx_lm.server base URL (opt-in; Apple Silicon) |
VLLM_HOST | optional | vLLM OpenAI server base URL (opt-in) |
VLLM_API_KEY | optional secret | Bearer token for VLLM_HOST (when vLLM runs with --api-key) |
FOUNDRY_LOCAL_HOST | optional | Foundry Local service URL (opt-in; port from `foundry service status`) |
OPENAI_COMPAT_HOST | optional | Any OpenAI-compatible /v1 server (opt-in) |
OPENAI_COMPAT_API_KEY | optional secret | Bearer token for OPENAI_COMPAT_HOST |
MOONSHOT_API_KEY | optional secret | Moonshot AI (Kimi) key. Hosted: only used when named explicitly. |
LOCAL_AI_ALLOW_HOSTED_FALLBACK | optional | Allow implicit routing to hosted providers (default: off) |
MOONSHOT_HOST | optional | Moonshot API base URL Default: https://api.moonshot.ai/v1 |
LOCAL_AI_DISABLE | optional | Comma-separated provider names to skip probing |
LOCAL_AI_PROVIDERS | optional | JSON array of extra provider instances: {type, host, name?, apiKey?, kind?} |
LOCAL_AI_DISABLE_NETWORK_SEARCH | optional | Keep search_models offline (catalog only) |
LOCAL_AI_BENCHMARK_CACHE | optional | Benchmark results file used to rank delegate by measured speed (default: per-user cache dir; off disables) |
npm (npx) discovery passed
Requires Node.js 18+
Run in a terminal
claude mcp add local-ai-mcp -- npx -y @tmhs/local-ai-mcp@0.6.1Add to
claude_desktop_config.json{
"mcpServers": {
"local-ai-mcp": {
"args": [
"-y",
"@tmhs/local-ai-mcp@0.6.1"
],
"command": "npx"
}
}
}Add to
~/.cursor/mcp.json{
"mcpServers": {
"local-ai-mcp": {
"args": [
"-y",
"@tmhs/local-ai-mcp@0.6.1"
],
"command": "npx"
}
}
}Add to
.vscode/mcp.json{
"servers": {
"local-ai-mcp": {
"args": [
"-y",
"@tmhs/local-ai-mcp@0.6.1"
],
"command": "npx",
"type": "stdio"
}
}
}Add to
~/.codex/config.toml[mcp_servers.local-ai-mcp]
command = "npx"
args = ["-y", "@tmhs/local-ai-mcp@0.6.1"]For AI agents
- Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
- Restart or reload the client so it starts the server.
- Verify: the server should expose these tools: list_providers, list_models, list_loaded, model_info, pull_model, remove_model, load_model, unload_model, ….
- If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.
Machine-readable: install.md · manifest.json