m

mcp-4o图像生成器

@Antipas/4oimage-mcp
0 Stars 33 次浏览 Antipas 更新于 2026-08-23

识别到的语言类型为:英语 翻译结果:mcp-4o-图像生成器

MCP 服务配置

复制以下 JSON 到 OPClaw 或其他 MCP 客户端的配置文件中即可使用

{
  "mcpServers": {
    "4o-image": {
      "args": [
        "-y",
        "4oimage-mcp"
      ],
      "command": "npx",
      "env": {
        "API_KEY": "YOUR_API_KEY_HERE"
      }
    }
  }
}

该服务需要配置环境变量:API_KEY

可用工具 (1 个)

该服务在 MCP 协议中暴露的工具,AI 可按需调用

generateImage 2 个参数 需填 1 项

Generate images using the 4o-image API and automatically open the results in your browser. This tool generates images based on your prompt and automatically opens them in your default browser, while also returning a clickable link. The tool supports two modes: 1. Text-to-image - Create new images using just a text prompt 2. Image editing - Provide a base image and prompt for editing or style transfer The response will include a direct link to the generated image and detailed information. Visit our website: https://4o-image.app/

必填参数:prompt

服务介绍

4o-image MCP Server

一个与4o-image API集成的MCP服务器实现,通过标准化协议使LLMs和其他AI系统能够生成和编辑图像。使用简单的文本提示创建高质量的艺术作品、3D角色和自定义图像。

npm version
Node.js Version

功能

  • 文本到图像生成:根据文本描述使用AI创建图像
  • 图像编辑:利用文本提示转换现有图像
  • 实时进度更新:获取生成状态的反馈
  • 浏览器集成:自动在默认浏览器中打开生成的图像

工具

  • generateImage
    • 基于文本提示生成图像,可选图像编辑
    • 输入:
      • prompt (字符串, 必填):所需图像的文字描述
      • imageBase64 (字符串, 可选):用于编辑或风格迁移的基础64编码图像

配置

获取API密钥

  1. 4o-image.app 注册账号
  2. 从用户仪表板获取您的API密钥
  3. 运行服务器时将API密钥设置为环境变量

与Claude桌面版一起使用

将以下内容添加到您的claude_desktop_config.json文件中:

{
  "mcpServers": {
    "4o-image": {
      "command": "npx",
      "args": [
        "-y",
        "4oimage-mcp"
      ],
      "env": {
        "API_KEY": "YOUR_API_KEY_HERE"
      }
    }
  }
}

使用示例

这里是一个使用此MCP服务器与Claude的例子:

Generate an image of a dog running on the beach at sunset

Claude将使用MCP服务器生成图像,并自动在您的默认浏览器中打开。您还将获得Claude回复中的直接链接到该图像。

对于图像编辑,您可以包含一张基础图像并指示Claude对其进行修改:

Edit this image to make the sky more dramatic with storm clouds

许可证

此MCP服务器根据MIT许可证发布。您可以在遵守MIT许可证条款和条件的前提下自由使用、修改和分发软件。