# agend-sh MCP server

> Provides persistent Linux environments for AI agents to run code, edit files, and host services via interactive terminals and HTTPS previews.

- Repository: https://github.com/agend-sh/cli
- Page: https://hostedmcp.org/servers/agend-sh/cli
- Transport: stdio
- Stars: 0
- License: MIT
- Latest version: 1.2.14

## Install

### Claude Code

```sh
claude mcp add --env AGEND_API_TOKEN=<YOUR_AGEND_API_TOKEN> cli -- docker run -i --rm ghcr.io/agend-sh/agend-mcp@sha256:4462e2571be0e69003e1be93255e04523342e1e5aa17482ec3d63bd7506bb82f
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "cli": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/agend-sh/agend-mcp@sha256:4462e2571be0e69003e1be93255e04523342e1e5aa17482ec3d63bd7506bb82f"
      ],
      "env": {
        "AGEND_API_TOKEN": "<YOUR_AGEND_API_TOKEN>"
      }
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "cli": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/agend-sh/agend-mcp@sha256:4462e2571be0e69003e1be93255e04523342e1e5aa17482ec3d63bd7506bb82f"
      ],
      "env": {
        "AGEND_API_TOKEN": "<YOUR_AGEND_API_TOKEN>"
      }
    }
  }
}
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "cli": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/agend-sh/agend-mcp@sha256:4462e2571be0e69003e1be93255e04523342e1e5aa17482ec3d63bd7506bb82f"
      ],
      "env": {
        "AGEND_API_TOKEN": "<YOUR_AGEND_API_TOKEN>"
      }
    }
  }
}
```

### Codex (`~/.codex/config.toml`)

```toml
[mcp_servers.cli]
command = "docker"
args = ["run", "-i", "--rm", "ghcr.io/agend-sh/agend-mcp@sha256:4462e2571be0e69003e1be93255e04523342e1e5aa17482ec3d63bd7506bb82f"]

[mcp_servers.cli.env]
AGEND_API_TOKEN = "<YOUR_AGEND_API_TOKEN>"
```

### Gemini CLI (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "cli": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "ghcr.io/agend-sh/agend-mcp@sha256:4462e2571be0e69003e1be93255e04523342e1e5aa17482ec3d63bd7506bb82f"
      ],
      "env": {
        "AGEND_API_TOKEN": "<YOUR_AGEND_API_TOKEN>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `AGEND_API_TOKEN` | yes | yes | Your Agend account token. Sign in with agend login, then follow docs/mcp-registry.md to load the active account token. An Agend account and available environment quota are required. |

## FAQ

### How can I use agend with my AI agent?

You can use the `agend config` command to automatically configure supported clients like Claude Code, Cursor, or VS Code, or manually add `agend mcp` to your client's MCP configuration.

### Can I see what my agent is doing in the terminal?

Yes, you can use the `agend watch` command to mirror the environment's interactive session and follow new updates in real-time.

### Does the terminal support interactive applications like Python REPLs?

Yes, the server supports interactive terminals through a PTY, providing feedback when the terminal enters an input wait state.
