   
                      
                                                                                                                  
                 
   
# Connect your AI

Legevio talks to your AI over MCP, the standard way AI apps connect to outside tools. Once connected, your AI can read your projects, tasks and accepted Project Memory, and, with the right permissions, create tasks and hand results back for you to review.

There are two ways to connect. Pick by the AI you use.

| Your AI | How it connects | Checked live |
| --- | --- | --- |
| Claude (claude.ai) | Sign in from the app | Yes: connecting and reading |
| Claude Code | Personal token | Yes: reading and handing in |
| Codex CLI | Personal token | Built, not yet verified |
| ChatGPT | Sign in from the app | Built, not yet verified |
| Gemini CLI | Sign in from the app | Built, not yet verified |

Everything below starts in Legevio at the account menu at the foot of the sidebar: **Settings → MCP access**.

## Sign in from your AI app

1. In **Settings → MCP access**, find **Claude, ChatGPT and other AI apps** and press **Copy connector address**.
2. In your AI app, add a custom connector and paste the address. Each app names this step its own way; look for connectors or MCP servers in its settings.
3. The app opens a Legevio page titled **Connect *app* to Legevio?** It lists the permissions the app asked for. Check them and press **Allow**. You return to your app.
4. Check it works: ask your AI to list your Legevio projects. It should name them.

The card in Settings now says **Connected:** and the app's name.

> **Note.** An app gets exactly the permissions it asks for, and always **Read project context**. Legevio cannot add more on that page. If it shows only **Read project context**, the app can read your project but cannot hand work back. Use a personal token for an AI that should work on tasks.

## Use a personal token

For Claude Code, Codex CLI and your own scripts.

1. In **Settings → MCP access**, open **For Claude Code, Codex CLI and scripts: personal tokens**.
2. Give the token a name, for example "Claude Code on my laptop", and tick its **Permissions**. For an AI that works on tasks and hands results back, tick **Read project context**, **Create and update tasks** and **Create drafts**. Press **Create token**.
3. Copy the token now. It is shown only once.
4. Keep it in an environment variable called `LEGEVIO_MCP_TOKEN`. Each command asks you to paste the token, so it never lands in your shell history.

   Windows (PowerShell):

   ```powershell
   [Environment]::SetEnvironmentVariable('LEGEVIO_MCP_TOKEN', (Read-Host 'Legevio MCP token'), 'User')
   ```

   macOS or Linux (zsh; for bash use `~/.bashrc`):

   ```sh
   read -rs LEGEVIO_MCP_TOKEN && echo "export LEGEVIO_MCP_TOKEN=$LEGEVIO_MCP_TOKEN" >> ~/.zshrc
   ```

5. Add Legevio to your tool. Settings shows these blocks with your connector address filled in; use **Copy configuration** there.

   Claude Code, in `.mcp.json` in your project. It names the variable, not the token, so the file is safe to commit:

   ```json
   {
     "mcpServers": {
       "legevio": {
         "type": "http",
         "url": "<connector address>",
         "headers": {
           "Authorization": "Bearer ${LEGEVIO_MCP_TOKEN}"
         }
       }
     }
   }
   ```

   Codex CLI, in `~/.codex/config.toml` (built, not yet verified):

   ```toml
   [mcp_servers.legevio]
   url = "<connector address>"
   bearer_token_env_var = "LEGEVIO_MCP_TOKEN"
   ```

6. Optional: press **Copy rules** under **Rules for your repository** and paste them into your repository's `CLAUDE.md` or `AGENTS.md`. They tell your AI to start from the project state page, read each task before working on it, and hand in with one call.

Permissions are fixed when the token is created. To change them, revoke the token and create a new one.

## What each permission allows

| In Settings | What it allows |
| --- | --- |
| **Read project context** | Read your tasks, Project Memory, context and the project documents. Every connection has it. |
| **Create and update tasks** | Create and change tasks and the project state page directly. Every change is recorded. |
| **Create drafts** | Hand in results as drafts for review in your Inbox. |
| **Post messages** | Post messages into Inbox threads. |
| **Propose team roles** | Propose roles; each one waits in your Inbox for your answer. |

No permission lets an AI accept anything into Project Memory. That stays with people, or with an acceptance rule a project owner turned on. See [Project Memory and acceptance](/concepts/project-memory/).

## Disconnect

In **Settings → MCP access**, open the personal tokens section. Connected apps and tokens are listed under **Active tokens**. Press **Revoke**: access stops at once. Revoking cannot take back what the AI has already read.

## Next

- [Connect a computer](/start/connect-a-computer/) to chat with Claude Code or Codex on your own machine from Legevio.
- [Run your first project](/start/first-project/).
- Every tool your AI can call: [MCP tools reference](/reference/mcp-tools/).
