MCP Image SeedEdit Server
一个基于火山引擎视觉能力的MCP服务器,提供图像指令编辑和人物写真生成功能。
功能特性
🎨 图像指令编辑 (SeedEdit 3.0)
- 智能编辑:通过自然语言描述直接修改图像内容
- 多样化操作:支持添加/删除物体、修改风格、颜色调整等
- 高质量输出:基于火山引擎先进的图像生成技术
- 批量处理:支持同时处理多张图像
📸 人物写真生成
- 人脸保持:基于单人真人照片,保持面部特征高度相似
- 风格多样:支持古风、欧美、日系、商务等多种写真风格
- 参数可控:支持高清处理、美颜效果、匀肤等参数调节
- 场景丰富:适用于社交、营销、娱乐等多种场景
安装
pip install mcp-image-seededit
快速开始
1. 获取API密钥
前往火山引擎控制台获取您的API密钥:
VOLC_ACCESS_KEY:访问密钥VOLC_SECRET_KEY:秘密密钥
2. 配置MCP服务器
在您的MCP配置文件中添加:
{
"mcpServers": {
"mcp-image-seededit": {
"command": "python",
"args": ["-m", "mcp_image_seededit"],
"env": {
"VOLC_ACCESS_KEY": "your_volc_access_key_here",
"VOLC_SECRET_KEY": "your_volc_secret_key_here"
}
}
}
}
3. 使用工具
图像编辑示例
{
"tool": "image_edit",
"arguments": {
"image_urls": ["https://example.com/image.jpg"],
"prompt": "添加一只可爱的小猫",
"scale": 0.7
}
}
人物写真示例
{
"tool": "portrait_generation",
"arguments": {
"image_urls": ["https://example.com/portrait.jpg"],
"prompt": "古风写真,汉服,梅花背景",
"width": 1024,
"height": 1024
}
}
工具详解
image_edit
图像指令编辑工具,支持通过文本描述修改图像内容。
参数:
image_urls(list[str]):图像URL列表,支持本地路径或网络URLprompt(str):编辑指令,建议长度 ≤ 120字符seed(int):随机种子,默认-1(随机)scale(float):文本描述影响程度,范围[0, 1],默认0.5
编辑指令示例:
- 添加物体:
"添加一道彩虹" - 删除物体:
"删除背景中的建筑物" - 修改风格:
"改成油画风格" - 颜色调整:
"把衣服改成红色" - 背景替换:
"背景换成海滩"
portrait_generation
人物写真生成工具,基于真人照片生成多样化写真。
参数:
image_urls(list[str]):单人真人图片URL列表prompt(str):写真风格描述width/height(int):生成图像尺寸,范围[512, 2048]gpen(float):高清处理效果,范围[0, 1],默认0.4skin(float):美颜效果,范围[0, 1],默认0.3skin_unifi(float):匀肤效果,范围[0, 1],默认0.0gen_mode(str):生成模式,可选 "auto"、"creative"、"reference"、"reference_char"seed(int):随机种子
风格示例:
- 古风写真:
"古典中国风,汉服,竹林背景" - 商务形象:
"专业商务照,西装,办公室背景" - 时尚大片:
"时尚杂志风格,都市背景"
本地路径支持
服务器支持本地图片路径,会自动上传到临时服务器:
{
"image_urls": ["/path/to/local/image.jpg"]
}
支持格式:PNG, JPG, JPEG, WEBP, GIF, BMP, TIFF
开发
从源码安装
git clone https://github.com/yourusername/mcp-image-seededit
cd mcp-image-seededit
pip install -e ".[dev]"
运行测试
pytest
代码格式化
black src/
isort src/
许可证
MIT License - 详见 LICENSE 文件
贡献
欢迎提交Issue和Pull Request!
更新日志
v0.3.0
- 添加本地路径支持和自动上传功能
- 优化错误处理和日志输出
- 修复SOCKS代理兼容性问题
- 完善文档和使用示例
v0.2.0
- 添加人物写真生成功能
- 改进图像处理流程
- 增强参数验证
v0.1.0
- 初始版本
- 基础图像编辑功能
Metadata
Release files for mcp-image-seededit 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| mcp_image_seededit-0.5.0.tar.gz | 10.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mcp_image_seededit-0.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.6 kB
Release files / mcp_image_seededit-0.5.0.tar.gz
| Download URL | mcp_image_seededit-0.5.0.tar.gz |
|---|---|
| Size | 10.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
32744499297b7a543e960fece995d2bd1b24ef300efe4371764e7dc0b35ab7bc
|
|
BLAKE2b-256 checksum How to use checksums |
6793014ea3b76c2db98c90c36f85a227319d4341f68e67f9c7bbc7c35bb13263
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.13
|
Release files / mcp_image_seededit-0.5.0-py3-none-any.whl
| Download URL | mcp_image_seededit-0.5.0-py3-none-any.whl |
|---|---|
| Size | 11.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1aa0c22c373b2403aab6533f6d1d94d7d1cf904ba422a9b7977ec393c36dede6
|
|
BLAKE2b-256 checksum How to use checksums |
f9a65c6358cfca8ff71ae859bc66213aec50c89987f411080a8ac25f5e1570d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.13
|
Security for mcp-image-seededit 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.