Ideogram MCP 服务器基于 Model Context Protocol (MCP),借助 Ideogram API 实现图像生成功能,为用户提供便捷的图像创作体验。
请确保你的环境已经安装好 npm 和 git。
npm install
.env 文件,并添加你的 Ideogram API 密钥。IDEOGRAM_API_KEY=your_api_key_here
npm run build
npm link
npm install
创建 .env 文件并添加如下内容:
IDEOGRAM_API_KEY=your_api_key_here
npm run build
npm link
generate_image 是用于生成图像的工具,以下是其使用说明:
prompt:生成图像所使用的提示信息。aspect_ratio:图像的宽高比,可选值有 ASPECT_1_1、ASPECT_4_3、ASPECT_3_4、ASPECT_16_9、ASPECT_9_16。model:使用的模型,可选值有 V_1、V_1_TURBO、V_2、V_2_TURBO。magic_prompt_option:魔法提示设置,可选值有 AUTO、ON、OFF。style_type:生成风格。negative_prompt:要排除的内容描述。num_images:要生成的图像数量,范围为 1 - 8。const result = await use_mcp_tool({
server_name: "ideagram-mcp-server",
tool_name: "generate_image",
parameters: {
prompt: "a beautiful sunset over the mountains"
}
});
git clone https://github.com/sunwood-ai-labs/ideagram-mcp-server.git
cd ideagram-mcp-server
npm install
npm run dev
npm run build
npm test
git checkout -b feature/new-feature
git add .
git commit -m "添加新功能"
git push origin feature/new-feature