Filesystem MCP in LM Studio
Install + handshake last tested 2026-10-22 · Local-model tests: Not yet tested
Client: LM Studio (MCP host since 0.3.17). Client versions and features come from vendor docs, checked 2026-10-22. We haven't run this setup end-to-end yet.
Prerequisites
- LM Studio 0.3.17 or later
- Node.js 18+ for npx
- A folder you are happy to let the model read and write
Steps
- Open LM Studio > Program > Install > Edit mcp.json.
- Paste the config below (Cursor-style mcpServers notation) and replace /tmp with your folder.
- Enable only the tools you need; start read-only.
Config
{
"mcpServers": {
"filesystem-reference": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/tmp"
]
}
}
}Suggested tool allowlist
Picked from the real tool names in our test; whether a small model succeeds with them is not yet tested.
- Filesystem (reference) (14 tools listed):
list_allowed_directories, list_directory, read_text_file, search_files
Measured context cost
- Filesystem (reference): ~1,666 tokens (20% of 8k, 5% of 32k) for all 14 tools. Small-model friendly: high.
Method: tiktoken cl100k_base over compact JSON of name+description+inputSchema (approximate). Cost for the allowlist subset alone: not yet measured.
Success rates on small models
- Filesystem (reference): qwen2.5-3b-instruct-q4km: 100% tasks completed, 100% correct tool, 3 runs; qwen2.5-1.5b-instruct-q4km: 100% tasks completed, 100% correct tool, 3 runs (8 vCPU, 15 GB RAM, no GPU; context 16384; client: testedmcp smallmodel.mjs (Ollama /api/chat tools) + Ollama 0.40.8) Exploratory single 7B run (qwen2.5-7b-instruct-q4km): passed.
These were our own task runs, with all tools exposed. The setup on this page (client, model, allowlist) hasn't been run end-to-end.
Known failure modes (community-reported, not measured by us)
- Too many tools: the model picks the wrong one. Fix: use the allowlist above.
- Gemma thinking mode suppresses tool calls. Fix: turn thinking off.
- Context overflow from large tool schemas. Fix: fewer tools, or a bigger context window.
FAQ
Does Filesystem (reference) work with local models?
In our small-model runs (not this exact setup): Filesystem (reference): qwen2.5-3b-instruct-q4km completed 100% of 3 runs; qwen2.5-1.5b-instruct-q4km completed 100% of 3 runs.
How many tools does it expose?
Filesystem (reference): 14 tools in our tools/list test.
Why limit the tools?
Community reports say small models choose the wrong tool or emit malformed arguments when shown many tools. We haven't measured this yet.
Are there affiliate links on this page?
No.