> ## 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

> Install tgcloud-mcp and connect your MCP client

# Installation

Requires **Node.js 20+**. The platform CLI itself requires Node.js 18+.

<CardGroup cols={2}>
  <Card title="npm" icon="box" href="#npm">
    npm install -g tgcloud-mcp, then tgcloud-mcp setup
  </Card>
  <Card title="One command" icon="terminal" href="#curl-bash">
    curl | bash — language, then the banner and wizard
  </Card>
  <Card title="Docker" icon="layers" href="#docker">
    ghcr.io/sdamarketing/tgcloud-mcp, stdio, no Node on the host
  </Card>
  <Card title="Client configs" icon="plug" href="#clients">
    opencode, Claude Code, Cursor, VS Code
  </Card>
</CardGroup>

## From npm {#npm}

```bash
npm install -g tgcloud-mcp
tgcloud-mcp setup     # client setup wizard
```

The wizard writes the MCP config. It also asks whether to install the
[Agent Plugin](https://agent-plugins.org) (`agent-plugin/` in this repo):
a copy lands in `~/.tgcloud-mcp/agent-plugin`. Cursor gets
`~/.cursor/plugins/local/tgcloud`. VS Code gets a `chat.pluginLocations` entry.
Codex, Copilot, and Kiro load that same directory through their plugin UI.

Claude Code and opencode keep using the MCP config. Add the skill with:

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

## One command {#curl-bash}

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

Clones to `~/.tgcloud-mcp`, builds, runs the wizard. Re-running updates.
It asks for a language first (English, Russian, Chinese, Arabic, German, French;
Enter is English, or set `TGCLOUD_MCP_LANG`). Then it prints a boxed banner
(blue gradient on a truecolor terminal) and a spinner while it clones, installs,
and builds. The wizard uses the same language and reads `/dev/tty`, so it still
asks questions when you pipe the script with `curl | bash`.

## Docker {#docker}

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

## Client configs {#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"] } } }
```

## Environment variables

| Variable | Default | Purpose |
|---|---|---|
| `TGCLOUD_CLI` | `npx` | CLI launcher command (can be a proxy wrapper) |
| `TGCLOUD_CLI_ARGS` | `tgcloud` | Prefix args before the subcommand |
| `TGCLOUD_TIMEOUT_MS` | `120000` | Per-command timeout. `deploy` allows at least 300000 ms for `npm run build` |
| `TGCLOUD_TOKEN` | — | CLI access token instead of `tgcloud login` |
