跳过安装。2 分钟内即可运行。
在 cloud.anythingmcp.com 开始免费试用,一键添加 Stability AI,然后将你的 AI 客户端(Claude、ChatGPT、Copilot 或 Cursor)指向生成的 MCP 端点。无需 Docker,无需 git clone,无需任何工程经验。
摘要
用 Stability AI 创建和编辑图片:使用 Stable Image Ultra、Core 和 Stable Diffusion 3.5 生成图片,放大分辨率,移除或替换背景,擦除、局部重绘、向外扩展画面,按描述查找并替换对象,用草图、结构和风格参考引导生成,并用 Stable Audio 3 创作音乐。图片直接以图片形式返回;也可查询积分余额。按每次生成消耗积分计费。
试试这样问
Stability AI 的示例提示
点击任意提示即可复制,然后粘贴到 Claude、ChatGPT、Cursor、Gemini、Copilot 或 OpenClaw 中,在该连接器上运行。
Claude 是 AI,可能会出错。请核对回答。
💡 无需安装? 直接使用 cloud.anythingmcp.com。 登录、点击 Connectors → Stability AI、粘贴凭证、生成 MCP API key,即可完成。无 Docker、无
git clone、无本地服务器。
Stability AI + Microsoft Copilot
用 Stability AI 创建和编辑图片:使用 Stable Image Ultra、Core 和 Stable Diffusion 3.5 生成图片,放大分辨率,移除或替换背景,擦除、局部重绘、向外扩展画面,按描述查找并替换对象,用草图、结构和风格参考引导生成,并用 Stable Audio 3 创作音乐。图片直接以图片形式返回;也可查询积分余额。按每次生成消耗积分计费。
前提条件
完整的设置说明已内置在连接器中 (在 store 中选择连接器时可见)。所需环境变量:
STABILITY_API_KEY
步骤 1 — 获取凭证
设置大约需要 3 分钟。你需要一个有积分的 Stability AI 账号;新账号赠送 25 个免费积分。
- 在 https://platform.stability.ai 注册账号,如有需要在 Billing 中购买积分。
- 打开 API keys(https://platform.stability.ai/dashboard/api-keys),复制一个密钥(以
sk-开头),粘贴到STABILITY_API_KEY。它以Authorization: Bearer方式发送。 - 安装连接器并运行
stability_ai_get_balance:它会显示积分余额并确认密钥可用。密钥代表其用户的默认组织,积分从该组织扣除。
费用:1 积分 = 0.01 美元,生成失败不收费。所有生成、编辑、放大和音频工具都会消耗积分:
- 文生图:
stability_ai_generate_image_core3,stability_ai_generate_image_ultra8,stability_ai_generate_image_sd3为 6.5(sd3.5-large)、4(sd3.5-large-turbo,此处默认)、3.5(sd3.5-medium)或 2.5(sd3.5-flash)。 - 放大:
stability_ai_upscale_fast2,stability_ai_upscale_conservative40,stability_ai_upscale_creative60。 - 编辑:
stability_ai_erase、stability_ai_inpaint、stability_ai_search_and_replace、stability_ai_search_and_recolor和stability_ai_remove_background各 5,stability_ai_outpaint4,stability_ai_replace_background_and_relight8。 - 以图片引导:
stability_ai_control_sketch、stability_ai_control_structure和stability_ai_control_style各 5,stability_ai_control_style_transfer8。 - 音频:
stability_ai_generate_audio8。
免费:stability_ai_get_balance、stability_ai_get_account、stability_ai_list_engines、stability_ai_get_result 和 stability_ai_get_audio_result。每次付费调用前,AI 都会告诉你费用并等你同意;拿不准时会先查余额。
可以创建和编辑的内容:
- 文生图:Core 速度快,是最便宜的默认选择;Ultra 质量最好、照片级真实(约 100 万像素),也可以通过
strength从一张图片开始;Stable Diffusion 3.5 提供 Large、Large Turbo、Medium 和 Flash,也支持通过mode、image_url和strength进行图生图。宽高比从 21:9 到 9:21。 - 更高分辨率:快速放大将图片放大 4 倍且不重新诠释画面;保守放大到约 400 万像素并忠于原图;创意放大最高到 4K,并按提示词补充细节。
- 编辑:移除背景(透明 PNG 或 WebP),用遮罩擦除物体或瑕疵,重绘遮罩区域(inpaint),向任意方向扩展画布(outpaint),用文字找到对象并在无遮罩的情况下替换或重新上色,以及把主体放到新背景上并匹配光照。
- 引导生成:把草图变成完整图片,保留输入图片的结构,复制参考图的风格,或把一张图片的风格迁移到另一张上。
- 用 Stable Audio 3 生成音乐和音效,时长 1 到 380 秒,格式为 MP3 或 WAV。
- 账号:积分余额、用户及其所属组织,以及旧版 v1 引擎(SDXL 及更早;当前的服务不在其中列出)。
输入图片:所有 *_url 参数都是指向不超过 10 MB 的 JPEG、PNG 或 WebP 文件的公开 https 链接。AnythingMCP 会下载并以文件形式上传到 Stability AI,所以只粘贴在聊天里的图片需要先放到网上。遮罩中白色表示要修改的区域;没有遮罩时使用图片的透明区域。
异步任务:stability_ai_upscale_creative、stability_ai_replace_background_and_relight 和 stability_ai_generate_audio 会立即返回一个 64 个字符的 id。AI 约 10 秒后用它调用 stability_ai_get_result(图片)或 stability_ai_get_audio_result(音频),status 为 in-progress 时会再次调用。结果保留 24 小时,且只能用同一个密钥获取。
数据格式:完成的图片作为可直接查看的图片附在工具结果中,音频作为文件附上。图片工具还会返回 finish_reason 和 seed;用相同的 seed 和相同的提示词可以重现图片。图片默认是 JPEG,以保持体积小;需要透明背景时请指定 png 或 webp。提示词用英文效果最好,描述主体、场景、风格、颜色和光照;要避免的内容写进 negative_prompt,style_preset(photographic、cinematic、anime、digital-art、3d-model 等)可调整整体风格。
翻页:没有需要翻页的内容。每次调用返回一张图片、一个音频任务或一条账号信息。
安装时关闭的工具:没有。所有工具都已启用;付费工具由费用确认来把关。
限制:每 10 秒最多 150 次请求;超过后请求会被封锁 60 秒。提示词最长 10,000 个字符。
常见错误:400 会在 errors 中列出错误的参数。401 表示密钥无效。402 表示积分不足。403 表示提示词或图片被内容审核标记。413 表示上传文件过大。422 表示输入无法处理,例如图片尺寸超出范围或语言不受支持。429 表示触发频率限制。finish_reason 为 CONTENT_FILTERED 表示输出违反内容政策并已被模糊处理:请改写提示词。每个错误都带有一个 id,可提供给 Stability 支持团队。
该连接器不生成 3D 模型(Stable Fast 3D、SPAR3D),不做音频到音频转换或音频局部重绘,也不使用 Stable Audio 2 端点或旧版 v1 SDXL 生成。
步骤 2 — 安装 adapter
curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d
步骤 3 — 在 Microsoft Copilot 中添加连接器
你的服务器 URL: 在 AnythingMCP 中打开 MCP Servers → 此连接器所在的服务器,复制它的 URL(
https://cloud.anythingmcp.com/mcp/…)。本指南中出现YOUR_SERVER_ID的地方都用它替换。
Microsoft Copilot 通过在 Copilot Studio 中构建的智能体使用 MCP 服务器:把 AnythingMCP 作为工具添加到智能体,然后把智能体发布到 Microsoft 365 Copilot 和 Teams。Copilot Studio 从 Microsoft 的云端通过 Streamable HTTP 连接,AnythingMCP 支持这种方式。
- 在 Copilot Studio 中打开你的智能体(或新建一个),进入 Tools,选择 Add a tool → New tool → Model Context Protocol。
- 填写 Server name(例如
AnythingMCP)、说明连接器用途的 Server description,以及 Server URLhttps://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID。Copilot Studio 根据描述决定何时调用该服务器。 - 身份验证选择 API key,把 Type 设为 Header,请求头名称填
X-API-Key,然后选择 Create。 - 在 Add tool 中选择 Create a new connection,粘贴 AnythingMCP 的 MCP API 密钥(MCP Servers → 你的服务器 → API keys),然后选择 Add to agent。
- 在智能体的 Test 窗格中试一试:提出需要用到
Stability AI的工具的请求。 - 选择 Publish,然后进入 Channels → Microsoft 365 and Microsoft Teams,保持勾选 Make agent available in Microsoft Copilot,再选择 Add channel。See agent in Teams 会为你安装该智能体;在 Microsoft 365 Copilot 中输入 @ 并选择该智能体。
希望每个用户各自登录?请选择 OAuth 2.0 → Dynamic discovery 代替 API 密钥:每个用户会在智能体首次调用时登录 AnythingMCP。
自托管?请用你实例的公网 HTTPS 地址替换 https://cloud.anythingmcp.com。Copilot Studio 从 Microsoft 的云端连接,因此 localhost 无法使用。
可用工具
| Tool | What it does |
|---|---|
stability_ai_get_balance | Credit balance of the Stability AI account or organization of the API key (1 credit = $0.01) |
stability_ai_get_account | The Stability AI user of the API key: id, email and the organizations it belongs to (id, name, role, default) |
stability_ai_list_engines | List the legacy v1 engines (SDXL and older models) available to the account, with id, name, type and description |
stability_ai_get_result | Fetch the result of an asynchronous image job (stability_ai_upscale_creative, stability_ai_replace_background_and_relight) by its id |
stability_ai_get_audio_result | Fetch the result of a stability_ai_generate_audio job by its id |
stability_ai_generate_image_core | Create a picture from a text description with Stable Image Core, the fast and cheap model, and return it as an image the user can see |
stability_ai_generate_image_ultra | Create a high-quality, photorealistic or detailed picture with Stable Image Ultra (the best model, about 1 megapixel), optionally starting… |
stability_ai_generate_image_sd3 | Create a picture with Stable Diffusion 3.5 (Large, Large Turbo, Medium or Flash), from text or from a starting picture, and return it as an… |
stability_ai_upscale_fast | Enlarge a picture 4 times with the fast upscaler (sharper detail, no reinterpretation) and return it as an image |
stability_ai_upscale_conservative | Upscale a picture to about 4 megapixels while keeping it faithful to the original (prompt describes the picture), and return it as an image |
stability_ai_upscale_creative | Upscale a low-resolution or poor picture to 4K with added detail guided by a prompt |
stability_ai_remove_background | Remove the background of a picture, keeping the subject on a transparent background, and return it as an image |
stability_ai_erase | Erase unwanted objects or blemishes from a picture using a mask, filling the area naturally, and return it as an image |
stability_ai_inpaint | Repaint the masked part of a picture following a prompt (inpainting) and return it as an image |
stability_ai_outpaint | Extend a picture beyond its borders (outpainting) in any direction and return it as an image |
stability_ai_search_and_replace | Find an object in a picture by description and replace it with something else, no mask needed, and return the picture as an image |
stability_ai_search_and_recolor | Find an object in a picture by description and change its colour, no mask needed, and return the picture as an image |
stability_ai_replace_background_and_relight | Put the subject of a picture on a new background and relight it to match (product shots, portraits) |
stability_ai_control_sketch | Turn a sketch or line drawing into a finished picture that follows its outlines, guided by a prompt, and return it as an image |
stability_ai_control_structure | Create a new picture that keeps the structure and composition of an input picture, guided by a prompt, and return it as an image |
stability_ai_control_style | Create a new picture from a prompt in the visual style of a reference picture and return it as an image |
stability_ai_control_style_transfer | Apply the style of one picture to the content of another (style transfer) and return the result as an image |
stability_ai_generate_audio | Create music or sound effects from a text description with Stable Audio 3 (up to about 6 minutes) |
示例提示
- “Stability AI 账号里还剩多少积分?”
- “用 Stable Image Ultra 生成一张 16:9 的照片级图片:日落时分岩石海岸上的灯塔。先告诉我费用。”
- “移除 https://example.com/product.jpg 的背景,给我一张透明 PNG。”
- “把 https://example.com/street.jpg 里的红色汽车换成一辆蓝色自行车。”
- “为播客片头做一段 30 秒、80 BPM 的舒缓 lo-fi 钢琴曲。”
FAQ
这适用于哪个 Copilot? 适用于工作中的 Microsoft 365 Copilot,通过 Copilot Studio 的智能体实现。面向个人账户的 Microsoft Copilot 应用无法添加自己的 MCP 服务器。
我需要什么? 一个可以使用 Copilot Studio 的工作账户(许可证或试用版),用于构建智能体。在 Microsoft 365 Copilot 或 Teams 中使用它的人需要拥有该智能体的访问权限:把它共享给他们,或请管理员为整个组织发布。如果你的组织对 Power Platform 连接器设置了数据策略,这些策略同样适用于 MCP 服务器。
智能体不调用工具。 检查请求头名称是否正好是 X-API-Key,密钥是否属于与 URL 相同的 MCP 服务器,并把 Server description 写得具体:Copilot Studio 根据它决定何时调用服务器。每次修改后重新发布智能体;在已打开的对话中输入 "start over" 即可使用新版本。
下一步
这份指南对你有帮助吗?