# Kernel Company OS

> Kernel's private company workspace. AI agents connect over MCP; access is limited to the company's allowlisted accounts.

This page tells an AI agent how to connect to Company OS. A browser on this origin gets the web app, which needs a Google sign-in; an agent uses MCP instead.

## Connect an AI agent (MCP)

MCP over streamable HTTP. The trailing slash is part of each URL.

- `https://os.kernelplatform.com/mcp/`: standard MCP with OAuth. The server answers an unauthenticated request with 401 and a `WWW-Authenticate` header naming its `resource_metadata`; the client discovers the login from there and opens a Google sign-in in the browser. Use this when the client can open a browser.
- `https://os.kernelplatform.com/mcp-login/`: for sessions that cannot open a browser (remote or headless). The session logs in with a single-use app password that the user generates and approves (steps below).

### Claude Code

```bash
claude mcp add --transport http company-os https://os.kernelplatform.com/mcp/
```

Then run `/mcp` in Claude Code and authenticate `company-os` in the browser.

Without a browser:

```bash
claude mcp add --transport http company-os-login https://os.kernelplatform.com/mcp-login/
```

### Codex

```bash
codex mcp add company-os --url https://os.kernelplatform.com/mcp/
codex mcp login company-os
```

Without a browser:

```bash
codex mcp add company-os-login --url https://os.kernelplatform.com/mcp-login/
```

## App-password login (`/mcp-login/`)

1. Ask the user to open Company OS in their own browser, go to Settings → App passwords and generate an app password (single-use, valid 10 minutes).
2. The user pastes it into the chat. Call `login(app_password)`.
3. Tell the user the 4-character match code that `login` returns. They approve the pending login showing that code in Settings → App passwords.
4. Call `login_status()` until it reports `logged_in`.
5. Clients that re-fetch their tool list on `tools/list_changed` (Claude Code) now show the user's tools by name. Clients that keep their first list (Codex) call `list_my_tools()` for the tool names and `call(tool, arguments)` to run one.

## Rules

- Access is limited to the company's allowlisted accounts, and each user sees only the tools they may use.
- Never ask the user for a long-lived token, an API key or their account password. The single-use app password goes only into `login`; never repeat it back.
- Verify the setup with one read-only tool call (on `/mcp-login/`: `login_status`, then `list_my_tools`). Do not write anything just to test the connection.
