Content
<div align="center">
# Tool List
[](LICENSE)
[](https://nodejs.org/)
[](https://modelcontextprotocol.io/)
**Add Vision to Reasonix.**
Reasonix is a native terminal coding agent from DeepSeek, with strong reasoning but no eyes.
This project is an MCP Server that exposes the image/video understanding capabilities of Zhipu GLM-4.6V (or any OpenAI-compatible visual model) as tools to Reasonix - screenshot analysis, UI comparison, OCR, video interpretation, each with its own expertise.
> Based on [Loveacup/vision-mcp-server](https://github.com/Loveacup/vision-mcp-server) (MIT), thanks to the original author.
[How it Works](#-how-it-works) · [Quick Start](#-quick-start) · [Deploy to Other Machines](#-deploy-to-other-machines) · [Profile Presets](#-profile-presets) · [Tools](#-tools)
</div>
---
## How it Works
```
┌──────────────┐ MCP/stdio ┌──────────────────────────┐ HTTPS/Bearer ┌─────────────────┐
│ Reasonix │ ◄────────────► │ Vision MCP for Reasonix │ ───────────────► │ Zhipu GLM-4.6V │
│ (DeepSeek) │ │ (local node process) │ │ open.bigmodel.cn│
└──────────────┘ └──────────────────────────┘ └─────────────────┘
│
▼
┌──────────────┐
│ Local File System │ (image/video → base64)
└──────────────┘
```
- **DeepSeek** handles code reasoning and task scheduling.
- When encountering a screenshot/UI/image, Reasonix **automatically calls** the `vision` MCP tool, provided by GLM-4.6V for visual understanding.
- Local files are automatically converted to base64 data URI, completely transparent to Reasonix.
## Quick Start
### 1. Installation
```bash
git clone https://github.com/Dellety/vision-mcp-for-reasonix.git
cd vision-mcp-for-reasonix
npm install && npm run build
```
### 2. Configuration
Create `.env` (simplest: select profile + fill in key):
```bash
VISION_PROFILE=zhipu # Zhipu GLM-4.6V, domestic API
VISION_API_KEY=your-zhipu-key # https://open.bigmodel.cn console
```
> **API Key only through environment variables**, do not write to any files committed to the repository.
<details>
<summary>🔧 Other profiles or advanced overrides</summary>
| profile | vendor | default model |
|---|---|---|
| `zhipu` *(recommended)* | Zhipu BigModel | `glm-4.6v-flashx` (`glm-4.6v-flash` free) |
| `openai` | OpenAI | `gpt-4o` |
| `qwen` | Alibaba Tongyi Qianwen VL | `qwen-vl-max` |
| `local` *(default)* | local model | `Qwen3-VL-32B` (endpoint `localhost:8000`) |
Change model without changing vendor: add `VISION_MODEL=glm-4.6v-flash`.
Completely change endpoint: add `VISION_BASE_URL=...`, or directly change `VISION_PROFILE`.
</details>
### 3. Integrate with Reasonix
Add the following configuration to Reasonix's MCP configuration (location see [Reasonix documentation](https://github.com/esengine/deepseek-reasonix)):
```json
{
"mcpServers": {
"vision": {
"command": "node",
"args": ["/path/to/vision-mcp-for-reasonix/dist/index.js"],
"env": {
"VISION_PROFILE": "zhipu",
"VISION_API_KEY": "your-zhipu-key"
}
}
}
}
```
Start Reasonix and let it analyze a local image to verify. The startup log should be:
`Vision MCP for Reasonix started (profile: zhipu, model: glm-4.6v-flashx, ...)`
## Deploy to Other Machines
For scenarios where the target machine can directly connect to the public network, provide a tar package for one-click deployment (not released on npm).
**Source machine packaging:**
```bash
npm run pack
# → dist/vision-mcp-for-reasonix-deploy-v1.1.0.tar.gz
```
**Target machine installation:**
```bash
tar xzf vision-mcp-for-reasonix-deploy-v1.1.0.tar.gz -C ~
cd ~/vision-mcp-for-reasonix
npm ci --omit=dev # only install 2 production dependencies (sdk + zod), completed in seconds
./scripts/health-check.sh # self-test: node version / dependencies / key / endpoint reachable
```
Then point the above Reasonix configuration to `~/vision-mcp-for-reasonix/dist/index.js`, fill in the key, and restart.
> Production dependencies are only `@modelcontextprotocol/sdk` + `zod`, pure JS without native binding, cross-platform safe.
## Profile Presets
A profile comes with the correct endpoint and default model, and only needs to select profile + fill in key during deployment. Configuration priority:
```
1. Explicit environment variables (VISION_BASE_URL / VISION_MODEL / ...)
2. Explicit fields in config.json
3. VISION_PROFILE points to the preset (fill in unspecified fields)
4. Default: profile=local
```
| variable | default | description |
|---|---|---|
| `VISION_PROFILE` | `local` | preset vendor, see above table |
| `VISION_BASE_URL` | *(see profile)* | OpenAI-compatible endpoint (override profile) |
| `VISION_MODEL` | *(see profile)* | model name (override profile) |
| `VISION_API_KEY` | *(empty)* | API key, only through environment variables |
| `VISION_MAX_TOKENS` | `4096` | maximum response tokens |
| `VISION_TEMPERATURE` | `0.7` | sampling temperature |
## Tools
| tool | description | key parameters |
|------|------|---------|
| 🔍 `analyze_image` | natural language analyze image | `image`(path/URL), `prompt`, `detail`(low/high/auto) |
| 📝 `ocr_image` | OCR text recognition | `image`, `languages`(e.g. `zh,en`), `format`(plain/markdown/json) |
| 🔀 `compare_images` | compare 2-4 images | `images[]`, `prompt` |
| 🎬 `analyze_video` | video content analysis (requires video model) | `video`, `prompt` |
**Supported formats:** JPEG/PNG/GIF/WebP/BMP/SVG | MP4/AVI/MOV/MKV/WebM
**Input:** local path (automatically converted to base64) or URL
## Project Structure
```
vision-mcp-for-reasonix/
├── src/
│ ├── index.ts # MCP server entry + tool registration
│ ├── config.ts # configuration loading (env > config.json > profile)
│ ├── types.ts # type definitions
│ ├── tools/ # 4 visual tools
│ └── utils/ # API client + file processing
├── scripts/
│ ├── pack.sh # packaging and deployment tar
│ ├── health-check.sh # deployment self-test
│ └── verify-config.sh # configuration parsing and verification
└── docs/superpowers/specs/ # design documents
```
## License
[MIT](LICENSE)
This project is based on [Loveacup/vision-mcp-server](https://github.com/Loveacup/vision-mcp-server) (MIT), thanks to the original author.
On the basis of the original project, added Profile multi-presets, optimized for Reasonix + DeepSeek deployment, and renamed to `vision-mcp-for-reasonix`.