local-agent-senses
The local-agent-senses MCP server provides local, offline-first multimedia understanding tools for LLM agents, including image description, OCR/transcription from images/videos, video analysis, speech-to-text transcription, and health/status checks.
describe_image: Describe/understand images using a local vision model, with optional cropping and size control.transcribe: Verbatim OCR/transcription of text from images, documents, screenshots, or video subtitles (supports frame caps).analyze_video: Analyze video for scenes, actions, time windows, contact sheets, and more, with configurable sampling modes.transcribe_audio: Convert speech to text via FunASR (SenseVoice or Paraformer), with timestamps, for audio/video files; supports language selection.vision_status: Show backend status including models, backend type, ffmpeg, speech environment, GPU, and watchdog.vision_check: Run full environment health check for image reading, transcription, and video sampling.
Allows analyzing and transcribing Bilibili videos, including scene detection, subtitle extraction, and speech-to-text, by resolving Bilibili page URLs through yt-dlp for direct media processing.
Allows analyzing and transcribing TikTok videos, including scene detection, subtitle extraction, and speech-to-text, by resolving TikTok page URLs through yt-dlp for direct media processing.
Allows analyzing and transcribing YouTube videos, including scene detection, subtitle extraction, and speech-to-text, by resolving YouTube page URLs through yt-dlp for direct media processing.
Click on "Deploy 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-agent-senses Extract text from this screenshot"
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.
local-agent-senses
English
Local vision, video and speech tools for text-only LLM agents. The default backend is Ollama on your own machine; media is not uploaded unless you explicitly configure an OpenAI-compatible endpoint.
中文说明见 README.zh-CN.md。
Related MCP server: multimodal-mcp
中文
中文版本请见 README.zh-CN.md。
Features
Image understanding and verbatim OCR/transcription.
PDF page rasterization for document OCR/analysis (poppler
pdftoppm).Video sampling for scenes, contact sheets, time windows and subtitles.
Optional FunASR speech-to-text with timestamps.
Windows screen and clipboard capture, plus platform adapters.
CLI for shell-based agents and MCP tools for Codex, Claude Desktop, Cursor, Cline and other MCP clients.
SSRF checks, download limits, media duration limits and no disk cache by default.
Quick start
Requirements: Python 3.10+, Ollama, and ffmpeg. Speech, video-site URL
resolution, and PDF rasterization (poppler-utils pdftoppm) are optional
extras.
git clone https://github.com/Scheme0/local-agent-senses.git
cd local-agent-senses
ollama pull haervwe/GLM-4.6V-Flash-9B
ollama pull qwen3.5:4b
python vision.py --check
python vision.py photo.png --prompt "Describe this image"
python vision.py document.png --mode text --transcribe
python vision.py paper.pdf --transcribe
python vision.py clip.mp4 --mode scenes --prompt "List each scene"Install console commands with pip install .:
vision --check
vision-mcp
vision-adapters --allRun vision --doctor for an offline dependency report. Add --json for
machine-readable diagnostics. Service admission is limited by
VISION_MAX_CONCURRENCY and VISION_SERVICE_TIMEOUT.
The adapter generator is implemented by scripts/generate_adapters.py and can
also be invoked directly when integrating with another agent.
Optional dependencies:
pip install .[speech]
pip install .[ytdlp]
pip install .[test]MCP
Run the stdio server with:
python extras/mcp_server.pyRegister it in Codex, for example:
codex mcp add vision -- python /absolute/path/extras/mcp_server.pyAvailable tools are describe_image, transcribe, analyze_video,
transcribe_audio, vision_status and vision_check.
Service results use a JSON envelope with text, kind, mode, metadata and
warnings. Expected failures use { "code": ..., "message": ... }, which
lets MCP clients distinguish invalid input from backend or media failures.
MCP validates image count, prompt size, frame count and FPS before invoking the CLI. The server uses an in-memory result cache. Disk caching is disabled by default because results may contain screenshots, transcripts or private documents. Enable it only when appropriate:
set VISION_MCP_CACHE=1 # Windows
export VISION_MCP_CACHE=1 # Linux/macOSRemote media and security
HTTP and HTTPS media URLs are treated as untrusted input. Local, private, loopback, link-local, multicast, cloud-metadata and NAT64 addresses are blocked, and redirects are checked again. By default, remote media is downloaded through the checked Python path before ffmpeg sees it. This avoids the DNS re-resolution gap that can occur when ffmpeg opens a URL directly.
DNS rebinding is only mitigated, not eliminated. The stdlib downloader resolves DNS and connects in a single step, so a hostile hostname can in principle be re-resolved between the check and the connect. For strict SSRF requirements, put the tool behind an egress proxy / allowlist.
Direct ffmpeg URL streaming is available only as an explicit compatibility option (off by default) and should be used only with trusted URLs:
set VISION_DIRECT_URL_STREAM=1 # Windows
export VISION_DIRECT_URL_STREAM=1 # Linux/macOSRemote OpenAI-compatible endpoints (api_base) must use https:// unless
they point at localhost (http://localhost / http://127.0.0.1). Plain HTTP
against a remote host is rejected, as are URLs without a scheme or with
embedded credentials.
Set limits in vision-config.json or with environment variables:
Setting | Default | Purpose |
| 20 | Image size cap |
| 2000 | Piped stdin media cap |
| 50 | PDF page cap (0 = system hard ceiling of 200) |
| 150 | PDF rasterization DPI |
| 500 | Unknown/remote media cap |
| 6 | Audio/video duration cap |
| false | Persist MCP results to disk |
| false | Let ffmpeg open remote URLs directly |
| 1800 | Seconds to wait in the service queue |
| 1800 | Execution budget for one request |
The video thumbnail candidate count is capped by a fixed internal hard limit
(MAX_THUMBNAIL_FRAMES, 1200) that cannot be disabled through configuration.
Downloads and PDF pages also have system hard ceilings (8192 MB and 200 pages)
that apply even when a configured limit is 0.
Explicitly configured external tool paths (VISION_FFMPEG,
VISION_SPEECH_PYTHON, OLLAMA_EXE, VISION_PDF_RENDERER, VISION_YTDLP)
must be absolute paths to an existing regular file.
Read SECURITY.md before exposing the MCP server to another machine. Media content is untrusted data; do not follow instructions found in images, subtitles or model output.
Configuration
Copy vision-config.example.json to vision-config.json. Configuration
priority is environment variables, then JSON config, then auto-detection.
Important settings include text_model, quick_model, ollama_host,
api_base, api_key, ffmpeg, speech_python, mcp_cache_dir and the limits
listed above.
Limitations
Video understanding is frame-based rather than end-to-end temporal reasoning.
OCR accuracy depends on resolution, layout, font and the selected model.
FunASR is optional and may require a separate environment and model download.
HEIC, AVIF and other uncommon formats depend on the installed ffmpeg build.
Configuring a cloud endpoint sends model inputs to that endpoint; local sampling and audio processing remain local.
Development
python -m pytest tests/ -v
python -m buildSee CONTRIBUTING.md, CHANGELOG.md and docs/COMPATIBILITY.md.
License
MIT. See LICENSE and THIRD_PARTY_NOTICES.md.
Available Tools
6 toolsanalyze_videoA
Analyze a video with a local vision model: scenes, actions, time-window deep reading, contact sheets, etc. Returns JSON: {"text": ..., "mode": ..., "frames": [{"t": ..., "w": ..., "h": ...}], "duration": ...}.
Inputs: video (required), prompt (required), to, fps, +3 more.
describe_imageA
Describe or understand one or more images with a local vision model (scene, objects, colors, UI, etc.). Returns JSON: {"text": ..., "mode": "image", "media": [...]}.
Inputs: images (required), prompt (required), crop, size.
transcribeA
Verbatim transcription of text in images/documents/screenshots/video subtitles (no summary, judgment, or interpretation). Returns JSON with text and, for videos, frame timestamps.
Inputs: media (required), max_frames.
transcribe_audioA
Speech-to-text (FunASR SenseVoice, with timestamps; embedded subtitle tracks are preferred when available). Returns JSON: {"text": ..., "source": "asr"|"subtitle"}.
Inputs: media (required), lang, asr_model.
vision_checkA
Run the environment health check (image reading, transcription, video sampling; can be slow).
Inputs: no named parameters.
vision_statusA
Show the vision backend status (models, backend type, ffmpeg, speech environment, GPU, watchdog).
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool targets a distinct medium or task: image understanding, text extraction, video analysis, audio transcription, and system diagnostics. Minor overlap exists between describe_image and analyze_video for video content, but descriptions clearly separate by media type.
Tool names mix conventions: three use verb_noun (describe_image, analyze_video, transcribe_audio), one is a bare verb (transcribe), and two use a vision_ prefix (vision_status, vision_check). This inconsistency makes the set feel less predictable.
Six tools is well-scoped for a multimodal sensing server. Each tool has a clear purpose and none feel redundant or unnecessary.
The set covers the core sensing lifecycle: image description, video analysis, audio/speech transcription, and health checks. Minor gaps like general audio analysis or dedicated frame extraction are absent but not essential for the stated purpose.
Related MCP Connectors
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
Chat, image, video, and audio models from many vendors behind one remote MCP server and one key.
214 tools for AI agents over one MCP endpoint: image, video, audio, 3D, data, storage, mail, GPUs.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceLocal vision-capable MCP server that lets AI agents describe screenshots, UI, charts, and photos via vision and OCR tools, with support for multiple providers and automatic fallback.5MIT
- FlicenseAqualityDmaintenanceLocal MCP server that adds multimodal capabilities to text-only models like Codex/DeepSeek, offering tools for image description, audio transcription, video analysis, image/video generation, and speech synthesis.101-
- AlicenseNot gradedqualityDmaintenanceMCP server that gives text-only LLMs vision capabilities by using a free multimodal model to perceive images, audio, and video, returning text for the main model to reason with.33 npmMIT
- AlicenseNot gradedqualityCmaintenanceA local stdio MCP server that lets an Agent use configured multimodal providers to inspect images, video, audio, and music files, acting as a sensory layer for text-only LLMs.118Apache 2.0