
LM Studio
Connect Triangle as a remote MCP server in LM Studio, authorize through your Triangle account, and let a local model work with the health data you approve.
Official LM Studio documentationBefore you start
- A Triangle account with an active patient profile.
- LM Studio 0.3.17 or later. Remote MCP and OAuth support must be available in your installed version.
- A local model that supports tool use. Smaller models may not reliably choose or complete MCP tool calls.
- A confidential OAuth app created in the Triangle developer portal, with LM Studio’s callback URL registered.
Connection fields
| Field | Value |
|---|---|
| MCP server URL | https://app.trianglehealth.com/mcp |
| Authentication | OAuth |
| OAuth callback URL | http://127.0.0.1:33389/mcp-oauth-callback |
| Client ID | Copy from your confidential app in the Triangle developer portal |
| Client Secret | Copy the one-time secret when you create the confidential app |
| Scopes | Not configured in LM Studio — permissions are granted on Triangle’s OAuth consent screen when you authorize. |
Setup steps
01.Create OAuth credentials for LM Studio
LM Studio requires your own OAuth credentials for Triangle. Create a confidential app and register LM Studio’s local callback before editing mcp.json.
- Open https://app.trianglehealth.com/developer/apps and create a confidential OAuth app named LM Studio.
- Add http://127.0.0.1:33389/mcp-oauth-callback as a redirect URI base.
- Copy the Client ID and the one-time Client Secret. Store the secret securely because Triangle will not show it again.

02.Open LM Studio’s MCP configuration
LM Studio manages MCP servers in mcp.json. Open the editor from Developer → Local Server.
- Open LM Studio and select Developer in the left navigation.
- Choose Local Server.
- Click mcp.json at the top of the Local Server pane to open the Edit mcp.json interface.
- Keep any existing server entries and add Triangle inside the mcpServers object.

03.Add the Triangle remote MCP server
Add Triangle with its HTTPS MCP URL and the OAuth credentials from your confidential Triangle app, then save the file.
- Replace YOUR_CLIENT_ID and YOUR_CLIENT_SECRET with the credentials from the Triangle developer portal.
- Paste the Triangle entry into mcp.json and save your changes. Do not add a custom Authorization header.
- Do not replace other MCP server entries already in the file.
{
"mcpServers": {
"triangle-health": {
"url": "https://app.trianglehealth.com/mcp",
"auth": {
"CLIENT_ID": "YOUR_CLIENT_ID",
"CLIENT_SECRET": "YOUR_CLIENT_SECRET"
}
}
}
}04.Configure the MCP server
After LM Studio detects the new triangle-health server, finish adding it when prompted.
- Wait for the “MCP Server Added!” confirmation.
- Click Configure MCP.

05.Authenticate with Triangle
Enable triangle-health and complete LM Studio’s authentication prompt. LM Studio opens Triangle in your browser for sign-in and consent.
- Turn on the mcp/triangle-health toggle if it is not already on.
- Click Authenticate (or Trust and Open in Browser) when LM Studio asks you to sign in.
- Sign in to Triangle in the browser window if prompted.
- Review permissions on the consent screen, then click Accept.
- When the browser shows Authentication Successful, return to LM Studio.
- You can revoke access anytime from https://app.trianglehealth.com → Settings → AI Services.

06.Approve permissions on Triangle
On Triangle’s consent screen, choose the patient and permissions LM Studio may use.
- Confirm the correct patient is selected.
- Grant the permissions you want LM Studio to use (read and write as needed).
- Click Accept to finish authorization.

07.Confirm Triangle tools are loaded
After authorization, LM Studio lists the Triangle MCP tools for the enabled server.
- Return to LM Studio after Authentication Successful appears in the browser.
- Open mcp/triangle-health and confirm Triangle tools are listed and enabled.
- Leave tools set to Ask if you want LM Studio to confirm each tool call.

08.Load a model and use Triangle tools
Start a chat with a tool-capable local model, keep triangle-health enabled, and ask it to use your health data.
- Load a model with tool-use support and enough context for the Triangle tool definitions.
- Confirm the triangle-health chip is active in the chat composer.
- Try: “Hi, please review my health notes on Triangle.” Approve tool calls when LM Studio asks.
- Review tool inputs before allowing write actions such as creating a note.

What you can do after connecting
- Use a local model to browse and organize health topics from your Triangle profile.
- Read, search, and create notes when the corresponding permissions are approved.
- List medical records and read available summaries or extracted content with medical_records:read consent.
- Keep model inference local while Triangle handles authenticated health-data tool calls over HTTPS.
- Manage or revoke the LM Studio connection from Settings → AI Services in Triangle.