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

# Integrations

> CLI reference for connecting machine0 to external services like GitHub, Linear, and remote MCP servers.

Integrations connect your machine0 account to external services and store the resulting credentials encrypted. Injecting credentials into your VMs is coming next. Three integrations are built in — `github` (a GitHub account for `gh` and `git push`/`clone`), `linear` (the Linear GraphQL API), and `machine0-cli` (a machine0 API key so the machine0 CLI works inside a VM) — and you can add any remote HTTP MCP server as a custom integration.

```bash theme={"theme":"css-variables"}
machine0 integrations ls
machine0 integrations connect github
machine0 integrations test github
```

Credentials are stored encrypted at rest. OAuth connections open your browser for the provider's consent screen; `machine0-cli` connects instantly (it mints an API key server-side, visible in your account's token list as `machine0-cli-integration`).

Only HTTP(S) MCP servers are supported for custom integrations. URLs must be public — private, loopback, and link-local addresses are rejected.

***

## integrations ls

List all integrations — built-in and custom — with their connection status.

```bash theme={"theme":"css-variables"}
machine0 integrations ls
machine0 integrations ls --json
```

| Status         | Meaning                                                  |
| -------------- | -------------------------------------------------------- |
| `connected`    | credentials are stored and ready                         |
| `disconnected` | not connected yet — run `integrations connect`           |
| `unavailable`  | this server has no OAuth app configured for the provider |

***

## integrations get

Show one integration's details, including which external account is connected.

```bash theme={"theme":"css-variables"}
machine0 integrations get <name>
machine0 integrations get github --json
```

***

## integrations add

Add a remote HTTP MCP server as a custom integration. Names follow the same rules as machine names (letters, digits, and dashes; max 63 characters), and built-in names and close aliases (`github`, `linear`, `machine0-cli`, and `machine0`) are reserved. Accounts are limited to 50 integrations.

```bash theme={"theme":"css-variables"}
machine0 integrations add <name> --url <url>
```

```bash theme={"theme":"css-variables"}
machine0 integrations add deepwiki --url https://mcp.deepwiki.com/mcp
```

***

## integrations rm

Remove a custom MCP integration and delete its stored credentials. Built-in integrations can't be removed — use `disconnect` instead.

```bash theme={"theme":"css-variables"}
machine0 integrations rm <name>
machine0 integrations rm <name> --yes   # skip the confirmation prompt
```

***

## integrations connect

Connect (authenticate) an integration. OAuth providers open your browser for the consent screen; once you approve, the CLI reports success. `machine0-cli` connects immediately without a browser, and so do custom MCP servers that don't require auth.

```bash theme={"theme":"css-variables"}
machine0 integrations connect <name>
machine0 integrations connect <name> --yes   # skip the re-authorization confirmation
```

```bash theme={"theme":"css-variables"}
machine0 integrations connect github        # browser consent
machine0 integrations connect machine0-cli  # instant
```

Re-running `connect` on an already-connected integration asks for confirmation, then replaces the stored credentials with a fresh grant.

***

## integrations disconnect

Disconnect an integration and delete its stored credentials. Built-in providers also get best-effort revocation on the provider side; custom MCP credentials are simply deleted. The integration shows as `disconnected` until you reconnect.

```bash theme={"theme":"css-variables"}
machine0 integrations disconnect <name>
```

***

## integrations test

Check that an integration's stored credentials actually work. Exits non-zero when the check fails, so it's scriptable.

```bash theme={"theme":"css-variables"}
machine0 integrations test <name>
machine0 integrations test <name> --json
```

What each integration tests:

| Integration    | Check                                                              |
| -------------- | ------------------------------------------------------------------ |
| `github`       | calls the GitHub API and reports the authenticated login           |
| `linear`       | queries the Linear GraphQL viewer (refreshing the token if needed) |
| `machine0-cli` | verifies the API key against machine0                              |
| MCP servers    | connects and lists the server's tools                              |
