> ## Documentation index
> Fetch the complete documentation index at: https://tgcloud.docs7.io/llms.txt
> Ask it with GET https://tgcloud.docs7.io/ask?q=<keywords or question>. Short keywords rank best.
> Use these to discover all available pages before exploring further.

# Installation

> tgcloud-mcp installieren und den MCP-Client verbinden

# Installation

**Node.js 20+** ist nötig. Die Plattform-CLI selbst braucht Node.js 18+.

<CardGroup cols={2}>
  <Card title="npm" icon="box" href="#npm">
    npm install -g tgcloud-mcp, danach tgcloud-mcp setup
  </Card>
  <Card title="Ein Befehl" icon="terminal" href="#curl-bash">
    curl | bash — zuerst die Sprache, dann Banner und Assistent
  </Card>
  <Card title="Docker" icon="layers" href="#docker">
    ghcr.io/sdamarketing/tgcloud-mcp, stdio, ohne Node auf dem Host
  </Card>
  <Card title="Client-Konfiguration" icon="plug" href="#clients">
    opencode, Claude Code, Cursor, VS Code
  </Card>
</CardGroup>

## Von npm {#npm}

```bash
npm install -g tgcloud-mcp
tgcloud-mcp setup
```

Der Assistent schreibt die MCP-Konfiguration und fragt, ob das [Agent Plugin](https://agent-plugins.org) installiert werden soll (`agent-plugin/` in diesem Repo). Eine Kopie liegt in `~/.tgcloud-mcp/agent-plugin`. Cursor bekommt `~/.cursor/plugins/local/tgcloud`. VS Code bekommt einen Eintrag in `chat.pluginLocations`. Codex, Copilot und Kiro laden dasselbe Verzeichnis über ihre Plugin-Oberfläche.

Claude Code und opencode bleiben bei der MCP-Konfiguration. Den Skill gibt es so:

```bash
npx skills add sdamarketing/tgcloud_mcp
```

## Ein Befehl {#curl-bash}

```bash
curl -fsSL https://raw.githubusercontent.com/sdamarketing/tgcloud_mcp/main/install.sh | bash
```

Klont nach `~/.tgcloud-mcp`, baut und startet den Assistenten. Erneutes Ausführen aktualisiert.
Zuerst die Sprache (English, Русский, 中文, العربية, Deutsch, Français;
Enter ist Englisch, oder `TGCLOUD_MCP_LANG`). Danach ein Banner im Rahmen
(blauer Verlauf bei Truecolor) und ein Spinner für Klonen, Installation und
Build. Der Assistent spricht dieselbe Sprache und liest `/dev/tty`, deshalb
stellt er auch bei `curl | bash` Fragen.

## Docker {#docker}

```bash
docker run -i --rm ghcr.io/sdamarketing/tgcloud-mcp
```

## Client-Konfiguration {#clients}

**opencode** (`~/.config/opencode/opencode.json`):

```json
{ "mcp": { "tgcloud": { "type": "local", "command": ["npx", "-y", "tgcloud-mcp"], "enabled": true } } }
```

**Claude Code / Cursor:**

```json
{ "mcpServers": { "tgcloud": { "command": "npx", "args": ["-y", "tgcloud-mcp"] } } }
```

**VS Code** (`mcp.json`):

```json
{ "servers": { "tgcloud": { "type": "stdio", "command": "npx", "args": ["-y", "tgcloud-mcp"] } } }
```

## Umgebungsvariablen

| Variable | Vorgabe | Zweck |
|---|---|---|
| `TGCLOUD_CLI` | `npx` | Befehl, der die CLI startet (darf ein Proxy-Wrapper sein) |
| `TGCLOUD_CLI_ARGS` | `tgcloud` | Argumente vor dem Unterbefehl |
| `TGCLOUD_TIMEOUT_MS` | `120000` | Timeout eines Befehls. `deploy` lässt `npm run build` mindestens 300000 ms |
| `TGCLOUD_TOKEN` | — | CLI-access-Token statt `tgcloud login` |
