---
url: https://docs.hostly.ninja/connect-mcp/lmstudio.md
---
# Connect LM Studio

[LM Studio](https://lmstudio.ai) runs language models locally on your computer and can use Hostly
as a remote MCP server. Unlike ChatGPT and Claude, LM Studio needs the Hostly OAuth client
credentials to sign you in. These credentials are public and only allow the sign-in with your own
Hostly account.

::: info
This guide requires an LM Studio version with the MCP settings UI. LM Studio may adjust the labels
below over time.
:::

## Add Hostly

1. Open **Settings** in the bottom left corner of LM Studio.

2. In the **Integrations** section, select **MCP**.

3. Click **Add MCP Server Manually**.

4. Fill in the connection details:
   * **Name:** `Hostly`

   * **Connection:** choose **Web address**

   * **Server address:**

     ```text
     https://api.hostly.ninja/mcp
     ```

   * **Authentication:** keep **Automatic**

5. Under **Advanced settings**, turn on **Show advanced options** and enter the Hostly client
   credentials under **OAuth client details**:
   * Client ID:

     ```text
     tpc_b5fQnmELaqpqmyumDPdnHS
     ```

   * Client secret:

     ```text
     -x2E5oxx5jry-Jgqi__ULGdzviJGtNiD1AAzaZl5cuFkyPDXEEYz6HioM5GBU5z1
     ```

6. Keep **OAuth scopes** on **Automatic** and leave the other advanced options unchanged.

7. Save the server and sign in with your Hostly account in the browser window that opens.

Once signed in, the **Installation** section shows a **Sign out** button for the Hostly server.

## Use Hostly in a chat

Load a model that supports tool use, enable Hostly for the chat, and ask, for example:

```text
Show me the logs of the service "api" in my workspace.
```

LM Studio asks for your approval before it calls a Hostly tool. Review tool calls that change or
delete something before you approve them.

## Choose a model

Hostly provides a few dozen tools. Their descriptions take up part of the model's context window
before the conversation even starts, which can overwhelm small local models. If the model ignores
the tools, picks the wrong one, or cuts off its answers:

* Turn off the Hostly tools you don't need for the current task, for example everything except
  listing services and reading logs.
* Increase the context length when you load the model.
* Use a larger model with good tool-use support.

## Troubleshooting

* **Sign-in fails:** Check that the client ID and client secret are copied completely and that
  **Authentication** is set to **Automatic**. Then click **Sign out** in the **Installation**
  section and connect again.
* **The model does not use Hostly:** Make sure the model supports tool use and Hostly is enabled
  for the chat. Then see [Choose a model](#choose-a-model).
* **A tool call is rejected:** Your Hostly account lacks the required permission in that
  workspace. Ask a workspace member with the right permissions to adjust your role.
* **Start over:** Click **Remove MCP** in the **Installation** section and add Hostly again.
