> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ascendgtm.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect to LM Studio

> Use V5 MCP tools in LM Studio's agentic chat.

# Connect to LM Studio

LM Studio 0.3.6+ supports MCP servers in its built-in agentic chat interface. Connect V5 to give any local model access to all 34 GTM tools.

## Prerequisites

* LM Studio 0.3.6 or later (free)
* A V5 bearer token — get one from your admin: `POST /admin/tokens/issue`

## Setup

### 1. Open MCP settings

In LM Studio:

1. Open **Settings** (gear icon)
2. Navigate to **Extensions** → **Model Context Protocol**
3. Click **Add Server**

### 2. Configure V5

| Field           | Value                                                 |
| --------------- | ----------------------------------------------------- |
| **Name**        | `Ascend Gateway V5`                                   |
| **Transport**   | `Streamable HTTP`                                     |
| **Server URL**  | `https://ascend-gateway-v5.ascendgtm.workers.dev/mcp` |
| **Auth Header** | `Authorization`                                       |
| **Auth Value**  | `Bearer your-bearer-token-here`                       |

Click **Save**.

### 3. Verify

In LM Studio chat with any model, switch to **Agentic** mode and ask:

```
What MCP tools do you have available?
```

The model should list V5's 34 tools.

## Choosing models for GTM work

V5 works with any model in LM Studio, but tool calling accuracy varies:

| Task                       | Recommended local model               |
| -------------------------- | ------------------------------------- |
| Simple queries (read-only) | Qwen2.5-7B-Instruct or Llama 3.1 8B   |
| Multi-step workflows       | Qwen2.5-32B-Instruct or Llama 3.1 70B |
| Complex reasoning          | Deepseek-R1-Distill-32B               |

For production GTM work with real data, `ai_invoke` through the V5 gateway is recommended over local models — it routes to the right cloud model automatically.

## Troubleshooting

**Server shows as "disconnected"**\
LM Studio may not support SNI on some versions. Ensure you're on LM Studio 0.3.6+. Check the LM Studio logs: **View** → **Output** → select **MCP**.

**Model doesn't use tools**\
Not all models support tool use. Switch to a model with "Instruct" or "Tool" in the name. Function-calling support is required.
