> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kiwifs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# KiwiFS Cloud

> Connect agents and the kiwifs CLI to a hosted KiwiFS Cloud workspace.

[KiwiFS Cloud](https://app.kiwifs.com) is the hosted version of KiwiFS. It runs the server, backups, TLS, and sign-in for you, so you can skip deployment. Each workspace is a KiwiFS knowledge base with the same MCP tools as a self-hosted server.

This page covers connecting to a Cloud workspace from your agents and the `kiwifs` CLI. For self-hosting, start with the [Quickstart](https://docs.kiwifs.com/quickstart.md).

## Connect an MCP client

Each workspace has an MCP endpoint:

```text theme={null}
https://api.kiwifs.com/api/workspaces/{slug}/mcp
```

Authenticate with your workspace API key, which you find in the workspace settings at [app.kiwifs.com](https://app.kiwifs.com).

> [tab] CLI (recommended)
>
> `kiwifs connect` prints a ready-to-paste config, or writes it into your client's config file:
>
> ```bash Terminal theme={null}
> export KIWI_API_KEY=kiwi_sk_...
> kiwifs connect my-workspace                  # print config
> kiwifs connect my-workspace --write cursor   # write to Cursor
> kiwifs connect my-workspace --write auto     # write to every detected client
> ```
>
> Restart the client afterwards.

> [tab] URL clients
>
> For clients that support remote MCP servers (Cursor, Claude Code, Windsurf, VS Code, and others):
>
> ```json mcp.json theme={null}
> {
>   "mcpServers": {
>     "kiwi": {
>       "url": "https://api.kiwifs.com/api/workspaces/my-workspace/mcp",
>       "headers": { "Authorization": "Bearer ${env:KIWI_API_KEY}" }
>     }
>   }
> }
> ```

> [tab] Claude Desktop
>
> Claude Desktop runs MCP servers over stdio, so bridge to the workspace with `kiwifs mcp --remote`:
>
> ```json claude_desktop_config.json theme={null}
> {
>   "mcpServers": {
>     "kiwi": {
>       "command": "kiwifs",
>       "args": [
>         "mcp",
>         "--remote", "https://api.kiwifs.com/api/workspaces/my-workspace",
>         "--api-key", "kiwi_sk_..."
>       ]
>     }
>   }
> }
> ```

> [!WARNING]
>
> Treat the API key like a password. `kiwifs connect` without `--write` prints a config that reads the key from `KIWI_API_KEY`, which is safe to commit. `--write` embeds the key in the client's config file.

## kiwifs connect

```bash theme={null}
kiwifs connect <workspace-slug> [flags]
```

> [accordion] Flags
>
> | Flag | Default | Description |
> | - | - | - |
> | `--key` | `KIWI_API_KEY` | Workspace API key. If unset, the CLI uses your `kiwifs login` session to fetch it. |
> | `--write` | — | Write the config to `cursor`, `claude-code`, `windsurf`, `claude-desktop`, or `auto` (every detected client) |
> | `--project` | `false` | Write to the project config (`.cursor/mcp.json` or `.mcp.json`) instead of the global one |
> | `--host` | `https://api.kiwifs.com` | API host |

> [accordion] Config files it writes
>
> | Client | Global config | Project config |
> | - | - | - |
> | `cursor` | `~/.cursor/mcp.json` | `.cursor/mcp.json` |
> | `claude-code` | `~/.claude/settings.json` | `.mcp.json` |
> | `windsurf` | `~/.codeium/windsurf/mcp_config.json` | — |
> | `claude-desktop` | `claude_desktop_config.json` in the Claude app folder | — |
>
> Existing entries in those files are kept; only the `kiwi` server entry is added or replaced.

## Sign in from the CLI

`kiwifs login` uses the OAuth device flow: the CLI shows a code, you confirm it in your browser, and the CLI stores a session in `~/.kiwifs/credentials.json`. After that, `kiwifs connect` works without `--key`.

```bash Terminal theme={null}
kiwifs login     # sign in through your browser
kiwifs whoami    # show the signed-in account
kiwifs logout    # remove stored credentials
```

## Cloud and self-hosted compared

| | Self-hosted | Cloud |
| - | - | - |
| Runs on | Your machine, Docker, or Kubernetes | Managed by KiwiFS |
| Auth | `none`, `apikey`, `perspace`, or `oidc` | Workspace API key or browser sign-in |
| MCP endpoint | `http://host:3333/mcp`, or `kiwifs mcp` over stdio | `https://api.kiwifs.com/api/workspaces/{slug}/mcp` |
| NFS, S3, WebDAV | Available with `kiwifs serve` flags | Not available |
| Workspaces | One server, one or more [spaces](https://docs.kiwifs.com/concepts/multi-space.md) | One workspace per slug |

## Related

> [card] [MCP](https://docs.kiwifs.com/concepts/mcp.md)
>
> The MCP tools your agent gets.

> [card] [Agent playbook](https://docs.kiwifs.com/concepts/agent-playbook.md)
>
> How agents onboard with `kiwi_context`.

> [card] [Quickstart](https://docs.kiwifs.com/quickstart.md)
>
> Run KiwiFS yourself.

> [card] [Authentication](https://docs.kiwifs.com/guides/auth-tokens.md)
>
> Auth for self-hosted servers.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.