Token导航 LogoToken导航

MCP Server · 设计创作

MCP Image Server (Ricardopera)

A TypeScript-based MCP server for generating custom images and icons using AI (GPT Image 1). It supports output formats including .png, .svg, .ico, and others. Designed for seamless integration with Vibe Coding, enabling on-demand visual asset creation for your projects.

stdio官方级别未说明来源级核验工具 0@ricardopera/mcp-image-server@latest
图像生成多格式支持JavaScript图像处理

快速开始

作者 / 组织
Ricardo Pereira
提供方
Ricardo Pereira
运行时
Node.js

工具数量

0

来源目录标注

资源数量

0

来源目录标注

提示词数量

0

来源目录标注

GitHub Star

4

仓库热度

收录来源

2 个

MCP.so

选型结论

MCP Image Server (Ricardopera) 属于设计创作类 MCP Server,公开资料标注 0 个工具,通过stdio 本地进程接入,客户端适配情况以官方文档为准,有可以直接复制的安装命令;接入前要先准备 API Key。

分类

设计创作

传输方式

stdio

认证方式

无需认证(安装命令里要填 API Key)

部署方式

公开资料未说明

安装与配置

安装命令

OPENAI_API_KEY={OPENAI_API_KEY} npx -y @ricardopera/mcp-image-server@latest {"OPENAI_API_KEY":"YOUR_OPENAI_API_KEY_HERE"}

公开命令不是通用的启动方式,拼不出可靠配置示例;请在客户端 MCP 配置里按官方文档填写 command 和 args。

上手步骤

  1. 1

    准备运行环境

    stdio 服务在本地起进程,需要先装好 Node.js,再按安装命令拉取依赖。

  2. 2

    安装服务

    复制下面的安装命令执行;命令里带占位符的位置换成自己的密钥或路径。

  3. 3

    写入客户端配置

    在客户端的 MCP 配置里填启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4

    验证是否可用

    连接成功后客户端会列出 0 个工具,随便调一个只读工具确认能返回结果。

接入前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

详细介绍

MCP映像服务器

基于TypeScript的MCP服务器,用于使用AI生成自定义图像和图标(GPT图像1)。它支持.png、.svg、.ico等输出格式。专为与Vibe Coding无缝集成而设计,可为您的项目按需创建视觉资产。跨平台,可通过以下方式执行 npx.

特性

  • 通过GPT映像1(OpenAI)生成自定义映像
  • 在中交付文件 .png, .svg (嵌入base64图像),以及 .ico (实际转换)
  • 可配置的图像尺寸:1024×1024(方形)、1536×1024(横向)或1024×1536(纵向)
  • 背景控制:“透明”或“不透明”
  • 质量设置为“低”,适度设置为“低等”,以实现快速生成
  • MCP工具记录了使用示例,可通过资源访问
  • 用于查询支持格式的资源
  • 已准备好与MCP客户端、代理和Vibe编码流集成
  • 跨平台(Windows/Linux/Mac),可通过运行 npx

项目结构

  • src/index.ts:MCP服务器、工具和资源的主要实现
  • package.json:项目配置、依赖关系和跨平台脚本
  • README.md:本文件
  • test-mcp-client.js:MCP客户端集成测试脚本
  • tsconfig.json:TypeScript配置
  • sample_config.json:MCP客户端配置示例

如何配置MCP客户端以使用此服务器

将以下配置添加到MCP服务器文件中(示例 sample_config.json):

{
    "servers": {
        "mcp-image-server": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@ricardopera/mcp-image-server@latest"
            ],
            "env": {
                "OPENAI_API_KEY": "YOUR_OPENAI_API_KEY_HERE"
            }
        }
    }
}

这允许您直接通过npx运行映像服务器,而无需事先安装,并为OpenAI身份验证设置所需的环境变量。

如何在本地运行

  1. 安装依赖项:
   npm install
  1. 构建项目:
   npm run build
  1. 设置 OPENAI_API_KEY 带有OpenAI密钥的环境变量:

- 在Windows(PowerShell)上:

     $env:OPENAI_API_KEY="your-key-here"

- 在Linux/Mac上:

     export OPENAI_API_KEY="your-key-here"
  1. 通过npx运行:
   npx mcp-image-server

如何提交给MCP.so

  1. 确保项目已构建、测试和记录
  2. 请按照以下提交说明进行操作: https://mcp.so/

