openmedia-mcp
openmedia-mcp
面向 MCP 代理(Agent)的上下文_MCP 服务器套件,用于提取、分析和操作媒体——图像、PDF、视频、音频。
可在任何兼容 MCP 的宿主(harness)中运行(opencode、Claude Code/Desktop、Cursor、Windsurf、Cline、LM Studio 等),传输层支持 stdio、streamable HTTP 或 SSE。
为什么
多模态模型具备视觉能力,但多数 harness 没有提供干净的途径,应用一个视频、一份扫描版 PDF 或一张 20 MB 的照片——要么失败,要么烧掉大量除上下文。openmedia-mcp 通过硬性规定对此作出修复:
每个视觉输出都缩小尺寸并按 JPEG 重新压缩后才能到达模型(默认最大边长 / JPEG 质量可配置)。
每个文本输出都设置了最大长度,并附上一个显式的截断标记,指引模型如何继续取回更多。
每次调用的帧数/页数都有上限(12 帧、8 页),防止意外刷爆上下文。
URL 被当作一等参与者:视频页面的 URL(YouTube 与 1000+ 站点,经由 yt-dlp)按 ≤720p 载入一次并缓存;直接文件 URL 根据大小上限被缓存。
Related MCP server: Vision MCP Server
系统要求
Python ≥ 3.10 及对应系统结算(全部在调用时刻进行了解析,并带有可操作的错误提示——只有实际调用到的工具才需要自己的二进制):
二进制 | 用途 | Arch 包 |
| 视频、音频 |
|
| 视频 URL、下载 |
|
|
| |
| image_ocr, pdf_ocr |
|
可选:pip install "openmedia-mcp[whisper]" 通过 faster-whisper 启用本地语音转文本(audio_transcribe)。
安装与运行
# From a local checkout
uv run --project /path/to/openmedia-mcp openmedia-mcp
# Or install as a tool
uv tool install git+https://github.com/Builderstar/openmedia-mcp.git
openmedia-mcp --tools pdf,imageopencode
{
"mcp": {
"openmedia": {
"type": "local",
"command": ["uv", "run", "--project", "/home/you/projects/openmedia-mcp", "openmedia-mcp"]
}
}
}Claude Desktop / 通用 MCP 配置
{
"mcpServers": {
"openmedia": {
"command": "uv",
"args": ["run", "--project", "/home/you/projects/openmedia-mcp", "openmedia-mcp"]
}
}
}HTTP 传输方式
openmedia-mcp --transport streamable-http --host 127.0.0.1 --port 8756工具集
只用 --tools image,pdf,video,audio 挂载指定 harness 所需的工具集(默认:全部)。media_probe 始终可用。
image
工具 | 用途 |
| 查看图像(自动缩小); |
| 格式、尺寸、EXIF 摘要——不消耗模型视觉上下文 |
| Tesseract 文本提取 |
| 裁剪 / 缩放 / 旋转 / 翻转 / 灰度化 / 格式转换 |
| 两幅图像并排,组合到同一张合成图 |
工具 | 用途 |
| 元数据信息 + 检测是否存在文字层 |
| 文字层提取(页码范围、布局模式) |
| 将页面渲染为图像供模型查看(扫描件、图形、版面) |
| 针对扫描版 PDF 的 Tesseract OCR 识别 |
| 导出内嵌图形 / 图片到磁盘 |
video
工具 | 用途 |
| 文件用 ffprobe 考量;URL 使用 t-dlp 的元数据(不做下载) |
| 看懂视频:统一抽样或精确时间戳 |
| 视频字幕:URL 通过 yt-dlp 拉取,文件读取内置字幕轨道 |
| yt-dlp 下载,附带分辨率控制 |
| 截取片段(流拷贝或重新编码) |
| 导出音轨为 mp4/m4a/wmv/wav/opus 常见格式 |
audio
工具 | 用途 |
| 解码器、时长和标签 |
| 格式 / 比特率 / 采样率 / 单声道转换 |
| 无损切割片段 |
| 将波形显示为一张图像 |
| 本地 Whisper 语音转文本(可选 |
配置(环境)
变量 | 默认值 | 含义 |
|
| URL / 视频下载缓存 |
|
| 默认输出位置 |
|
| 默认文本输出最大字符数 |
|
| 返回图像默认最长边长 |
|
| 默认 JPEG 图像质量 |
|
| URL 直接下载字节上限 |
安全与隐私说明
本服务以启动这些进程的用户权限运行。其工具可以读取本地媒体、查询 URL、运行媒体处理二进制,并向调用方指定的路径写入文件。工具返回值可能包含绝对路径媒体元数据。请只连接可信的 MCP 客户端。
HTTP 传输层并不提供任何身份验证。默认绑定到回环地址,除非已另有专门的认证代理与网络安全策略,否则请勿将它暴露到另一台主机或不可信网络。URL 抓取可能触达本机可见的网络,包括私有网内服务。
可选的 Whisper 工具会在初次使用时下载并缓存 mm 的 base` 版将 faster-whisper 模型。如需离线运行,请提前准备好载入模型缓存。
开发
uv sync # install deps
uv run python tests/smoke_test.py [sample-video.mp4] # exercises every tool冒烟测试会自己生成测试用图像和 PDF;传入任意本地视频文件即可额外覆盖 video/audio 这两个工具集。
许可证
MIT
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
- FlicenseNot gradedqualityBmaintenanceEnables AI agents to process files locally — OCR images, extract text from PDFs and DOCX, and describe images using local vision models, all without sending data to external services.
- AlicenseAqualityDmaintenanceEnables AI agents to analyze images, extract text, compare images, and analyze video through any OpenAI-compatible vision model.455019MIT
- AlicenseNot gradedqualityAmaintenanceEnables agents to analyze long videos by downloading them, extracting transcripts and storyboards, and zooming into specific moments with high-resolution frames and OCR.MIT
- AlicenseNot gradedqualityBmaintenanceEnables text-only coding models to read images, PDFs, presentations, spreadsheets, and other non-text files through a single analyze_media tool, combining local document extraction, OCR, and optional vision models with clear evidence labeling.1MIT
Related MCP Connectors
OCR, transcription, file extraction, and image generation for AI agents via MCP.
15 media & data tools for AI agents: search, transcribe, subtitles, voiceover, translate & more.
Transform video, audio and images, and generate media from prompts. FFmpeg, captions, models.
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/Builderstar/openmedia-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server