Install guide · Cursor
Install Local AI MCP for Cursor
Cursor reads ~/.cursor/mcp.json. A project can also commit .cursor/mcp.json.
Add to Cursor: Local AI MCPInstall in VS Code: Local AI MCPInstall in VS Code Insiders: Local AI MCP
Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.
Open ~/.cursor/mcp.json on macOS, %USERPROFILE%\.cursor\mcp.json on Windows, or ~/.cursor/mcp.json on Linux.
Paste the JSON config below.
Replace placeholder secrets, then restart the client if it does not reload on its own.
{ "mcpServers": { "tmhsdigital-local-ai-mcp": { "command": "npx", "args": [ "-y", "@tmhs/local-ai-mcp@0.6.1" ], "env": { "OLLAMA_HOST": "http://localhost:11434", "LMSTUDIO_HOST": "http://localhost:1234", "LLAMACPP_HOST": "http://localhost:8080", "DOCKER_MODEL_RUNNER_HOST": "http://localhost:12434", "MLX_HOST": "", "VLLM_HOST": "", "VLLM_API_KEY": "YOUR_VLLM_API_KEY", "FOUNDRY_LOCAL_HOST": "", "OPENAI_COMPAT_HOST": "", "OPENAI_COMPAT_API_KEY": "YOUR_OPENAI_COMPAT_API_KEY", "MOONSHOT_API_KEY": "YOUR_MOONSHOT_API_KEY", "LOCAL_AI_ALLOW_HOSTED_FALLBACK": "", "MOONSHOT_HOST": "https://api.moonshot.ai/v1", "LOCAL_AI_DISABLE": "", "LOCAL_AI_PROVIDERS": "", "LOCAL_AI_DISABLE_NETWORK_SEARCH": "", "LOCAL_AI_BENCHMARK_CACHE": "" } } }}
Where the config lives
| System | Path |
|---|---|
| macOS | ~/.cursor/mcp.json |
| Windows | %USERPROFILE%\.cursor\mcp.json |
| Linux | ~/.cursor/mcp.json |