# imgcli MCP server

> Lets an AI client convert, resize, crop, and apply filters to images using a lightweight, dependency-free C binary.

- Repository: https://github.com/swperb/imgcli
- Page: https://hostedmcp.org/servers/swperb/imgcli
- Transport: stdio
- Stars: 0
- License: MIT
- Latest version: 0.2.0

## Install

### Claude Code

```sh
claude mcp add imgcli -- npx -y imgcli-mcp
```

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

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

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

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

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

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

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

```toml
[mcp_servers.imgcli]
command = "npx"
args = ["-y", "imgcli-mcp"]
```

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

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

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `IMGCLI_BIN` | no | no | Path to the imgcli binary if not on PATH (e.g. after `brew install swperb/tap/imgcli`). |

## FAQ

### What image formats does imgcli support by default?

The default build supports PNG, JPEG, BMP, TGA, GIF, PPM, and QOI without any external dependencies.

### Can I use imgcli in an automated pipeline or with an AI agent?

Yes, it is designed for automation with a --json flag for machine-readable results, a --quiet flag to suppress chatter, and it is non-interactive.

### Is imgcli safe to run on untrusted image files?

Yes, it includes security features like decompression-bomb protection, integer-overflow-safe allocation, and has no support for network protocols or subprocesses.
