关于 pixfaro
pixfaro 提供图像生成 MCP 服务和命令行工具,通过统一 API 与预付余额调用多种图像模型。面向使用 MCP 客户端或脚本生成、编辑图像的用户,并以托管图片 URL 返回结果。
主要功能
- 01生成和编辑图像
- 02查看模型价格与延迟
- 03查询预付余额
- 04模板渲染卡片
- 05上传可复用素材
- 06提供命令行生成与编辑
适用场景
- 01通过 MCP Agent 生成图像
- 02用自然语言编辑已有图像
- 03批量脚本生成素材
- 04制作模板化卡片
MCP 相关
MCP 服务向客户端提供图像生成、编辑、模型列表、余额查询等工具;远程连接支持 OAuth,也可用 API 密钥认证。部分模板和素材工具仅在远程服务提供。
配置
远程服务无需本地安装。选择你使用的客户端,复制配置或使用一键安装。
https://mcp.pixfaro.com/mcpclaude mcp add --transport http com-pixfaro https://mcp.pixfaro.com/mcp{"mcpServers":{"com-pixfaro":{"type":"http","url":"https://mcp.pixfaro.com/mcp"}}}在 Cursor 中打开{"servers":{"com-pixfaro":{"type":"http","url":"https://mcp.pixfaro.com/mcp"}}}在 VS Code 中打开{"mcpServers":{"com-pixfaro":{"type":"http","url":"https://mcp.pixfaro.com/mcp"}}}{"mcpServers":{"com-pixfaro":{"serverUrl":"https://mcp.pixfaro.com/mcp"}}}命令在终端中运行;JSON 粘贴到对应客户端的 MCP 配置后重启。需要授权的服务会在首次连接时提示登录。
工具
8| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| model | string | 否 | 来自 list_models 的模型 ID |
| prompt | string | 是 | 要绘制的内容 |
| overlay | any | 否 | |
| resolution | enum | 否 | 输出规格(默认为 1K);各模型支持的规格及价格见 list_models1K | 2K | 4K |
| aspect_ratio | string | 否 | 例如 "16:9"(默认为 1:1)。宽高比因模型而异,list_models 会列出每个模型已验证的比例。Gemini 模型使用固定比例(不支持 4:1 或更宽);预算型 fal 模型可计算任意有界 W:H,因此横幅形状请使用这类模型,最高支持 4:1 / 1:4;超过此范围,生成的长条会过薄而无法发送。所有 fal 模型仅支持 1K,因此这是实际限制。 |
详细介绍
Pixfaro MCP — 适用于所有图像模型的图像生成 MCP 服务
一次 MCP 连接,一个预付余额,覆盖所有主流图像模型——目前支持 Nano Banana、Gemini,接下来支持 GPT Image(在 list_models 中显示为“即将推出”)。
Pixfaro 负责管理提供商账号、密钥、重试和格式差异;你的 Agent 只需请求生成图像。
兼容 Claude Desktop、Claude Code、Cursor、Windsurf 以及任何 MCP 客户端。
快速开始 — 无需终端(约 1 分钟)
远程服务是最简单的方式:粘贴一个 URL,在打开的浏览器窗口中登录 Pixfaro 账号。无需在任何文件中放置 API 密钥。
Claude(claude.ai / Claude Desktop,任何套餐):Settings → Connectors →
Add custom connector → URL https://mcp.pixfaro.com/mcp → 登录。
(Team/Enterprise:由组织 Owner 在 Organization settings →
Connectors → Custom → Web 下添加一次。)
Cursor:添加到 Cursor →
— 或者选择 Cursor Settings → MCP → Add new MCP server(类型为 URL,地址为
https://mcp.pixfaro.com/mcp);Cursor 会自行运行 OAuth 流程。
ChatGPT(Pro/Plus/Business/Edu):Settings → 启用 Developer mode
(2026 年 7 月更名后,连接器位于 Plugins 下,此前位于
Connectors → Advanced)→ 添加自定义连接器,URL 为
https://mcp.pixfaro.com/mcp,使用 OAuth。
快速开始 — 命令行 / 配置文件
- 在 pixfaro.com 获取 API 密钥并充值(无需订阅)。
- 将服务添加到 MCP 客户端配置中:
{
"mcpServers": {
"pixfaro": {
"command": "npx",
"args": ["-y", "@pixfaro/mcp"],
"env": { "PIXFARO_KEY": "pf_live_…" }
}
}
}
- 让你的 Agent 生成图像。就是这么简单。
对于 Claude Code:
claude mcp add pixfaro -e PIXFARO_KEY=pf_live_… -- npx -y @pixfaro/mcp
支持可流式传输 HTTP 的客户端也可以在同一文件中使用远程配置——无需密钥,首次使用时通过 OAuth 登录:
{ "mcpServers": { "pixfaro": { "url": "https://mcp.pixfaro.com/mcp" } } }
``` Clients
without OAuth can pass an API key instead: `Authorization: Bearer pf_live_…`.
## Tools
| Tool | What it does |
|---|---|
| `generate_image` | prompt → hosted image URL (+cost and balance in the reply) |
| `edit_image` | natural-language edit of a previous generation by its `img_…` id |
| `list_models` | models with price, latency, and what each is best for |
| `render_template` | typeset card (quote/post) from a template — $0.02, ~2 s, sharp type · *remote server; npx parity coming in 0.2* |
| `list_templates` | card templates with slots, style axes and exact prices · *remote server* |
| `upload_asset` | upload a PNG/JPEG (≤5 MB) as a reusable asset (e.g. a card avatar) · *remote server* |
| `get_balance` | current prepaid balance |
Replies carry a hosted URL, never base64 — your agent's context stays small.
Both generation tools accept `aspect_ratio` (e.g. `"16:9"`, `"9:16"`). Edits
keep the source image's shape when you omit it — pass one only to reshape.
## CLI
The same package family ships an unscoped CLI for scripts, CI, and pipelines:
```bash
export PIXFARO_KEY=pf_live_…
npx pixfaro gen "a lighthouse at night, minimal flat style" -a 16:9 -o cover.png
npx pixfaro models
npx pixfaro balance
npx pixfaro edit img_8f2a… "make the sky darker" -o v2.png
环境变量
| 变量 | 含义 |
|---|---|
PIXFARO_KEY | 你的 API 密钥(pf_live_…)——除 models 外,所有操作都需要 |
PIXFARO_API_URL | 端点覆盖值(默认值为 https://api.pixfaro.com) |
关于此仓库
这是基于 Pixfaro API 的轻量级开源客户端:MCP 服务(@pixfaro/mcp)和
pixfaro CLI 共用一个 HTTP 客户端。余额和提供商层由
api.pixfaro.com 提供支持——这段代码刻意保持精简,方便你在交出密钥前阅读。
MIT © Pixfaro
评论
一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。