modlens-mcp
Provides tools for image analysis, OCR, layout, and semantics using OpenAI-compatible vision APIs (e.g., Zhipu GLM, Aliyun Qwen-VL, OpenAI).
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@modlens-mcpAnalyze this image and summarize its contents"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
modlens-mcp
MCP server that gives text-only models (e.g. DeepSeek) structured JSON vision evidence (summary / OCR / layout / semantics / uncertainty) by calling vision APIs directly — no CLI dependencies. The output contract follows the ModLens spec, so evidence files stay structured and machine-checkable.
Designed for Reasonix (.mcp.json with Claude Code-compatible mcpServers),
works with any MCP client.
Features
4 tools —
analyze_image,ocr_image,compare_images,find_imageDirect API calls: OpenAI-compatible endpoints (
openai/gemini-api) and Anthropic native (anthropic) — configured via one JSON file, no CLI installs, no shell spawningStructured evidence, never free text: the ModLens JSON contract (
summary/ocr/layout/semantics/uncertainty) is requested via a strict system prompt and validated on parseFits Reasonix's 32KB tool-result cap: every tool result is a slim projection (
summary/uncertainty/evidence_path); the full evidence JSON is persisted to.reasonix/vision-evidence/<sha256>.jsonand read on demand viaread_fileStateless & zero-pollution: each call is an independent HTTP request; image bytes never enter any model history
Registry:
analyze_imageregisters image metadata (.reasonix/vision-index.jsonl) sofind_imagecan locate pasted images even after the conversation window lost the referenceWorkspace root resolution: on every call the server asks the MCP client for the current project root (
roots/list, ≤1s, never cached across calls) and probes candidate roots in order — project root → configuredworkspaceRoot→ global workspace~/.reasonix→ home dir → cwd — picking the first that exists. A single long-lived server resolves pasted attachments correctly in every project (Reasonix stores pasted files under the project's.reasonix/attachments/).Delivery-first friendly: all four tools declare
readOnlyHint, so Reasonix hosts treat them as non-destructive instead of blocking them behind acceptance criteria. Side effects stay inside the server's own state (~/.reasonix/vision-evidence/,vision-index.jsonl); the only external effect is the paid vision-API call you configured.
Related MCP server: vision-relay-mcp
Install
npm install # inside this project
npm run build # tsc → dist/Configure
Precedence: Reasonix MCP panel env wins — set VISION_API_KEY (plus
VISION_PROVIDER / VISION_BASE_URL / VISION_MODEL) in the MCP server env
(panel or .mcp.json) and it takes effect after restart. Without a key in env,
the server reads ~/.reasonix/vision-config.json (copy from
config.example.json; VISION_CONFIG_FILE overrides the path), then falls
back to the remaining VISION_* env vars.
{
"provider": "openai",
"baseUrl": "https://open.bigmodel.cn/api/paas/v4",
"apiKey": "your-real-key",
"model": "glm-4.6v",
"workspaceRoot": "D:/你的项目目录"
}provider:openai(OpenAI-compatible endpoints: Zhipu GLM, Aliyun Qwen-VL, OpenAI…),gemini-api(its OpenAI-compatible endpoint), oranthropic(native Messages API;baseUrldefaults tohttps://api.anthropic.com)Missing / placeholder / non-ASCII keys are rejected with a clear Chinese error before any HTTP call — you can never hit a cryptic provider error
.mcp.json (project root) only needs the server itself:
{
"mcpServers": {
"vision": {
"command": "node",
"args": ["<你的用户目录>/.reasonix/modlens-mcp/dist/index.js"]
}
}
}No VISION_WORKSPACE_ROOT needed: relative paths resolve via candidate roots
(global workspace ~/.reasonix first), so the same server works in any project.
Environment variables (all optional)
Variable | Default | Purpose |
|
| path to the config JSON |
| config | base for relative |
|
| registry file |
|
| full evidence JSON output |
| 180000 | per-call timeout, clamped to [1000, 600000] |
|
| fallback provider: |
| provider default | fallback endpoint |
| — | fallback model name |
| — | provider key; takes precedence over the config file when set (panel/env wins) |
Tool contract (summary)
analyze_image(image, prompt?, provider?, model?) →
{ image, tool, provider, model, summary, uncertainty, analysis, evidence_path }
(slim, <32KB); full evidence (ocr.full_text, layout, semantics) at
evidence_path.
Every call makes two vision requests: ① OCR/evidence (ModLens JSON
contract → evidence file), ② a free-form analysis answering your prompt
verbatim (no JSON constraints; a Chinese default question is used when no
prompt is given). The analysis lands in the analysis field of both the slim
result and the evidence file (additive, backward compatible). If the analysis
request fails, the OCR evidence still succeeds (degraded, no analysis).
ocr_image(image, format?) → { image, format, evidence_path, preview, full_text_chars }.
compare_images(images[2-4], prompt?) → per-image slim blocks with independent
image + evidence_path.
find_image(filename?, sha256Prefix?, limit?) → registry matches
(metadata only, never image bytes).
Test
npm test # 74 tests: config + direct (mock HTTP) + tools + real MCP protocol e2eSecurity
No shell spawning; HTTP requests use argument-safe
fetchwith only the configured endpointErrors are sanitized (keys / Bearer / Basic redacted) before reaching the model context; the config key is never echoed back
Evidence files and the registry are written with 0600 / 0700 permissions
The key lives either in
~/.reasonix/vision-config.json(0600, not in version control) or in the Reasonix MCP panel env (VISION_API_KEY, persisted plaintext in the Reasonix config.toml —/mcpshows it redacted; keep that config out of shared screens and backups). Either way: rotate the key if it ever appears in logs or chats
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityCmaintenanceA low-hallucination vision MCP server that uses OpenAI-compatible multimodal models with structured prompts, confidence gating, and forced JSON to reduce false claims in image analysis.Last updated
- AlicenseAqualityAmaintenanceA tiny MCP server that lets text-only coding models analyze images via vision relay APIs, supporting single image analysis and side-by-side comparison.Last updated1MIT
- FlicenseAqualityBmaintenanceOpenAI-compatible vision MCP server with 14 provider presets that enables MCP clients to analyze images, including screenshots, text, and UI mockups, via a single analyze_image tool.Last updated2
- AlicenseAqualityBmaintenanceMCP server that analyzes images, reads code and ZIP archives, and provides text context for non-vision models.Last updated3MIT
Related MCP Connectors
OCR, transcription, file extraction, and image generation for AI agents via MCP.
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
MCP server for Google Veo AI video generation
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/AnthonyandNancy/modlens-mcp-for-reasonix'
If you have feedback or need assistance with the MCP directory API, please join our Discord server