# LM Studio

> **TL;DR** LM Studio 0.3.5+ supports MCP, so locally-running models can call Plurality tools.

#### Prerequisites

* LM Studio **0.3.5 or later**
* A loaded model with tool calling capability (Mistral, Llama 3.1+, Qwen 2.5, or similar)
* Plurality access token from memory studio. Read [here](/the-plurality-mcp-server.md#personal-access-token-api-key) how to create it.

#### Setup

1. Open LM Studio and navigate to the **Developer** tab.
   * If you don't see it, enable Developer Mode in **Settings → Advanced**.
2. Click on mcp.json and add the following json

<figure><img src="/files/TUfxIdYati7IOlneJd0M" alt=""><figcaption></figcaption></figure>

```json
{
  "mcpServers": {
    "plurality-memory": {
      "url": "https://app.plurality.network/mcp",
      "headers": {
        "Authorization": "Bearer <plur_pat_your-acces-token"
      }
    }
  }
}
```

3. Make sure require authentication is turned on in server settings.\
   ![](/files/T7OM4oO02FKwA5ub1XUk)
4. Open a new chat and load a model with tool calling capability. Then on the right side in the program tab, make sure you turn plurality mcp on.&#x20;

<figure><img src="/files/h7aGu7rzpOY2S14Gyx4c" alt=""><figcaption></figcaption></figure>

5. Now chat to the model and it will call the plurality mcp tools where necessary.

#### Verify

Ask the model: *"Search my Plurality memory for \[something]."*

If the model invokes `search_memory` and returns results, you're connected.

#### Troubleshoot

**Model doesn't call tools even when enabled.** This is a model capability issue, not a connection issue. Some smaller models don't reliably call tools. Try Mistral, Llama 3.1+, or Qwen 2.5.

**Tools fail with timeout.** Local models can be slow on tool calls. Increase the request timeout in LM Studio's developer settings.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.plurality.network/the-plurality-mcp-server/connect-your-agents-via-mcp/lm-studio.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
