npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

multi-modal-mcp

v0.0.9

Published

multi-modal MCP server

Readme

multi-modal-mcp

基于智谱 AI 的多模态 MCP (Model Context Protocol) 服务器,提供文本生成、图片生成、视频生成和多模态理解等功能。

功能特性

  • 文本生成: 基于 GLM-4.7-Flash 模型,支持对话、写作、翻译、代码生成等多种文本生成任务
  • 多模态理解: 基于 GLM-4.6V-Flash 模型,支持图片、视频、文档等多种媒体类型的智能分析与理解
  • 图片生成: 基于 Cogview-3-Flash 模型,根据文本描述生成高质量图片
  • 视频生成: 基于 CogVideoX-Flash 模型,根据文本描述生成高质量视频,支持图生视频

技术栈

  • 语言: TypeScript (ESNext)
  • 运行时: Node.js (>=18.19.0)
  • 框架: mcp-framework (v0.2.2)
  • HTTP 客户端: Axios (v1.13.2)
  • 数据验证: Zod (v3.22.4)

安装

全局安装

npm install -g multi-modal-mcp

使用 npx 直接运行

npx multi-modal-mcp@latest

配置

在使用前,需要设置智谱 AI 的 API 密钥:

export KEY="your-api-key"

或在 MCP Inspector 中配置环境变量。

使用方法

标准输入输出 (stdio) 模式

适用于本地开发和 MCP 客户端集成。

npx multi-modal-mcp@latest

HTTP Stream 模式

适用于 Web 应用和远程访问,服务器将在 http://localhost:3000/mcp 上运行。

npx multi-modal-mcp@latest http

或使用环境变量:

TRANSPORT_TYPE=http npx multi-modal-mcp@latest

使用 MCP Inspector 调试

调试 stdio 模式:

npx @modelcontextprotocol/inspector npx multi-modal-mcp@latest

调试 HTTP 模式:

npx @modelcontextprotocol/inspector npx multi-modal-mcp@latest http

在 MCP 客户端中配置

stdio 模式配置

在 Claude Desktop 或其他 MCP 客户端的配置文件中添加:

{
  "mcpServers": {
    "multi-modal": {
      "command": "npx",
      "args": ["-y", "multi-modal-mcp@latest"],
      "env": {
        "KEY": "your-api-key"
      }
    }
  }
}

HTTP 模式配置

如果使用 HTTP 模式,客户端需要连接到 http://localhost:3000/mcp 端点。具体配置方式取决于客户端的实现。

工具列表

1. text_generation

基于 GLM-4.7-Flash 模型的文本生成工具,支持对话、写作、翻译、代码生成等多种文本生成任务。支持思考模式,可展示模型思考过程。通过温度参数控制生成文本的随机性和创造性。

参数:

  • messages (string, 必填): 消息文本
  • thinking (enum, 可选): 是否启用思考模式,可选值 enabled/disabled,默认 disabled
  • temperature (number, 可选): 温度参数,控制生成文本的随机性,范围 0-1,默认 1

2. multi_modal_understanding

基于 GLM-4.6V-Flash 模型的多模态理解工具,支持图片、视频、文档等多种媒体类型的智能分析与理解。可执行 OCR 文字识别、表格解析、内容分析、缺陷检测、图像转提示词、视频标签提取、关键帧提取、时间线生成、脚本生成、视频问答、文档问答、文档对比等多种任务。支持同时处理多种媒体类型。

参数:

  • media_content (array, 必填): 媒体内容列表,支持混合图片、视频、文档
    • type (enum): 媒体类型,可选值 image_url/video_url/file_url
    • url (string): 媒体资源的 URL 地址
  • question (string, 必填): 用自然语言描述您的需求
  • thinking (enum, 可选): 是否启用思考模式,可选值 enabled/disabled,默认 disabled
  • temperature (number, 可选): 温度参数,控制生成文本的随机性,范围 0-1,默认 1

3. image_generation

基于 Cogview-3-Flash 模型的图片生成工具,根据文本描述生成高质量图片。支持多种尺寸选择,包括横屏、竖屏和方形等多种比例。可选择是否添加水印。适用于插画、设计素材、场景生成等多种应用场景。

参数:

  • prompt (string, 必填): 图片的文本描述
  • size (string, 可选): 图片尺寸,推荐 1024x1024(默认)、768x1344864x11521344x7681152x8641440x720720x1440。自定义尺寸需满足 512px-2048px 之间,被 16 整除,最大像素数不超过 2^21px
  • watermark_enabled (boolean, 可选): 是否添加水印,默认 false

4. video_generation

基于 CogVideoX-Flash 模型的视频生成工具,根据文本描述生成高质量视频。支持多种分辨率选择,包括 720p、1080p、2K、4K 等多种规格。支持质量优先和速度优先两种输出模式。可选择是否生成 AI 音效和添加水印。支持基于基础图像生成视频。采用异步处理机制,自动轮询任务状态直至完成。

参数:

  • prompt (string, 必填): 视频的文本描述,最大输入长度为 512 个字符
  • quality (enum, 可选): 输出模式,可选值 quality/speed,默认 speed
  • withAudio (boolean, 可选): 是否生成 AI 音效,默认 false
  • watermarkEnabled (boolean, 可选): 是否添加水印,默认 false
  • imageUrl (string, 可选): 用于内容生成的基础图像,支持 URL 或 Base64 编码图像
  • size (enum, 可选): 视频分辨率,可选值 720x480/1024x1024/1280x960/960x1280/1920x1080/1080x1920/2048x1080/3840x2160,默认 1024x1024
  • fps (enum, 可选): 视频帧率,可选值 30/60,默认 30

开发

克隆项目

git clone https://gitee.com/juzijuzijuzi/multi-modal-mcp.git
cd multi-modal-mcp

安装依赖

npm install

构建项目

npm run build

监听模式编译

npm run watch

启动服务器

npm start

调试模式

npm run debug

API 密钥获取

  1. 访问 智谱 AI 开放平台
  2. 注册并登录账号
  3. 在控制台创建 API 密钥

许可证

MIT License

作者

橘子

相关链接