Menu

AI

LM Studio MCP Setup: Use MCP Servers With Local Models (mcp.json Guide)

Connect MCP servers to local models in LM Studio: where mcp.json lives, the Cursor-style format, one-click install links, tool confirmations and token use.

By: Irina ShvayaNovember 2, 2026

LM Studio MCP Setup: Use MCP Servers With Local Models (mcp.json Guide)

This guide is part of our MCP setup guides, within The MCP Guide. Paths are checked against each app's documentation on the date shown.

LM Studio can act as an MCP host, so a model running on your own computer can call MCP tools. To add a server, open the Program tab in the right-hand sidebar and click Install > Edit mcp.json. Paste a server entry in the same mcpServers format Cursor uses, and save.

The file itself lives at ~/.lmstudio/mcp.json on macOS and Linux, and %USERPROFILE%/.lmstudio/mcp.json on Windows. LM Studio recommends editing it in the built-in editor. MCP support arrived in LM Studio 0.3.17 and covers both local and remote servers.

Checked against: LM Studio's MCP documentation, MCP deeplink documentation and 0.3.17 release post on 2 November 2026. eSEOspace did not test LM Studio.

Key Takeaways

  • LM Studio has supported MCP since version 0.3.17, for both local and remote servers.
  • Servers go in mcp.json, which "follows Cursor's mcp.json notation."
  • Developers can publish an "Add to LM Studio" button that installs a server with one click.
  • LM Studio shows a confirmation dialog for each tool call, and you can edit arguments before running.
  • Some servers built for large cloud models use many tokens, which can overflow a small local model's context.

Why use MCP with a local model?

Running a model in LM Studio keeps your prompts on your machine. Adding MCP lets that local model look things up or take actions. LM Studio's release post describes itself as an "MCP Host," the same role Claude Desktop plays. Keep in mind that a remote MCP server still sends data to its own service, even if the model is local. Our remote vs local MCP lesson explains the difference.

Step 1: Open mcp.json

  1. Open LM Studio (0.3.17 or later).
  2. Switch to the Program tab in the right-hand sidebar.
  3. Click Install > Edit mcp.json.

The file opens in LM Studio's own editor. If you prefer your own editor, the 0.3.17 release post gives the paths:

OSPath
macOS~/.lmstudio/mcp.json
Linux~/.lmstudio/mcp.json
Windows%USERPROFILE%/.lmstudio/mcp.json

Step 2: Add a server

LM Studio's docs use the Hugging Face MCP server as their example. It is a remote server, so it needs a URL and a token header:

{
  "mcpServers": {
    "hf-mcp-server": {
      "url": "https://huggingface.co/mcp",
      "headers": {
        "Authorization": "Bearer <YOUR_HF_TOKEN>"
      }
    }
  }
}

Replace <YOUR_HF_TOKEN> with your Hugging Face access token. Checked against LM Studio's docs on 2 November 2026.

A local server uses command and args in the same way as Cursor. For example, this standard entry runs the official Filesystem server:

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/you/Documents"]
    }
  }
}

The release post says LM Studio starts "a separate process for each MCP server," and that servers relying on npx or uvx need those tools installed and on your system PATH. The MCP config generator can produce these blocks.

LM Studio's docs give one paste tip: "When adding MCP servers manually, copy only the content after "mcpServers": { and before the closing }." In other words, add the server entry inside the existing object rather than nesting a second mcpServers.

Server publishers can offer an "Add to LM Studio" button. It uses a deeplink in this form:

lmstudio://add_mcp?name=hf-mcp-server&config=<base64-encoded JSON>

The config parameter is the server's JSON entry, Base64-encoded. LM Studio's deeplink page includes a generator. As with any one-click install, read what the server is before you click.

Step 4: Approve tool calls

The release post explains that when a model calls a tool, "LM Studio will show a confirmation dialog." You can review the arguments, edit them if needed, and choose to allow once or always. If you pick always, the dialog stops appearing for that tool. You can undo that later in App Settings, under the Tools & Integrations area.

Start with "allow once" for anything that writes files or sends data. Our permissions and approvals lesson explains why.

Watch your context window

LM Studio's docs warn that "some MCP servers were designed to be used with Claude, ChatGPT, Gemini and might use excessive amounts of tokens." This "may quickly bog down your local model and trigger frequent context overflows." Practical steps:

  • Add one server at a time and test it.
  • Prefer servers with a small, focused tool list.
  • Load a model with a larger context length if your hardware allows it.

Use MCP through LM Studio's API

For developers, LM Studio's MCP via API docs say version 0.4.0 or newer can use MCP in API requests. Servers can be defined per request as "ephemeral" servers, or referenced from mcp.json.

Security notes

LM Studio's own docs put it bluntly: "Never install MCPs from untrusted sources." Some servers "can run arbitrary code, access your local files, and use your network connection." Check a server with our MCP server risk checklist before adding it.

Next step

If you need MCP for a team rather than one laptop, compare hosted clients in our best MCP clients roundup. For the basics of what a server can do, start with what is an MCP server.

More in the MCP Guide

Free tools: MCP Config Generator · Client Support Matrix

Latest research: State of MCP: October 2026

Frequently asked questions

Which LM Studio version supports MCP?

LM Studio 0.3.17 added MCP host support for local and remote servers. Using MCP through the API needs 0.4.0 or newer, per the developer docs.

Where is LM Studio's mcp.json?

At ~/.lmstudio/mcp.json on macOS and Linux, and %USERPROFILE%/.lmstudio/mcp.json on Windows. Open it with Program > Install > Edit mcp.json.

Can I copy my Cursor MCP config into LM Studio?

Mostly, yes. LM Studio says it "follows Cursor's mcp.json notation," so server entries use the same command, args, url and headers fields.

Why is my local model slow after adding an MCP server?

Tool descriptions and results take up context. LM Studio warns some servers use "excessive amounts of tokens." Remove servers you are not using, or load a model with a longer context.

You Might Also like to Read

Get a FREE Website Audit

Enter your website and get a 20–30 page SEO, GEO, AEO & CRO audit within 24 hours. Completely free.

Don't have a site yet? Get in touch →

Ready to speak with a marketing expert?
Give us a call! (916) 866-7893

Websites Launched
1407
Websites Launched
Marketing Experts
29
Marketing Experts
Hours of Dedicated Work
204533
Hours of Dedicated Work
Irina S.Benjamin G.Jeanette M.David G.