---
title: When an AI won't connect
description: What to check, in order, when ChatGPT or Claude does not connect or when Claude Code or Codex has its API key refused.
url: https://docs.thegram.one/help/connection/
lang: en
tier: current
---

# When an AI won't connect

<p class="tg-lede">In this chapter: find the cause when an AI does not connect to Thegram at all. If it connects but cannot use a storage, see <a href="/access/blocked/">When an AI can't use a storage</a>.</p>

## First, tell which case it is {#which}

Open **Settings › AI permissions** in Thegram and see whether the AI is in the list.

| In the list? | Meaning | Where to look |
| --- | --- | --- |
| No | It is not connected | This chapter |
| Yes | It is connected. It is probably a permission problem | [When an AI can't use a storage](/access/blocked/) |

## AI apps such as ChatGPT and Claude {#apps}

These connect by signing in.

1. **Did you finish on the AI's side?** After adding Thegram in the AI, you sign in on the Thegram screen and select approve. If you closed the window partway, start again.
2. **Is it the same Thegram account?** If you signed in with another account, the AI is connected to that account. Check the email under **Settings › Account** in Thegram.
3. **Did you open a new conversation?** A conversation that was open before you connected may not have Thegram.
4. **Is Thegram turned on in the AI?** Check the AI's connector or plugin settings.

If your Claude plan or organization cannot use the directory, add this address as a custom connector under **Settings → Connectors** in Claude and sign in.

```text
https://vault.thegram.one/mcp
```

For Grok and Muse, **Settings › AI permissions › Connect an AI app** in Thegram shows the values to paste. One wrong value stops the connection, so use the copy buttons.

## Coding agents such as Claude Code and Codex {#agents}

These connect with an API key. Check in this order.

1. **Is the key alive?** In **Settings › AI permissions**, check that the key is in the list and its lifetime has not ended. If it is missing or expired, create a new key.
2. **Does your terminal have the key?** Run this in the terminal. It does not show the key; it prints `set` when the key is there.

```sh
echo "${THEGRAM_API_KEY:+set}"
```

If nothing is printed, repeat [Keep the key on your computer](/start/connect/#env) and open a new terminal.

3. **Is Thegram registered in the agent?** Check that `thegram` is in the output of one of these.

```sh
claude mcp list
```

```sh
codex mcp list
```

If not, run the commands in [Connect from the terminal](/start/connect/#commands) again.

4. **Did you open a new session?** A session that was running when you installed or changed the key does not pick it up.

Do not paste the key value into a conversation with an AI to check it. If you did, revoke that key and create a new one.

## When only the organization fails {#org}

If personal storages work and organization storages do not, it is the organization's policy, not the connection. With **Allowed AI only** on, an AI that is not on the list cannot reach organization storages. [Set the organization's AI policy](/team/ai-policy/#allowlist)

## If it still does not work {#support}

1. Open **Settings › Help** in Thegram.
2. Select **Copy** on **Copy Diagnostics**. It includes only the app version, the browser and the current address.
3. Select **Write Email** on **Report a Problem** and send it to support@thegram.one. Say which AI, what you did and what message appeared. Do not include API keys or passwords.

The meaning of an error code your AI shows is in [MCP errors & recovery](/reference/mcp-errors/).

Next chapter: [When your AI doesn't save or can't find things](/help/ai-memory/)
