# Connect Codex

<a class="sl-link-button not-content primary ks-directory-cta" href="https://chatgpt.com/plugins/plugin_asdk_app_6a789d2ee20c8191a7abd7c3736a7c2c" target="_blank" rel="noopener noreferrer">
  <img src="/icons/codex.svg" alt="" width="18" height="18" /><span>Open the Kalender Sync plugin</span>
</a>

Codex uses **the same plugin directory as ChatGPT**. You add Kalender Sync there once and confirm the grant with us.

## Step by step

1. Open [Kalender Sync in the plugin directory](https://chatgpt.com/plugins/plugin_asdk_app_6a789d2ee20c8191a7abd7c3736a7c2c) (or search for "Kalender Sync" under **Plugins** in Codex or ChatGPT) and add the plugin.
2. You're sent to our sign-in. If you don't have an account yet, you create it right there (7 days free, no credit card) and connect your calendars.
3. Confirm the grant on the **consent screen** — pick the calendars, set the detail level per calendar. Only now does the access exist.

For a **new assistant connection**, only each account’s provider-designated **primary calendar** is preselected, within your plan limit. You can select additional calendars. If the provider does not identify a primary calendar, you choose it yourself. Selected calendars start with the maximum supported permissions; **the sliders icon next to the access label** opens the detail level, write and management permissions for that calendar. Use **Share** to confirm your selection. If a plan offer appears, you can skip it directly. Access is then granted; the success screen shows example prompts and an app link. It returns you to the assistant after eight seconds, or immediately via the return button. Reconnecting preserves existing permissions where they remain available.

Then dive right in, e.g.: *"Which calendars are shared via Kalender Sync?"*, *"Where do I have two hours in one block this week?"* or *"When is my dentist appointment?"*

## Alternative: Codex CLI with an access key

Sign-in through a browser window (`codex mcp login`) is currently accepted from Claude and ChatGPT only. In the Codex CLI you therefore connect Kalender Sync with an access key:

1. In the app, open **AI assistant → Connect the assistant → Something else**, pick calendars and detail level, and use **Create key** to get the key (`ksa_…`). It is shown only once — treat it like a password.
2. Set the key as the environment variable `KALENDER_SYNC_KEY`.
3. Add this to `~/.codex/config.toml`:

```toml
[mcp_servers.kalender-sync]
url = "https://app.kalender-sync.de/mcp"
bearer_token_env_var = "KALENDER_SYNC_KEY"
```

## Revoke access

In Kalender Sync under **AI assistant**, click **Revoke** on the access — effective immediately; the key is dead regardless of what is stored in Codex. More under [Revoke access](https://docs.kalender-sync.de/en/ki-assistent/#revoke-access).