On this page
LM Studio MCP: Add Servers to mcp.json and Pick Ones a Local Model Can Use (Nov 2026)

LM Studio has been an MCP host since version 0.3.17. You add any MCP server to one file, mcp.json: open the Program tab in the right-hand sidebar and click Install > Edit mcp.json. Local servers use command and args; remote ones use url. LM Studio asks you before each tool call.

The harder question is which servers to add. A local model has a smaller context window than Claude or ChatGPT, and it gets tool calls wrong more often. So pick MCP servers with few tools and small schemas, ideally read-only ones. Our LM Studio MCP server list below does that, with each server's TrustedMCP grade.

We checked this against LM Studio's own docs and changelog on 12 November 2026. The latest release on the changelog is LM Studio 0.4.28 (31 October 2026).

Where LM Studio keeps mcp.json

LM Studio's 0.3.17 release notes give the path:

  • macOS and Linux: ~/.lmstudio/mcp.json
  • Windows: %USERPROFILE%/.lmstudio/mcp.json

You don't have to find it by hand. In the app, switch to the Program tab in the right-hand sidebar and click Install > Edit mcp.json. It opens in LM Studio's own editor.

The file "follows Cursor's mcp.json notation", says the MCP docs page. So every server goes under one mcpServers object, the same shape Cursor and Claude Desktop use. Most server READMEs give you a snippet in that shape.

How to add an MCP server to LM Studio

A local server (runs on your machine)

A local server is a program LM Studio starts for you. You give it the command, the args and any env settings. This is the free SearXNG server, copied from its README. Point SEARXNG_URL at a SearXNG instance you trust:

{
  "mcpServers": {
    "searxng": {
      "command": "npx",
      "args": ["-y", "mcp-searxng"],
      "env": { "SEARXNG_URL": "https://search.example.com" }
    }
  }
}

npx needs Node.js installed, and uvx needs uv. If the command isn't on your machine, the server won't start.

