Documentation menuMCP clients: Claude Code

MCP clients

Connect Claude Code to Loogika with MCP

You connect Claude Code to Loogika with the claude mcp add command and the address https://app.loogika.com/api/mcp. Claude Code then signs in with OAuth in your browser, or sends an API key as a header. After that it can read your reports and manage goals and funnels while you work on code.

Last updated .

How do you connect Claude Code with OAuth?

Run one command in your terminal. OAuth is a sign-in where you approve the connection in your browser, so you have no API key to create or store.

claude mcp add --transport http loogika https://app.loogika.com/api/mcp
  1. Start a Claude Code session and run /mcp.
  2. Select loogika and choose Authenticate.
  3. Log in to Loogika in the browser window that opens, and approve the access.

The connection acts as you, with the role you hold in Loogika. Claude Code can reach the sites that you can open in the dashboard.

Where does Claude Code save the Loogika server?

Claude Code saves the server at the local scope by default. A server at that scope is available to you alone, and only in the current project. Add --scope user to the command when you want Loogika in all your projects.

How do you share the Loogika server with your team?

Commit a file named .mcp.json at the root of the repository, with the address and nothing else. Each developer then runs /mcp once and signs in with their own Loogika account. The repository holds no secret.

{
  "mcpServers": {
    "loogika": {
      "type": "http",
      "url": "https://app.loogika.com/api/mcp"
    }
  }
}

How do you connect Claude Code with an API key?

Add the key as an Authorization header in the same command. An API key fits runs without a browser, such as a CI job or a headless claude -p run. A key with scopes also lets you give Claude Code narrower access than your own.

claude mcp add --transport http loogika https://app.loogika.com/api/mcp \
  --header "Authorization: Bearer YOUR_API_KEY"

Replace YOUR_API_KEY with a key from Loogika. The API getting started page shows where you create a key and how scopes limit it.

How do you keep the key out of a shared .mcp.json file?

Refer to an environment variable in the file instead of writing the key into it. Claude Code replaces a ${VAR} reference with the value from each developer's own environment.

{
  "mcpServers": {
    "loogika": {
      "type": "http",
      "url": "https://app.loogika.com/api/mcp",
      "headers": {
        "Authorization": "Bearer ${LOOGIKA_API_KEY}"
      }
    }
  }
}

How do you check that Claude Code is connected?

Run claude mcp list in your terminal, or /mcp inside a session. The loogika server shows as connected when the sign-in worked. Then ask Claude Code a question about your data, for example:

List my Loogika sites and summarize last week's traffic for each.

Claude Code answers with the Loogika tools. The MCP overview lists every tool and marks the ones that change or delete data.

Which Loogika plan do you need?

The MCP server belongs to API access, which is part of the Business and Agency plans. That holds for a sign-in with OAuth as well as for an API key. On another plan, Loogika refuses the connection and replies that API access requires Business or Agency.