
# Connect a tool to your vault

Each connection is for one vault and starts read-only. When you connect a
tool you can also let it write files or save memories, as far as your own
access allows. Find a vault's address, its connections, and its tokens in
**Settings → Vault connections**, or choose **Connect an AI tool** in the
vault.

The address looks like this:

```text
https://api.bot.skopik.com/v1/vaults/vlt_…/mcp
```

A tool's changes are saved straight away under its name; nobody is asked to
approve each one. Revoking a connection stops it at once. Anything the tool
already read stays with the tool.

## Codex CLI

### Sign in through the browser

```sh
codex mcp add skopik_vault --url https://api.bot.skopik.com/v1/vaults/vlt_…/mcp
```

Codex opens Skopik in your browser to sign in as soon as you add the vault.
Skopik shows the app's name, where it returns to, and the vault. Codex asks
only to read and won't ask for more on its own, so tick **Write files** or
**Write memories** now if you want Codex to change the vault, then choose
**Connect**.

To sign in again, for example after revoking the connection to change its
permissions, run `codex mcp login skopik_vault`.

### Use a vault token

For scripts and machines without a browser:

1. In **Settings → Vault connections**, create a token named after where it
   will run, with the permissions it needs, and copy it. It is shown once,
   with the Codex configuration below.
2. Set it in the environment Codex runs in:

   ```sh
   export SKOPIK_VAULT_TOKEN='skv_…'
   ```

3. Add the vault to `~/.codex/config.toml`:

   ```toml
   [mcp_servers.skopik_vault]
   url = "https://api.bot.skopik.com/v1/vaults/vlt_…/mcp"
   bearer_token_env_var = "SKOPIK_VAULT_TOKEN"
   required = true
   ```

With `required = true`, Codex stops before it starts if the token is wrong
or revoked. Without it, Codex runs without the vault's tools. A token's
permissions can't change; create a new token to allow more.

## Claude Code

```sh
claude mcp add --transport http skopik_vault https://api.bot.skopik.com/v1/vaults/vlt_…/mcp
claude mcp login skopik_vault
```

Skopik opens in your browser. Claude Code asks for every permission; tick
the ones you want it to have and choose **Connect**. Claude Code then says
`Authenticated with "skopik_vault"`.

## What a connected tool can do

| Tool action | Needs | Does |
| --- | --- | --- |
| `vault_info` | Read | The vault, this connection's permissions and tools, and its limits |
| `list_files` | Read | Files and folders, with each file's current version and search status |
| `search` | Read | Search files and memories by their words, with short excerpts and locations |
| `read_file` | Read | A file's text in line ranges, including earlier kept versions |
| `list_memories` | Read | Saved memories with their sources |
| `write_file` | Write files | Create or replace a text file of up to 256 KiB |
| `save_memory` | Write memories | Save or update a memory; ones a person last edited stay protected |

Tools can't share the vault, change who has access, delete anything, or
change billing. A tool that asks for something its connection doesn't allow
is told which permission is missing and how to get it.

## Tools we've checked

We list a tool once we've connected it and used it to search, read a file,
save a memory, and find a memory another tool saved.

| Tool | Browser sign-in | Vault token |
| --- | --- | --- |
| Codex CLI | Checked | Checked |
| Claude Code | Checked | Not checked |

Claude's custom connectors are next. A connected tool decides for itself
when to use the vault; ask it to search or save when you want it to.
