Local AI MCP

v0.6.1
io.github.TMHSDigital/local-ai-mcp Checked 3 days ago Published 1 month ago

Run, fit, and route work to local LLMs (Ollama, LM Studio, llama.cpp, MLX, vLLM, and more).

Values you need

VariableWhat it is
OLLAMA_HOSToptional Ollama base URL Default: http://localhost:11434
LMSTUDIO_HOSToptional LM Studio server base URL Default: http://localhost:1234
LLAMACPP_HOSToptional llama.cpp server (llama-server) base URL Default: http://localhost:8080
DOCKER_MODEL_RUNNER_HOSToptional Docker Model Runner host TCP endpoint Default: http://localhost:12434
MLX_HOSToptional mlx_lm.server base URL (opt-in; Apple Silicon)
VLLM_HOSToptional vLLM OpenAI server base URL (opt-in)
VLLM_API_KEYoptional secret Bearer token for VLLM_HOST (when vLLM runs with --api-key)
FOUNDRY_LOCAL_HOSToptional Foundry Local service URL (opt-in; port from `foundry service status`)
OPENAI_COMPAT_HOSToptional Any OpenAI-compatible /v1 server (opt-in)
OPENAI_COMPAT_API_KEYoptional secret Bearer token for OPENAI_COMPAT_HOST
MOONSHOT_API_KEYoptional secret Moonshot AI (Kimi) key. Hosted: only used when named explicitly.
LOCAL_AI_ALLOW_HOSTED_FALLBACKoptional Allow implicit routing to hosted providers (default: off)
MOONSHOT_HOSToptional Moonshot API base URL Default: https://api.moonshot.ai/v1
LOCAL_AI_DISABLEoptional Comma-separated provider names to skip probing
LOCAL_AI_PROVIDERSoptional JSON array of extra provider instances: {type, host, name?, apiKey?, kind?}
LOCAL_AI_DISABLE_NETWORK_SEARCHoptional Keep search_models offline (catalog only)
LOCAL_AI_BENCHMARK_CACHEoptional 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.1
Add 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

  1. 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).
  2. Restart or reload the client so it starts the server.
  3. Verify: the server should expose these tools: list_providers, list_models, list_loaded, model_info, pull_model, remove_model, load_model, unload_model, ….
  4. 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