MCP clients
Connect VS Code to Loogika with MCP
You connect VS Code to Loogika with a .vscode/mcp.json file that holds the address https://app.loogika.com/api/mcp. VS Code asks for your API key the first time the server starts and stores it outside the file. The agent mode of Copilot can then read your reports and create goals while you build.
Last updated .
What do you need before you start?
You need a Loogika API key. API keys are available on the Business and Agency plans. The API getting started page shows where you create one, and Loogika shows a new key one time only.
How do you add the Loogika server to a VS Code workspace?
Create the file .vscode/mcp.json in your workspace with the content below. The file names an input instead of the key itself.
{
"inputs": [
{
"type": "promptString",
"id": "loogika-api-key",
"description": "Loogika API key",
"password": true
}
],
"servers": {
"loogika": {
"type": "http",
"url": "https://app.loogika.com/api/mcp",
"headers": {
"Authorization": "Bearer ${input:loogika-api-key}"
}
}
}
}
VS Code asks for the key once, when the server starts for the first time, and stores it securely. Paste your Loogika API key into that prompt.
Is it safe to commit .vscode/mcp.json?
Yes, in the form shown on this page. Because of the inputs block, the key never enters the file, which contains the address and a placeholder. Each person who opens the workspace enters a key of their own.
How do you make Loogika available in every workspace?
Add the same JSON to your user configuration. Open the Command Palette and run MCP: Open User Configuration, then paste the content there.
VS Code also has a guided set-up. Run MCP: Add Server from the Command Palette if you prefer answering prompts to editing a file.
How do you check that VS Code is connected?
Open the Command Palette and run MCP: List Servers. The list shows Loogika with its tools, and the same tools appear in the tools picker of Copilot agent mode. Then ask the agent a question about your data, for example:
List my Loogika sites and summarize last week's traffic for each.
The agent answers with the Loogika tools. The MCP overview lists every tool and marks the ones that change or delete data.