Use LM Studio models in any web text field
To use an LM Studio model in Chrome, start LM Studio’s local server, then add it to the ShroomPen extension as a Local server with the address http://localhost:1234/v1 and no API key. ShroomPen sends your request to that server and puts the answer into the text field you are using, such as an email reply, a LinkedIn post or a support ticket. The text stays on your computer and there is no ShroomPen account.
Published
Setup
You need LM Studio with at least one model downloaded, and Chrome. It takes about ten minutes, most of it waiting for the model download.
Install LM Studio and download a model
Install LM Studio from lmstudio.ai and download a model with its model search, or with the lms get command in a terminal.
LM Studio has to be run once before the
lmscommand works. Small instruction-tuned models (a few billion parameters) are enough for short replies and rewrites and respond faster.Start the LM Studio server
In LM Studio open the Developer tab and switch on Start server, or run lms server start. The OpenAI-compatible API is then at http://localhost:1234/v1.
lms server startCheck it is up with
lms server status. If Just-in-Time model loading is on in the server settings, LM Studio loads a model when the first request for it arrives. Otherwise load one first, in the app or withlms load.Install ShroomPen and enable it
Add ShroomPen from the Chrome Web Store. The first time you open it, it explains what it can read and waits until you tick the box and click Enable ShroomPen.
Install from the Chrome Web Store. ShroomPen reads nothing from any page until you have agreed.
Add LM Studio as a local server
Open ShroomPen with Ctrl+Q, open settings, choose Add provider, then Direct provider, then Local server. Enter http://localhost:1234/v1 as the base URL and leave the API key empty.
http://localhost:1234works too: ShroomPen adds/v1itself when the address has no path. If you changed LM Studio’s port, use that port instead of 1234.Test and connect
Click Test/load models and allow access to localhost in the permission window Chrome shows. ShroomPen lists the models LM Studio offers and sends a short test request. Pick a model and click Connect.
Chrome asks once for access to
http://localhost. ShroomPen asks for that one address only. If you decline, it can’t reach the server.Write in a text box
Click into a text field on any page. Use the Reply, Rewrite, Fix Grammar or Translate buttons next to it, or press Ctrl+Q, describe what you want and click Insert draft.
If the connection test fails
| What you see | What to check |
|---|---|
| Network or CORS failure | Is the server running (lms server status)? Is the port right? If both are fine, switch on Enable CORS in LM Studio’s server settings and test again. |
| Model not found (404) | The model name must match one LM Studio lists. Click Test/load models and pick it from the list instead of typing it. |
| Invalid API key or permission denied (401 or 403) | Require Authentication is on in LM Studio. Paste an LM Studio API token into ShroomPen’s API key field, or switch the setting off. |
| The address is refused before any request | ShroomPen allows plain HTTP only for localhost, 127.0.0.1 and ::1. Use one of those, or HTTPS. |
What you can do with it
Once connected, click into any text field. The Input Helper next to the field has four buttons: Reply, Rewrite, Fix Grammar and Translate. They send the field (and any context you switched on) to your LM Studio model and write the result into the field. Rewrite, Fix Grammar and Translate need the “Current field” source switched on, since they work on the field’s text.
For anything longer, press Ctrl+Q to open the overlay, write what you want, and attach context: the current page, selected text, other tabs you pick (PDF tabs included) or a saved Workspace with your own notes. You read the draft first and then insert it, replace your selection or copy it.
ShroomPen or a sidebar chat?
If you mostly want to chat with your LM Studio models, an open-source sidebar like Page Assist is a better fit: it has a full chat interface, works in Firefox too, and its code is public. ShroomPen is closed source and Chrome-only. It is built for the other job: getting a draft into the field you are writing in without copying and pasting. The local LLM extension comparison covers the options side by side.
Related
Questions
Is there an LM Studio Chrome extension?
LM Studio does not ship its own Chrome extension, but any extension that accepts an OpenAI-compatible address can use its local server. ShroomPen is one that writes the answer into the text field you are using. Page Assist is an open-source option for chatting with LM Studio models in a sidebar.
Do I need an API key for LM Studio?
No. LM Studio does not require authentication by default, so leave the key empty. If you switched on Require Authentication in LM Studio’s server settings, paste one of your LM Studio API tokens into the API key field; ShroomPen sends it as a Bearer token.
Do I need to enable CORS in LM Studio?
Try without it first. If the connection test in ShroomPen fails with a network or CORS error while the server is running, switch on Enable CORS in LM Studio’s server settings and test again. LM Studio warns that CORS widens access to the server, so leave it off if you don’t need it.
Can I use LM Studio running on another computer?
Only over HTTPS. ShroomPen accepts plain HTTP only for loopback addresses such as localhost and 127.0.0.1, so a server at a local-network address like http://192.168.1.20:1234 is refused. Run LM Studio on the same computer as Chrome, or put the remote server behind HTTPS.
Does my text leave my computer?
Not when ShroomPen talks to LM Studio on localhost. The request goes from Chrome to the LM Studio server on the same machine. ShroomPen has no server of its own and sends no telemetry.