进度和文件

  • \[x\] 初始项目结构
  • \[x\] MCP服务器实现
  • \[x\] 真正的GPT映像1集成
  • \[x\] 文件转换和交付 .png, .svg, .ico 格式
  • \[x\] 记录并注释MCP工具
  • \[x\] 使用示例资源(resource://tool-examples)
  • \[x\] 支持的格式资源(formats://supported)
  • \[x\] 与MCP客户端的集成测试
  • \[\]自动化测试和边缘案例验证
  • \[\]最终详细文档(示例、故障排除)

______________________________________________________________________

视觉示例

以下是MCP Image Server工具生成的图像的真实示例。所有图像都自动保存在 examples/ 文件夹使用 fileName 和 directory 工具的参数。

示例1:极简主义火箭图标(PNG)

使用提示:

{
  "prompt": "minimalist rocket icon transparent background",
  "format": "png",
  "size": "1024x1024",
  "background": "transparent",
  "fileName": "rocket-icon",
  "directory": "examples"
}

结果:

______________________________________________________________________

示例2:带字母A的蓝色圆形徽标(SVG)

使用提示:

{
  "prompt": "blue circular logo with letter A",
  "format": "svg",
  "size": "1536x1024",
  "background": "transparent",
  "fileName": "blue-logo-letter-a",
  "directory": "examples"
}

结果:

______________________________________________________________________

示例3:金星图标(ICO)

使用提示:

{
  "prompt": "golden star icon",
  "format": "ico",
  "size": "1024x1024",
  "background": "opaque",
  "fileName": "golden-star",
  "directory": "examples"
}

结果:

______________________________________________________________________

示例4:黄色星形图标(ICO)

使用提示:

{
  "prompt": "yellow star favicon transparent background",
  "size": "1024x1024",
  "background": "transparent",
  "fileName": "yellow-star-favicon",
  "directory": "examples"
}

结果:

______________________________________________________________________

示例5:红心图标(SVG)

使用提示:

{
  "prompt": "red heart icon",
  "size": "1024x1536",
  "background": "opaque",
  "fileName": "red-heart-icon",
  "directory": "examples"
}

结果:

______________________________________________________________________

这些示例展示了服务器以不同格式和目录生成和保存自定义图像的灵活性,从而促进了与web项目、应用程序和各种系统的集成。

可用工具

generate-image

使用AI生成自定义映像(GPT映像1),并以请求的格式交付。

参数:

  • prompt (string):所需图像的文本描述
  • format (“png”|“svg”|“ico”):输出格式(默认:“png”)
  • size (“1024x1024”|“1536x1024”|“1024x1536”):图像大小(默认值:“1024x1024”)
  • background (“透明”|“不透明”):背景类型(默认值:“透明”)

例子:

{
  "prompt": "minimalist rocket icon transparent background",
  "format": "png",
  "size": "1024x1024",
  "background": "transparent"
}
{
  "prompt": "blue circular logo with letter A",
  "format": "svg",
  "size": "1536x1024",
  "background": "transparent"
}
{
  "prompt": "golden star icon",
  "format": "ico",
  "size": "1024x1024",
  "background": "opaque"
}

generate-favicon

从文本提示生成自定义favicon.ico。

参数:

  • prompt (string):favicon的文本描述
  • size (“1024x1024”|“1536x1024”|“1024x1536”):图像大小(默认值:“1024x1024”)
  • background (“透明”|“不透明”):背景类型(默认值:“透明”)

例子:

{
  "prompt": "yellow star favicon transparent background",
  "size": "1024x1024",
  "background": "transparent"
}

generate-svg (暂时不可用)

⚠️ 由于处理 SVG 内容为文本的技术问题,SVG 生成工具已暂时禁用。该功能将在未来版本中重新启用,以确保 SVG 仅被视为图像文件。

同时,使用PNG或ICO格式生成图像。

资源

  • resource://tool-examples:JSON中工具的使用示例
  • formats://supported:支持的格式列表(\[“png”、“svg”、“ico”\])

环境变量

  • OPENAI_API_KEY:OpenAI API密钥(图像生成所需)

故障排除

  • 错误OPENAI_API_KEY未定义或无效:在运行之前正确设置环境变量。
  • 生成GPT映像1映像时出错:检查您的密钥、连接和OpenAI限制。
  • Windows上的权限问题:该项目是跨平台的,但如果出现权限错误,请以管理员身份运行终端。

______________________________________________________________________

为MCP代理开发了以下最佳实践,准备在MCP.so上集成和发布。

______________________________________________________________________

高级图像生成示例

以下是其他示例,展示了此项目中工具的灵活性和强大功能。所有图像均已生成并自动保存在 examples/ 文件夹。

示例6:友好的机器人头像(PNG)

使用提示:

{
  "prompt": "friendly robot avatar, white background, cartoon style, soft colors",
  "format": "png",
  "size": "1024x1024",
  "background": "opaque",
  "fileName": "friendly-robot-avatar",
  "directory": "examples"
}

结果:

______________________________________________________________________

示例7:带山脉的未来景观(巴布亚新几内亚)

使用提示:

{
  "prompt": "futuristic landscape with mountains and starry sky, digital art, transparent background",
  "format": "png",
  "size": "1536x1024",
  "background": "transparent",
  "fileName": "futuristic-landscape",
  "directory": "examples"
}

结果:

______________________________________________________________________

这些高级示例展示了如何使用MCP Image Server生成从极简主义图标到复杂插图的所有内容,以便在web、移动或桌面应用程序中使用。

工具文档

生成图像

使用AI生成自定义映像(GPT映像1),并以请求的格式保存。

所需参数:

  • prompt (string):所需图像的文本描述
  • format (“png”|“svg”|“ico”):输出格式(默认:“png”)
  • size (“1024x1024”|“1536x1024”|“1024x1536”):图像大小(默认值:“1024x1024”)
  • background (“透明”|“不透明”):背景类型(默认值:“透明”)
  • fileName (string):要保存的文件的名称(不带扩展名)
  • directory (string):保存文件的目录的完整路径(必须根据操作系统格式化,例如。, C:\Users\user\project\folder 在Windows或 /home/user/project/folder 在Linux/Mac上)
重要提示: 始终在中提供完整路径 directory 参数,以确保文件正确保存。路径必须采用服务器运行的操作系统的格式。

使用示例(Windows):

{
  "prompt": "minimalist rocket icon transparent background",
  "format": "png",
  "size": "1024x1024",
  "background": "transparent",
  "fileName": "rocket-icon",
  "directory": "c:\\Users\\ricar\\Desktop\\projetos\\mcp-image-server\\examples"
}

使用示例(Linux/Mac):

{
  "prompt": "minimalist rocket icon transparent background",
  "format": "png",
  "size": "1024x1024",
  "background": "transparent",
  "fileName": "rocket-icon",
  "directory": "/home/user/projects/mcp-image-server/examples"
}

生成favicon

从文本提示生成自定义favicon.ico。

所需参数:

  • prompt (string):favicon的文本描述
  • size (“1024x1024”|“1536x1024”|“1024x1536”):图像大小(默认值:“1024x1024”)
  • background (“透明”|“不透明”):背景类型(默认值:“透明”)
  • fileName (string):要保存的文件的名称(不带扩展名)
  • directory (string):保存文件的目录的完整路径(操作系统格式)

使用示例(Windows):

{
  "prompt": "yellow star favicon transparent background",
  "size": "1024x1024",
  "background": "transparent",
  "fileName": "yellow-star-favicon",
  "directory": "c:\\Users\\ricar\\Desktop\\projetos\\mcp-image-server\\examples"
}

生成svg

生成一个内嵌AI图像的SVG文件(base64)。

所需参数:

  • prompt (string):所需图像的文本描述
  • size (“1024x1024”|“1536x1024”|“1024x1536”):图像大小(默认值:“1024x1024”)
  • background (“透明”|“不透明”):背景类型(默认值:“透明”)
  • fileName (string):要保存的文件的名称(不带扩展名)
  • directory (string):保存文件的目录的完整路径(操作系统格式)

使用示例(Linux/Mac):

{
  "prompt": "red heart icon",
  "size": "1024x1536",
  "background": "opaque",
  "fileName": "red-heart-icon",
  "directory": "/home/user/projects/mcp-image-server/examples"
}
请参阅资源 resource://tool-examples 查看更实用的JSON示例。

______________________________________________________________________

如何实施和记录MCP工具

MCP(模型上下文协议)工具必须遵循国际定义和文档标准,允许模型和代理正确发现、理解和使用它们。请参阅下面的最佳实践和真实示例:

MCP工具定义结构

{
  name: string;          // Unique identifier of the tool
  description?: string;  // Human-readable description
  inputSchema: {         // JSON Schema of the tool parameters
    type: "object",
    properties: { ... }  // Specific tool parameters
  }
}
  • 名字:工具的唯一名称(例如“生成图像”)
  • 描述:明确描述该工具的功能
  • 输入方案:定义必需和可选参数、类型和描述

实例(TypeScript)

server.registerTool(
  "generate-image",
  {
    title: "Generate Image with GPT Image 1",
    description: "Generates a custom image using AI (GPT Image 1) and delivers it in the requested format (.png, .svg, .ico).",
    inputSchema: {
      prompt: z.string().describe("Textual prompt describing the desired image"),
      format: z.enum(["png", "svg", "ico"]).default("png").describe("Output format of the image"),
      size: z.enum(["1024x1024", "1536x1024", "1024x1536"]).default("1024x1024").describe("Image size"),
      background: z.enum(["transparent", "opaque"]).default("transparent").describe("Background type"),
      fileName: z.string().default("image").describe("Name of the file to be saved (without extension)"),
      directory: z.string().default("./output").describe("Directory where the file will be saved")
    },
    annotations: {
      usage: "Use this tool to generate custom images and icons for your project. The prompt should be detailed for better results. The format defines the extension of the generated file."
    }
  },
  async ({ prompt, format, size, background, fileName, directory }) => { /* ... */ }
);

工具文档的最佳实践

  • 始终包含清晰客观的描述
  • 记录所有inputSchema参数,包括类型和示例
  • 为每个工具提供JSON使用示例
  • 使用 annotations.usage 使用提示和上下文字段
  • 实施稳健的错误处理,返回友好的消息和 isError 必要时,现场

错误处理示例

try {
  // Tool operation
  const result = performOperation();
  return {
    content: [
      { type: "text", text: `Operation successful: ${result}` }
    ]
  };
} catch (error) {
  return {
    isError: true,
    content: [
      { type: "text", text: `Error: ${error.message}` }
    ]
  };
}

模型自动发现和使用

通过遵循此标准,任何MCP模型或代理都可以列出可用的工具,读取它们的模式和描述,并正确调用它们,包括自动参数验证。

请参阅 MCP官方文件 更多示例和细节。

______________________________________________________________________

工具与能力

工具数量

0

资源数量

0

提示词数量

0

能力标签

Image generationIcons GenerationpngicosvgAI图像生成JavaScript本地部署

数量来自来源目录的标注,具体工具清单以官方文档为准。

典型使用场景

出图与改图

按描述生成或修改图像,快速迭代风格。

读取设计稿

读取画布和图层信息,按规范生成页面。

素材整理

批量生成缩略图、统一命名和标签。

选择建议

值得选的地方

  • 只提供 0 个工具,职责集中,接入后不容易误操作。
  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 公开说明写得比较完整,接入前能看清能力边界。

先想清楚的地方

  • stdio 方式要求本地装好 Node.js,换机器要重新装一遍。
  • 需要自备API Key,没有凭据没法直接试。
  • 第三方目录整理,版本更新和行为细节以官方仓库为准。

更适合

  • 需要在设计创作场景里让模型直接调用外部能力的人。
  • 想先快速试一下、能接受在本地跑服务的人。

不太适合

  • 完全不想在本地装环境的人。
  • 暂时拿不到API Key的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

5 个同类
MCP Server工具数传输方式安装命令收录来源最后核验
MCP Image Server (Ricardopera)

MCP.so · 本页

0stdio有2 个2026-05-17
Blender MCP

MCP.so

17stdio有3 个2026-05-17
Figma Context MCP 3aaa8d28

MCP World

0未说明未标注2 个2026-05-17
Nova Canvas MCP Server

MCP World

2stdio有1 个2026-05-17
Cursor Talk To Figma MCP Da1c7911

MCP World

40未说明未标注1 个2026-05-17

按同分类和工具数量挑出最接近的几条,字段以各自详情页为准。

常见问题

5 条

MCP Image Server (Ricardopera) 怎么安装?

公开资料给出的安装命令是 OPENAI_API_KEY={OPENAI_API_KEY} npx -y @ricardopera/mcp-image-server@latest {"OPENAI_API_K…,运行环境为 Node.js。装完后按客户端要求写进 MCP 配置,重启客户端生效。

MCP Image Server (Ricardopera) 怎么在 Claude Desktop、Cursor 里配置?

它是stdio 本地进程,客户端配置里要写启动命令和参数,运行环境是 Node.js;保存后完全退出客户端再打开,配置才会生效。

MCP Image Server (Ricardopera) 收费吗?

本站只整理公开资料,不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

MCP Image Server (Ricardopera) 需要 API Key 吗?

安装命令里要填 API Key,说明还是要凭据才能连上;凭据只填在自己本地的配置里,不要写进公开仓库。

MCP Image Server (Ricardopera) 支持哪些客户端?

公开资料没有标注具体客户端;能配置本地 MCP 命令的客户端都能接,配置方式参照官方文档。

来源信息

继续浏览同类 MCP