HeadlinesBriefing favicon HeadlinesBriefing.com

Run Cursor with Local LLM Using LM Studio

DEV Community •
×

Developers can now power the Cursor code editor with a local LLM by combining LM Studio and ngrok. This setup lets you run a model like `zai-org/glm-4.6v-flash` on your own machine, routing requests through a public URL to Cursor's interface. The process involves installing the tools, starting a local server, and configuring Cursor's OpenAI settings to point to your ngrok tunnel.

This approach offers clear advantages over cloud-based AI services. Running inference locally reduces API costs and improves privacy, as sensitive code never leaves your hardware. It also allows experimentation with custom or open-source models that aren't available through commercial APIs. For developers wary of subscription fees or data handling, this method provides a self-contained alternative.

Once configured, the experience mirrors using a hosted model. Cursor sends prompts to your local server, which processes them without external dependencies. This setup is ideal for developers seeking more control over their tools and data. As local LLMs grow more capable, integrating them with powerful editors like Cursor could become a standard workflow for privacy-conscious and cost-sensitive teams.