multimodal-mcp-server
v1.0.0
Published
Vision/multimodal MCP server for OpenAI-compatible gateways. Reasoning-model aware: thinking off by default, reasoning_content fallback. 8 tools: analyze_image, extract_text_from_screenshot, ui_diff_check, understand_technical_diagram, analyze_data_visual
Maintainers
Readme
multimodal-mcp-server
Vision / multimodal MCP server that talks to any OpenAI-compatible gateway (/v1/chat/completions). Built for reasoning models: thinking is off by default and there is a reasoning_content fallback, so models like mimo-v2.5 return real answers instead of Invalid API response: missing content.
Exposes 8 tools: analyze_image, extract_text_from_screenshot, ui_diff_check, understand_technical_diagram, analyze_data_visualization, diagnose_error_screenshot, ui_to_artifact, analyze_video.
Why this fork-style patch exists
Most vision MCP servers hard-code thinking: { type: 'enabled' } and read only message.content. Reasoning models return content: null while thinking, so those servers throw Invalid API response: missing content. This package:
- Turns thinking off by default — controlled by
THINKING(defaultdisabled), so reasoning models answer incontentdirectly. - Falls back to
reasoning_content— ifcontentis empty, it readsmessage.reasoning_content(belt and braces).
Quick start (Claude Code)
{
"mcpServers": {
"multimodal-mcp-server": {
"type": "stdio",
"command": "npx",
"args": ["-y", "[email protected]"],
"env": {
"BASE_URL": "http://127.0.0.1:3000/v1/",
"API_KEY": "sk-your-gateway-token",
"VISION_MODEL": "mimo-v2.5",
"THINKING": "disabled"
}
}
}
}Restart Claude Code → /mcp shows multimodal-mcp-server online → ask it to analyze_image a picture.
You can also run it directly:
npx -y multimodal-mcp-server(needs the same env vars).
Env vars
| Var | Required | Notes |
|---|---|---|
| BASE_URL | yes | OpenAI-compatible base URL, must end with / (the server concatenates BASE_URL + 'chat/completions' literally) |
| API_KEY | yes | gateway token. MUST be set explicitly — some shells inject ANTHROPIC_AUTH_TOKEN, which would otherwise 401 against your gateway |
| VISION_MODEL | yes | vision model id, e.g. mimo-v2.5 |
| THINKING | no | enabled/disabled, default disabled. Keep disabled for reasoning models |
Optional: TIMEOUT (default 300000ms), RETRY_COUNT, VISION_MODEL_TEMPERATURE / _TOP_P / _MAX_TOKENS. Log file path: MCP_LOG_PATH.
The patch
The server is based on an Apache-2.0 MCP vision package (v0.1.4), patched in build/core/chat-service.js:
- thinking: { type: 'enabled' },
+ thinking: { type: process.env.THINKING === 'enabled' ? 'enabled' : 'disabled' },
...
- const result = response.choices?.[0]?.message?.content;
+ const message = response.choices?.[0]?.message;
+ const result = message?.content || message?.reasoning_content;License
Apache-2.0. Upstream: @z_ai/mcp-server 0.1.4 (original author attribution retained).
