图像生成服务器

一个使用Ideogram API提供图像生成服务的Model Context Protocol (MCP)服务器,支持多种图像生成功能和快速集成。

  • by Sunwood-ai-labs
  • TypeScript
  • 本地部署
  • 5 星标
  • 更新于
在 GitHub 查看 Sunwood-ai-labs/ideagram-mcp-server

使用说明

🎨 Ideogram MCP Server

Ideogram APIを使って画像生成を提供するModel Context Protocol (MCP) サーバーだよ!
Ideogram 3.0対応で、Claude DesktopやMCPクライアントから爆速連携できるのが神✨


📦 项目简介

  • Ideogram API (v3.0) 打开MCP通过服务器使用TypeScript制工具
  • 图像生成、样式参照、魔术提示、纵横比、模型选择等多功能
  • Claude Desktop或其他MCP立即从客户端使用OK

⚡快速启动

Claude Desktop或其他MCP如果你想在客户端进行爆速合作
下列JSON将片段复制到配置文件OK!✨

{
  "mcpServers": {
    "ideogram": {
      "command": "npx",
      "args": [
        "@sunwood-ai-labs/ideagram-mcp-server"
      ],
      "env": {
        "IDEOGRAM_API_KEY": "your_api_key_here"
      }
    }
  }
}

🛠️ MCP工具规格

generate_image

参数列表(最新版)

|参数|类型|说明|必需/任意|备注| |--------------------|------------|--------------------------------------------------------------------------------------|-----------|---------------------------| | prompt | string | 图像生成提示(建议使用英语)|必需| | aspect_ratio | string | 长宽比(例如:“1x1”、“16x9”、“4x3”等) | resolution | string | 分辨率(参照官方文档,共69种)|任意| | seed | integer | 随机数种子(可重复性担保)|任意|0~2147483647| | magic_prompt | string | 魔术提示(“AUTO”|“ON”|“OFF”)|任意|默认“AUTO”| | rendering_speed | string | v3用渲染速度(“TURBO”|“DEFAULT”|“QUALITY”)|任意| | style_codes | string[] | 8字符样式代码数组 | style_type | string | 样式类型(“AUTO”|“GENERAL”|“REALISTIC”|“DESIGN”)|任意| | negative_prompt | string | 除外要素(英语推奨)|任意| | | num_images | number | 生成画像数(1~8) | 任意 | | | style_reference | object | 样式参照(Ideogram3.0新功能)|任意|下述详细内容| | └ urls | string[] | 参照画像URL配列(最大3つ) | 任意 | | | └ style_code | string | 样式代码|可选| | └ random_style | boolean | 使用随机样式|可选| | output_dir | string | 图像保存目录(默认值:“docs”)|任意| | base_filename | string | 保存文件名的基础(默认值:“ideogram-image”)ID授予 | blur_mask | boolean | 模糊图像边缘(以真为单位合并遮罩)false |

📝 使用例

const result = await use_mcp_tool({
  server_name: "ideagram-mcp-server",
  tool_name: "generate_image",
  arguments: {
    prompt: "A beautiful sunset over mountains",
    aspect_ratio: "16x9",
    rendering_speed: "QUALITY",
    num_images: 2,
    style_reference: {
      urls: [
        "https://example.com/ref1.jpg",
        "https://example.com/ref2.jpg"
      ],
      random_style: false
    },
    blur_mask: true
  }
});

🧑‍💻 开发构建测试

  • npm run build ... TypeScript构建
  • npm run watch …正在开发模式(自动构建)
  • npm run lint …代码链接
  • npm test …正在运行测试

🗂️ 目录配置

ideagram-mcp-server/
├── assets/
├── docs/
│   └── ideogram-image_2025-05-18T06-31-45-777Z.png
├── src/
│   ├── tools/
│   ├── types/
│   ├── utils/
│   ├── ideogram-client.ts
│   ├── index.ts
│   ├── server.ts
│   └── test.ts
├── .env.example
├── package.json
├── tsconfig.json
├── README.md
└── ...(省略)

📝 分发

  1. 分叉此存储库
  2. 创建新分支(git checkout -b feature/awesome)
  3. 变更提交(提交信息为日语+图画文字推荐!)
  4. 创建推拉

🚀 部署和发布

  • GitHub Actions自动npm发布
  • 版本更新-标记push自动部署
npm version patch|minor|major
git push --follow-tags

了解更多信息 docs/npm-deploy.md 查看项目中可用的所有族!


📄 许可证

麻省理工学院