A remote server (runs on someone else's machine)

A remote server is a web address. This example is the one from LM Studio's own docs, for the Hugging Face MCP server:

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

Keep the token out of screenshots and shared files. Our MCP API keys guide covers where keys can leak.

Paste only the inner entry

You'll often add a second server to a file that already has one. LM Studio's docs give the fix for the most common mistake: "copy only the content after "mcpServers": { and before the closing }." In other words, don't paste a second mcpServers wrapper inside the first. Put a comma between entries.

Remote servers that sign in with OAuth

LM Studio's MCP integrations page says "LM Studio now supports MCP with OAuth." For a server that supports it, LM Studio opens your browser on the service's sign-in page and stores the token after you approve.

Some services need you to bring your own OAuth app (usually because they don't support dynamic client registration). Then you add an auth object, and your OAuth app must allow the callback http://127.0.0.1:33389/mcp-oauth-callback:

{
  "mcpServers": {
    "oauth-server": {
      "url": "https://api.example.com/mcp",
      "auth": {
        "CLIENT_ID": "TEST_CLIENT_ID",
        "CLIENT_SECRET": "TEST_CLIENT_SECRET"
      }
    }
  }
}

The "Add to LM Studio" button

Some sites show an Add to LM Studio button. It's a link to lmstudio.ai/install-mcp with the server's name and an encoded copy of its mcp.json entry. One click adds the server. That's handy, but it's the same as pasting a stranger's config. Open mcp.json afterwards and read what was added: the command it runs, or the URL it calls.

LM Studio MCP server list: what suits a local model

Every server you add sends a description of each of its tools to the model before you type anything. That eats context, as our MCP context cost guide shows. LM Studio's docs warn about this too: "Some MCP servers were designed to be used with Claude, ChatGPT, Gemini and might use excessive amounts of tokens."

Small models also slip up more. LM Studio's tool use docs say: "Smaller models and models that were not trained for tool use may output improperly formatted tool calls." Fewer tools means fewer chances to pick the wrong one.

So the best MCP servers for LM Studio have three things: a short tool list, read-only tools, and nothing to set up beyond a URL or one command. These are the ones in our directory that fit:

Server Grade Tools Where it runs Why it suits a local model
Context7 A 2 Hosted or your machine Looks up library docs. Two read-only tools.
Hugging Face A 1 built in, extras opt-in Hosted LM Studio's own example. Pick its tools at huggingface.co/settings/mcp.
GitHub A Grouped in toolsets Hosted or Docker Large, but the read-only URL and toolset filters cut it down.
SearXNG B 4 Your machine Free web search with no API key. Needs a SearXNG instance.
Microsoft Learn C 3, all read-only Hosted No sign-in, small and read-only. Graded C: no auth, closed source.
AWS Knowledge C Read-only Hosted Public AWS docs only; it can't touch your account.
DuckDuckGo D 3 Your machine Quick to try, no key. Graded D: no login, and it fetches any URL.
Filesystem D 15 Your machine Big for a small model. Use --read-only and one folder.

A few tips for this list:

  • For GitHub, use https://api.githubcopilot.com/mcp/readonly as the url and put a token in headers. The GitHub MCP guide shows how to load only the toolsets you need.
  • For Context7, the hosted address is https://mcp.context7.com/mcp. See the Context7 guide for the key header.
  • For web search, our web search MCP servers comparison has the setup for each, and why page text from the web is a risk.

Servers to skip on a small model: browser servers like Playwright MCP and Chrome DevTools MCP (both graded C). They have long tool lists and big page snapshots, and both can run scripts in the browser. A model that misformats a call there can do real damage.

LM Studio's docs also name four popular remote integrations: Linear (A), Notion (B), Atlassian (A) and Sentry (A). They're well run, but they connect to your work accounts and can change things. Keep the confirmation dialog on for any tool that writes.

Tool-call confirmation: review, edit, allow once or always

LM Studio's 0.3.17 notes describe it: "When a model calls a tool, LM Studio will show a confirmation dialog to the user." In that dialog you can:

  • review the arguments before the tool runs,
  • edit the arguments "if needed",
  • allow it once, or always allow that tool.

If you always allow a tool, "LM Studio will not show the confirmation dialog for that tool in the future." You can undo that in App Settings > Tools & Integrations.

Editing the arguments is more useful than it sounds with a local model. If the model gets a path or a search term slightly wrong, fix it in the dialog instead of asking again.

Our rule for "always allow":

  • Yes for read-only lookups: docs search, library docs, a model search.
  • No for anything that writes, deletes, sends or runs code.
  • No for tools that fetch a web page or read email. Their output can carry instructions the model may follow. That's prompt injection, and a local model is no better at spotting it.

The dialog is a speed bump, not a lock. For tools you never want used, take them away: our guide to limiting MCP tools covers server read-only flags and read-only tokens, which hold even when someone clicks "always allow".

MCP through LM Studio's API (0.4.0 and later)

LM Studio can also run as a local server for your own scripts. Since 0.4.0, its /api/v1/chat endpoint can use MCP in two ways, each behind its own switch in Server Settings:

  • Per-request servers need "Allow per-request MCPs". Your script names the server in the request.
  • Servers from mcp.json need "Allow calling servers from mcp.json".

A per-request server looks like this. The allowed_tools list is worth using: without it, "all tools from the server are available to the model."

"integrations": [
  {
    "type": "ephemeral_mcp",
    "server_label": "huggingface",
    "server_url": "https://huggingface.co/mcp",
    "allowed_tools": ["model_search"]
  }
]

Now the part to watch. LM Studio's authentication docs say: "By default, LM Studio does not require authentication for API requests." So leave both MCP switches off unless a script needs them. When you turn one on, also turn on authentication (Developers page > Server Settings), then create a token under Manage Tokens. Copy it straight away, as it "will not be shown again." Keep the server on your own machine too; our local MCP server guide explains why 127.0.0.1 matters.

Is it safe to use MCP servers in LM Studio?

As safe as the servers you add. LM Studio's own warning is plain: "Some MCP servers can run arbitrary code, access your local files, and use your network connection." And: "Never install MCPs from untrusted sources."

Running the model locally doesn't make the whole setup private:

  • A remote server sees what you send it. Your prompt stays on your machine, but the arguments of each tool call go to that service.
  • A local server runs with your rights. It can read what you can read. Our MCP sandbox guide shows how to fence one in with a separate user or Docker.
  • Prompt injection still works. A web page or issue can tell the model to call another tool. The confirmation dialog is your main defence, so don't click through it.

Before you add a server, look it up in the TrustedMCP directory. Each listing has a grade from public signals (sign-in, maintenance, known advisories and transport) and the single biggest reason it lost points.

LM Studio MCP not working: quick fixes

  • The model never calls a tool. Check for the hammer badge on the model. LM Studio says models with native tool support "will have a hammer badge in the app, and generally perform better in tool use scenarios." Its list of native families today: Qwen, Llama 3.1 and 3.2, and Mistral, "subject to change".
  • Tool calls come out garbled. Try a larger model, or turn off servers you aren't using so there are fewer tools to choose from.
  • Answers get cut off once tools are on. The tool list may be filling the context. Raise the context length when you load the model, or use fewer servers.
  • The server doesn't start. Check that npx or uvx runs in a terminal, and that mcp.json has only one mcpServers wrapper. Our MCP server not working guide has the full checklist.

Set up MCP in LM Studio in 5 steps

1. Load a model with the hammer badge

Pick a model with native tool support, such as a Qwen, Llama 3.1/3.2 or Mistral build. Others work, but less reliably.

2. Add one server to mcp.json

Program tab > Install > Edit mcp.json. Start with one small, read-only server from the list above, such as Context7 or Microsoft Learn.

3. Keep the tool list short

Use read-only URLs, toolset filters and per-server tool settings where the server offers them. Remove servers you don't use this week.

4. Allow once until you trust a tool

Read the arguments in the confirmation dialog. Save "always allow" for read-only lookups.

5. Lock the API before you script it

Leave the two MCP switches in Server Settings off unless you need them. If you turn one on, turn on authentication and use a token.

Want a small, read-only MCP server over your own data that a local model can actually drive? We build custom MCP servers. Tell us about your project.

Frequently asked questions

Does LM Studio support MCP?

Yes. LM Studio has been an MCP host since version 0.3.17. It supports local servers (a command it starts) and remote servers (a URL), including remote servers that sign in with OAuth. Since 0.4.0 its API can use MCP servers too.

Where is LM Studio's mcp.json?

At ~/.lmstudio/mcp.json on macOS and Linux and %USERPROFILE%/.lmstudio/mcp.json on Windows. The quick way in is the Program tab in the right-hand sidebar, then Install > Edit mcp.json.

Which MCP servers work best with LM Studio? Is there an LM Studio MCP servers list?

Ones with few tools, read-only tools and simple setup. From our directory, Context7 (A, two tools), Hugging Face (A), Microsoft Learn (C, three read-only tools) and SearXNG (B, free search) are good first picks. Skip browser servers on small models. The full graded table is in the LM Studio MCP server list above.

Can LM Studio connect to remote MCP servers?

Yes. Use a url entry in mcp.json, with headers for a token. For servers that support OAuth, LM Studio opens your browser to sign in and stores the token. Some services need your own OAuth app, set in an auth object.

Why won't my local model use the MCP tools?

Usually the model wasn't trained for tool use. Look for the hammer badge, which marks native tool support. Without it, LM Studio falls back to a default mode, and "results will vary by model." Too many tools can also crowd a small model's context.

How do I stop LM Studio asking before every tool call?

Choose "always allow" for that tool in the confirmation dialog. You can change it later in App Settings > Tools & Integrations. Only do this for read-only tools; keep the prompt for anything that writes, sends or runs code.

Is Bionic the same as LM Studio?

No. LM Studio calls Bionic "LM Studio's agent for open models". It's a separate app with its own changelog, and "Bionic uses LM Studio for local model inference", so you can run both. This guide covers the main LM Studio app and its mcp.json.

Are MCP servers safe to use in LM Studio?

Only as safe as each server. LM Studio warns that some "can run arbitrary code, access your local files, and use your network connection." Add servers from sources you trust, check their grade first, and read each tool call before you allow it.