local_vision
Provides a read-only MCP tool that sends local image files to an OpenAI-compatible vision endpoint (e.g., LM Studio) and returns a text observation, enabling a text-only primary model to leverage vision capabilities.
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., "@local_visionWhat's in the photo at /home/user/screenshot.png?"
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.
Codex Local Vision Router

DeepSeek V4 runs the Codex session through DwarfStar while Qwen3.5 in LM Studio handles image inspection through the local MCP tool.
Use one model as the main Codex agent and a separate local vision-language model for image inspection.
This project exposes a read-only MCP tool that:
reads an image from an absolute local path;
sends it to an OpenAI-compatible vision endpoint such as LM Studio;
returns only a bounded text observation to Codex.
It is intended for custom Codex providers that work well with text and tools
but reject input_image content.
Architecture
user prompt with local path
|
v
primary Codex model (text + tools)
|
| MCP: local_vision.describe_image
v
Local Vision Router
|
| image bytes over loopback HTTP
v
LM Studio + local vision model
|
| plain-text observation
v
primary Codex modelRelated MCP server: VisionToolMCP
Privacy defaults
The default endpoint is
http://127.0.0.1:1234/v1.Non-loopback endpoints are rejected unless
LOCAL_VISION_ALLOW_REMOTE=1is explicitly set.Image bytes, base64 payloads, prompts, and API responses are not logged.
The returned tool result does not include the local image path.
No credentials, local configuration, model files, source images, or session data are included. The documentation contains only the intentionally published demonstration screenshot above.
A configured remote endpoint can receive image contents. Read SECURITY.md before enabling one.
Requirements
Node.js 20 or newer
Codex CLI
LM Studio, or another compatible
/v1/chat/completionsserverA loaded vision model
The tested model is
TracNetwork/Qwen3.5-4B-4bit-mlx,
loaded through LM Studio. LM Studio exposes it to the local API as
qwen3.5-4b-mlx in the tested setup; use the exact ID returned by
/v1/models if yours differs. Other vision models can be selected with
--model.
Quick start
1. Start the vision endpoint
In LM Studio:
Load a vision-capable model.
Open Developer.
Start the local server on port
1234.
Confirm the model is visible:
curl http://127.0.0.1:1234/v1/models2. Clone and check the router
git clone <repository-url>
cd codex-local-vision-router
node scripts/doctor.mjs3. Register the MCP server
For normal Codex:
node scripts/register.mjs --model qwen3.5-4b-mlxFor an isolated custom-provider installation, set the same CODEX_HOME used by
its launcher:
CODEX_HOME="$HOME/.codex-custom" \
node scripts/register.mjs --model qwen3.5-4b-mlxPowerShell:
$env:CODEX_HOME = "$HOME\.codex-custom"
node .\scripts\register.mjs --model qwen3.5-4b-mlxThe registration command refuses to replace an existing local_vision entry
unless --replace is supplied.
4. Mark the primary model as text-only
Copy the root keys from
templates/text-only-primary-config.toml
into the active $CODEX_HOME/config.toml. Place them before the first TOML
table.
This disables the built-in image tool and instructs Codex to use
local_vision.describe_image.
5. Start a new Codex session
Do not resume a session that already contains an incompatible image block.
Run /mcp and confirm local_vision is connected. Then test:
Use local_vision.describe_image to inspect /absolute/path/to/image.jpg.
Describe the main subject, composition, visible text, and uncertainty.Use a filesystem path rather than attaching or dragging the image into a text-only session.
End-to-end diagnostics
node scripts/doctor.mjs \
--image /absolute/path/to/image.jpg \
--prompt "Transcribe the largest visible heading."Configuration
Variable | Default | Purpose |
|
| Compatible API base URL |
|
| Vision model ID |
|
| Request timeout |
|
| Maximum image size |
|
| Generation ceiling |
|
| Structured answer limit |
| unset | Set to |
| unset | Optional endpoint bearer token |
Supported extensions: PNG, JPEG, WebP, GIF, and AVIF.
Remove
codex mcp remove local_visionRemove the text-only routing block from config.toml only if the primary
provider can safely receive images.
Development
npm run check
npm testThe MCP server has no runtime npm dependencies.
See docs/SETUP.md for the detailed provider workflow and docs/PUBLISHING.md for publishing this repository.
Codex plugin bundle
The repository is also a valid Codex plugin bundle. A marketplace can point to
this repository, and codex plugin add will install both the routing skill and
the bundled MCP server. The plugin defaults to the loopback LM Studio endpoint
and qwen3.5-4b-mlx.
Use the clone-and-register flow above when a different endpoint, model ID, or
CODEX_HOME needs to be selected at install time.
License
MIT
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.
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/krunkosaurus/codex-local-vision-router'
If you have feedback or need assistance with the MCP directory API, please join our Discord server