# Setup and installation

The MCP server is **fully remote** and does **not** require any local installation.

Staying on MCP server v1

The configuration examples below use v2, the current MCP server version. If you need to stay on v1, send the `mcp-version: v1` header instead. v1 is deprecated and will be removed, so plan to migrate to v2.

Using Olly through MCP

Olly tools are hidden by default. To use them, add the `x-allow-costly-use: true` header to your MCP server configuration alongside `mcp-version: v2`. See [Olly](https://coralogix.com/docs/user-guides/mcp-server/tools/olly/index.md) for the full setup.

## Connecting with Cursor

### OAuth (recommended)

1. Add the following to your `.cursor/mcp.json` file:

   ```json
   {
     "mcpServers": {
       "coralogix-server": {
         "url": "https://api.[[DOMAIN_VALUE]]/mgmt/api/v1/mcp",
         "headers": {
           "mcp-version": "v2"
         }
       }
     }
   }
   ```

1. Open the MCP settings in Cursor and enable the new MCP server.

1. A browser window will open — log in to Coralogix and click **Authorize** to complete the connection.

Cursor handles authentication via OAuth 2.1 with OpenID Connect (OIDC). For more details, see [Authorize MCP with OAuth 2.1](https://coralogix.com/docs/user-guides/mcp-server/oauth/index.md).

### API key

1. Add the following to your `.cursor/mcp.json` file:

   ```json
   {
     "mcpServers": {
       "coralogix-server": {
         "url": "https://api.[[DOMAIN_VALUE]]/mgmt/api/v1/mcp",
         "headers": {
           "Authorization": "Bearer <YOUR-API-KEY>",
           "mcp-version": "v2"
         }
       }
     }
   }
   ```

   Replace `<YOUR-API-KEY>` with a personal [Coralogix API key](https://coralogix.com/docs/user-guides/account-management/api-keys/api-keys/index.md). The MCP server inherits the permissions associated with the user's personal API key. Find out more in [Permissions](https://coralogix.com/docs/user-guides/mcp-server/permissions/index.md).

1. Open the MCP settings in Cursor and enable the new MCP server.

Note

If necessary, modify the https://api.\[[DOMAIN_VALUE]\]/mgmt/api/v1/mcp endpoint to correspond to your Coralogix [domain](https://coralogix.com/docs/user-guides/account-management/account-settings/coralogix-domain/index.md) using the domain selector at the top of the page.

## Connecting with Claude Code

Configure the MCP server using the Claude Code CLI.

### OAuth (recommended)

1. Register the MCP server:

   ```bash
   claude mcp add --transport http coralogix-server https://api.[[DOMAIN_VALUE]]/mgmt/api/v1/mcp --header "mcp-version: v2"
   ```

1. Authenticate:

   ```bash
   claude /mcp
   ```

   - Select **coralogix-server**.
   - Select **Authenticate**.
   - A browser window will open — log in to Coralogix and click **Authorize** to complete the connection.

Claude Code handles authentication via OAuth 2.1 with OpenID Connect (OIDC). For more details, see [Authorize MCP with OAuth 2.1](https://coralogix.com/docs/user-guides/mcp-server/oauth/index.md).

### API key

```bash
claude mcp add coralogix-server \
  --transport http \
  https://api.[[DOMAIN_VALUE]]/mgmt/api/v1/mcp \
  --header "Authorization: Bearer <YOUR-API-KEY>" \
  --header "mcp-version: v2"
```

Replace `<YOUR-API-KEY>` with a personal [Coralogix API key](https://coralogix.com/docs/user-guides/account-management/api-keys/api-keys/index.md). The MCP server inherits the permissions associated with the user's personal API key. Find out more in [Permissions](https://coralogix.com/docs/user-guides/mcp-server/permissions/index.md).

Note

If necessary, modify the https://api.\[[DOMAIN_VALUE]\]/mgmt/api/v1/mcp endpoint to correspond to your Coralogix [domain](https://coralogix.com/docs/user-guides/account-management/account-settings/coralogix-domain/index.md) using the domain selector at the top of the page.

## Connecting with Codex

Configure the MCP server using the Codex CLI.

Selecting MCP server v2 with Codex

`codex mcp add` can't set custom request headers, so the commands below don't select a server version on their own. After registering, add the `mcp-version` header to the `coralogix-server` entry in `~/.codex/config.toml`:

```toml
[mcp_servers.coralogix-server]
http_headers = { "mcp-version" = "v2" }
```

Without this header, Codex uses v1.

### OAuth (recommended)

1. Register the MCP server:

   ```bash
   codex mcp add coralogix-server --url "https://api.[[DOMAIN_VALUE]]/mgmt/api/v1/mcp"
   ```

1. Authenticate:

   ```bash
   codex mcp login coralogix-server
   ```

   A browser window will open — log in to Coralogix and click **Authorize** to complete the connection.

Codex handles authentication via OAuth 2.1 with OpenID Connect (OIDC). For more details, see [Authorize MCP with OAuth 2.1](https://coralogix.com/docs/user-guides/mcp-server/oauth/index.md).

### API key

1. Set your API key as an environment variable:

   ```bash
   export CORALOGIX_API_KEY="<YOUR-API-KEY>"
   ```

   Replace `<YOUR-API-KEY>` with a personal [Coralogix API key](https://coralogix.com/docs/user-guides/account-management/api-keys/api-keys/index.md). The MCP server inherits the permissions associated with the user's personal API key. Find out more in [Permissions](https://coralogix.com/docs/user-guides/mcp-server/permissions/index.md).

1. Register the MCP server:

   ```bash
   codex mcp add coralogix-server \
     --url "https://api.[[DOMAIN_VALUE]]/mgmt/api/v1/mcp" \
     --bearer-token-env-var CORALOGIX_API_KEY
   ```

1. Verify the configuration:

   ```bash
   codex mcp list
   codex mcp get coralogix-server
   ```

Note

If necessary, modify the https://api.\[[DOMAIN_VALUE]\]/mgmt/api/v1/mcp endpoint to correspond to your Coralogix [domain](https://coralogix.com/docs/user-guides/account-management/account-settings/coralogix-domain/index.md) using the domain selector at the top of the page.

## Using a proxy for outbound connections

If your network requires a proxy for outbound connections, set the standard `HTTP_PROXY` / `HTTPS_PROXY` environment variables before running your CLI client. The MCP client picks up your system proxy settings automatically.

```bash
export HTTPS_PROXY="https://your-proxy:port"
```

## Starting a session

Start a conversation by entering a prompt such as:

```text
Show me the most frequent errors for service XYZ in the past week.
```

The assistant locates relevant log entries and identifies problematic functions.

## Requesting a fix for agent-based IDEs

After identifying the issue, for agent-based IDEs such as Cursor, instruct the assistant to fix it by saying:

```text
Now, fix the issue.
```

You can also ask:

```text
When did the issue start?
```

## Additional resources

|                     |                                                                                             |
| ------------------- | ------------------------------------------------------------------------------------------- |
| Coralogix Endpoints | [Coralogix Endpoints](https://coralogix.com/docs/integrations/coralogix-endpoints/index.md) |

## Next steps

Configure and enable your MCP server to [connect to Coralogix using OAuth](https://coralogix.com/docs/user-guides/mcp-server/oauth/index.md).
