这是一个用于 Ideogram AI API 的模型上下文协议(MCP)服务器实现。该服务器提供了使用 Ideogram 强大的 AI 模型生成、编辑和描述图像的工具。
git clone https://github.com/flowluap/ideogram-mcp-server.git
cd ideogram-mcp-server
npm install
npm run build
要在 Cursor 中使用此 MCP,请在 Cursor 设置中添加以下配置(设置 > AI > 模型上下文协议):
{
"mcps": {
"ideogram-mcp": {
"command": "node",
"args": ["PATH_TO_YOUR_DIST/index.js"],
"env": {
"IDEOGRAM_API_KEY": "your-api-key-here"
}
}
}
}
替换:
PATH_TO_YOUR_DIST/index.js 为你的构建好的 index.js 文件的绝对路径your-api-key-here 为你实际的 Ideogram API 密钥示例(已删除敏感信息):
{
"mcps": {
"ideogram-mcp": {
"command": "node",
"args": ["/path/to/ideogram-mcp-server/dist/index.js"],
"env": {
"IDEOGRAM_API_KEY": "xxxxx-REDACTED-xxxxx"
}
}
}
}
generate
prompt: 字符串(必需)aspect_ratio: 字符串(可选) - 其中之一:ASPECT_1_1, ASPECT_16_9, ASPECT_9_16, ASPECT_4_3, ASPECT_3_4model: 字符串(可选) - 其中之一:V_1, V_2, V_2_TURBOmagic_prompt_option: 字符串(可选) - 其中之一:AUTO, ON, OFFnum_images: 数字(可选) - 在 1 到 8 之间seed: 数字(可选) - 在 0 到 2147483647 之间edit
image_file: 字符串(必需) - Base64 或文件路径mask: 字符串(必需) - Base64 或文件路径prompt: 字符串(必需)model: 字符串(必需) - 其中之一:V_2, V_2_TURBOdescribe
image_file: 字符串(必需) - Base64 或文件路径download_images
urls: 字符串数组(必需) - 图像 URL 数组output_dir: 字符串(必需) - 输出目录路径generate_image
description: 字符串# 构建项目
npm run build
# 开发模式运行
npm run dev
# 运行测试
npm test
# 运行代码检查器
npm run lint
该项目采用 MIT 许可证 - 详情见 LICENSE 文件。