MCP clients
Connect Codex to Loogika with MCP
You connect the Codex CLI to Loogika with codex mcp add and the address https://app.loogika.com/api/mcp. Codex then signs in with OAuth in your browser, or reads an API key from an environment variable. After that it can check your traffic and errors and create goals from the terminal.
Last updated .
How do you connect Codex with OAuth?
Run two commands. The first adds the Loogika server to Codex, and the second starts the sign-in.
codex mcp add loogika --url https://app.loogika.com/api/mcp
codex mcp login loogika
The codex mcp login command opens your browser. Log in to Loogika there and approve the access. The connection acts as you, with the role you hold in Loogika.
How do you connect Codex with an API key?
Give Codex the name of an environment variable that holds the key. An API key fits runs where nobody can answer a browser sign-in. A key with scopes also lets you give Codex narrower access than your own.
codex mcp add loogika --url https://app.loogika.com/api/mcp \
--bearer-token-env-var LOOGIKA_API_KEY
Codex reads the key from the variable each time and does not store it. Export LOOGIKA_API_KEY in the shell that starts Codex, or Codex has no key to send.
The API getting started page shows where you create a key and how scopes limit it.
Can you set the same thing in the Codex config file?
Yes. The file ~/.codex/config.toml takes the same two values, and the result equals the command above.
[mcp_servers.loogika]
url = "https://app.loogika.com/api/mcp"
bearer_token_env_var = "LOOGIKA_API_KEY"
How do you check that Codex is connected?
Run codex mcp list in your terminal, or /mcp inside the Codex terminal interface. The loogika server shows as connected when the sign-in worked. Then ask Codex a question about your data, for example:
List my Loogika sites and summarize last week's traffic for each.
Codex 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.