lmstudio-web-mcp
A tiny, local MCP server that gives LM Studio models (or any MCP client) live internet access — web search and page reading — with no API keys.
Tools
Requirements
uv(handles the virtualenv and Python for you)- Python 3.11+ (uv fetches it automatically if missing)
Setup
git clone https://github.com/ardhifnoor/lmstudio-web-mcp.git
cd lmstudio-web-mcp
uv sync
Use with LM Studio
Add this to LM Studio's mcp.json (Settings ▸ Program, or ~/.lmstudio/mcp.json),
using absolute paths:
{
"mcpServers": {
"web-browser": {
"command": "/absolute/path/to/lmstudio-web-mcp/.venv/bin/python",
"args": ["/absolute/path/to/lmstudio-web-mcp/server.py"]
}
}
}
Pointing command straight at the project's own .venv/bin/python avoids PATH
issues and startup-sync delays when LM Studio launches the server. Then restart
LM Studio, enable the web-browser server, and load a model with tool use on.
Recommended system prompt
Small local models browse more reliably with a nudge. Paste this into the model's System Prompt field (update the date periodically — local models have no clock):
You have live internet tools: search_and_read, web_search, and fetch_url. Today's date is YYYY-MM-DD.
- For anything current ("latest", "this season/year", scores, prices, news, recent releases) you MUST call a tool before answering.
- Prefer search_and_read, and include the current year/season in your query.
- Trust the most recently dated facts; prefer a page's title/infobox/summary over older narrative sentences.
- End with the source URL and the date of the info you used.
Notes
- No API keys. Search uses
ddgs, which rotates across multiple engines and self-heals when one backend rate-limits or blocks. - The MCP protocol runs over stdout; the search library may print harmless
response: <url> 200lines to stderr (shown in LM Studio's log panel). - Works with any MCP client, not just LM Studio.
License
MIT — see LICENSE.