{"repo":"fengin/image-gen-server","free":true,"listed":false,"github":"https://github.com/fengin/image-gen-server","clone":"git clone https://github.com/fengin/image-gen-server.git","description":"一个能与Cursor集成的图片生成mcp server工具，实现调用即梦逆向接口","language":"Python","stars":229,"topics":[],"license":"MIT","category":"mcp-servers","readme_excerpt":"Image-Gen-Server 基于即梦AI的图像生成服务，专门设计用于与Cursor IDE集成。它接收来自Cursor的文本描述，生成相应的图像，并提供图片下载和保存功能。 此插件的开发过程可以看我的网站：开发一个MCP Server与Cursor集成，给Cursor插上翅膀！ 更多AI知识，见AI全书(https://aibook.ren) 特性 - 与Cursor IDE完美集成 - 支持文本到图像的生成 - 自动保存生成的图像 - 支持自定义保存路径 - 一次生成四张图，供更多选择 安装 Installing via Smithery To install Image-Gen-Server for Claude Desktop automatically via Smithery: 1. 环境准备，MCP比较新的东西，依赖环境版本都比较新 - python 3.10+ - 安装npm - 安装nodejs（实测v15 v16都不行，开发环境验证v20可以，其他未验证） - 安装 pip install uv - 如果要调试，还需要安装这个：npm install -g @modelcontextprotocol/inspector@0.4.0 2. 克隆项目 3. 安装依赖 4. 设置即梦Token和图片默认保存地址 修改server.py文件里面这两个配置 Cursor集成 1. 打开Cursor设置 - 点击左下角的设置图标 - 选择 Features MCP Servers - 点击 \"Add new MCP server\" 2. 填写服务器配置 - Name: image-gen-server （或其他你喜欢的名称） - Type: command - Command: 注意：将路径替换为你的实际项目路径 - Windows示例: uv run --with fastmcp fastmcp run D:/code/image-gen-service/server.py - macOS/Linux示例: uv run --with fastmcp fastmcp run /Users/username/code/image-gen-server/server.py windows路径问题比较多，D:/code/image-gen-server/server.py 各种斜杠都试下 填写完后，会弹出一个黑窗口，然后你就可以叫Cursor给你生成需要的图片了，目前黑窗口会一直运行，目前还没办法解决弹出这个的问题 使用方法 在Cursor中，你要让cursor生成图片，在agent模式下，你提示它了解下图片工具使用方法，然后直接提你要生成的图片要求，保存位置就行了 获取即梦Token 1. 访问 即梦 2. 登录账号 3. 按F12打开开发者工具 4. 在Application Cookies中找到 sessionid 5. 将找到的sessionid设置到server.py的JIMENG API TOKEN中 工具函数说明 generate image 技术实现 1. server.py采用了fastmcp实现了mcp sever的能力，提供给cursor/claude使用 2.sever.py调用了proxy.jimeng模块逆向与即梦AI进行交互。 proxy.jimeng逆向模块也可以单独install使用，主要提供了以下主要功能： - 图像生成（generate images） - 同步对话补全（create completi","default_branch":null,"files":null,"tree":[],"storefront":"/r/fengin","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/fengin/image-gen-server/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}