mcp.json file, edited from the Program tab and Perfai MCP is a remote server.
LM Studio’s own model is local and free to run — but tool-calling against an 18-tool MCP server needs a model that’s actually capable of structured tool use. Small quantized models can fail to respond at all.
Get an API key
Perfai Cloud authenticates LM Studio with a Perfai API key. Create one and copy it — Perfai shows the full key only once. You’ll paste it intomcp.json as Bearer pfk_xxxxxxxxxxxx_....
Installation
- Open LM Studio and go to Developer → Local Server.
- Click the Program tab.
- This opens (or lets you edit)
mcp.json. Add the following:
- Save the file. LM Studio reconnects to configured MCP servers automatically.
Verify the server is connected
- In the Program tab, check that perfai-cloud shows as connected with 19 tools listed.
- If it fails to connect, re-check that the
Authorizationheader isBearerfollowed by the full key, with no trailing whitespace. A401means the key has expired or been revoked — create a new one and update the config.
Confirm you’re signed in
The API key signs you in — there is no separate login step. Every tool call runs as the user who created the key, with that user’s organizations and role. In LM Studio’s chat, type:pfk_xxxxxxxxxxxx_…), never the secret. If a tool call fails with 401, the key has expired or been revoked — create a new one and update the connector.

