Skip to main content
Glama
JesonMrLiu

claude-image-recognition-mcp

by JesonMrLiu
README.md
# claude-image-recognition-mcp

OpenAI-compatible **vision recognition MCP server**. Lets any MCP client (Claude Code with a non-multimodal model, etc.) "see" images by routing them to any OpenAI-compatible vision model (GLM-4V, Qwen-VL, GPT-4o, vLLM, …).

## Install

```bash
npm i claude-image-recognition-mcp
# or use directly via npx
npx claude-image-recognition-mcp
```

## Configure

Set environment variables (all prefixed `IMAGE_RECOGNITION_`):

| Var | Required | Default | Description |
|---|---|---|---|
| `IMAGE_RECOGNITION_API_KEY` | ✅ | — | API key |
| `IMAGE_RECOGNITION_BASE_URL` | ✅ | — | OpenAI-compatible root, e.g. `https://open.bigmodel.cn/api/paas/v4` |
| `IMAGE_RECOGNITION_MODEL` | ✅ | — | Vision model id, e.g. `glm-4v-plus` |
| `IMAGE_RECOGNITION_DETAIL` | ❌ | `high` | `low`/`high`/`auto` |
| `IMAGE_RECOGNITION_MAX_TOKENS` | ❌ | `2048` | 64–8192 |
| `IMAGE_RECOGNITION_TIMEOUT_MS` | ❌ | `60000` | per-request timeout |
| `IMAGE_RECOGNITION_DOWNLOAD_URL` | ❌ | `0` | `1` = download URL images to base64 |
| `IMAGE_RECOGNITION_MAX_FILE_MB` | ❌ | `15` | local file size cap |

## Wire into an MCP client

```jsonc
{
  "mcpServers": {
    "image-recognition": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "claude-image-recognition-mcp"],
      "env": {
        "IMAGE_RECOGNITION_API_KEY": "<key>",
        "IMAGE_RECOGNITION_BASE_URL": "https://open.bigmodel.cn/api/paas/v4",
        "IMAGE_RECOGNITION_MODEL": "glm-4v-plus"
      }
    }
  }
}
```

## Tool: `recognize_image`

| Param | Type | Description |
|---|---|---|
| `image` | string (required) | local path / http(s) URL / literal `clipboard` |
| `prompt` | string | question or instruction (default: describe the image) |
| `model` | string? | override configured model id |
| `detail` | `low`\|`high`\|`auto`? | OpenAI vision detail |
| `max_tokens` | number? | 64–8192 |

### Clipboard

- Windows: `Win+Shift+S`, then pass `image: "clipboard"`
- macOS: needs `brew install pngpaste`
- Linux: needs `wl-paste` (Wayland) or `xclip` (X11)

## License

MIT

TDQS

A4.1/5.0

Scored across 1 tool

Disambiguation5/5

With only a single tool, there is no possibility of confusion between tools; the tool's name and description clearly define its purpose.

Naming Consistency5/5

The tool name follows a clear verb_noun convention (recognize_image), and since there is only one tool, naming consistency is trivially maintained.

Tool Count3/5

The server exposes a single tool, which is on the edge of being too few for a typical MCP server. While the tool is substantive and not trivial, the surface area feels thin compared to servers that offer multiple related operations.

Completeness4/5

The tool covers the core operation of image recognition/analysis with flexible input sources (path, URL, clipboard). Minor gaps might include additional controls or metadata, but the primary workflow is well-covered.

Maintenance

ActivityMaintained
ResponsivenessSyncing