Use MCP servers in LM Studio with Toolport
Toolport is a free, open source local MCP gateway. Add your servers to Toolport once, flip the LM Studio toggle, and LM Studio gets all of them through a single gateway entry, with lazy discovery loading 3 meta-tools instead of every server's full tool list.
Setup
- Download Toolport for Windows, macOS or Linux, and add your MCP servers to it (or import the ones your clients already have; secrets go to your OS keychain).
- Open the Clients tab and toggle LM Studio on. Toolport writes its gateway entry into LM Studio's config, next to anything already there.
- Restart or reload LM Studio. Your full server set is available through Toolport, and any server you add later shows up without touching LM Studio again.
Where LM Studio keeps its MCP config
- All platforms
~/.lmstudio/mcp.json
JSON with a top-level mcpServers object.
Running local models?
Lazy discovery asks the model to search for tools before calling them, and small local models (7B class) often aren't up to that flow. With a capable model it works well; with a smaller one, have Toolport expose the full tool catalog instead, which any model with basic tool calling can use. Either way your servers, keys and traffic stay on your machine, which is the point of running local in the first place.
Why a gateway instead of LM Studio's own server list?
- One setup, every client. The same servers work in LM Studio and every other client on your machine; add a server once and they all get it.
- Up to 91% fewer tool tokens. Instead of every server dumping its tool list into context, the agent loads 3 meta-tools and searches on demand (measured).
- Secrets in the OS keychain. API keys are injected at runtime and never sit in LM Studio's config file.
- Watched by default. Rug-pull and tool-poisoning detection on every tool, plus per-tool governance and a destructive-tool kill switch. How the security works.