
Pixapi
io.github.Pixapi-AI由 GitHub 账号 Pixapi-AI 发布v0.1.4更新于 Nov 2, 2026
MCP server for Pixapi: check live credit pricing and balance, then generate images and video.
概览
Pixapi 的 MCP 服务器,让助手查询实时图像/视频模型价格与账户余额,并生成图像和视频、轮询任务结果。
- 可以做什么
- 查询账户余额与实时图像、视频模型价格,并显示哪些模型可通过 MCP 生成
- 以提示词或参考图发起文生图、图生图等异步图像任务
- 按模型要求设置时长与分辨率,发起文生视频、图生视频等异步视频任务
- 用 task_id 轮询任务直到完成或失败,并返回生成的媒体链接
- 适用场景
- 适合在 MCP 客户端内让助手根据提示词或参考图产出图像与短视频,并在花费前先了解价格和剩余额度。更偏向创意与内容制作,而非代码或数据任务。
- 运行要求
- 可使用 api.pixapi.ai/mcp 远程端点,或通过 npx 运行 npm 包 pixapi-mcp(本地 stdio 桥接需 Node.js 22+)。需要带额度的 Pixapi 账户并完成浏览器 OAuth 登录;无人值守场景可用 PIXAPI_API_KEY 提供已有 API 密钥。需要能访问 Pixapi 的网络。
安装
在 SourceWeft 中
- 打开 控制台中的 Pixapi,将其添加到工作区。
- 连接 所需的 凭据。它们会被私密存储,绝不会在公开页面上展示。
- 为需要使用其工具的对话启用该服务。
Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。
交给智能体安装
把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。
阅读 https://sourceweft.com/mcp/io.github.Pixapi-AI%2Fpixapi-mcp/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。其他 MCP 客户端
把它添加到你客户端的 mcpServers 配置中。 客户端会在首次连接时完成 OAuth 登录。
{
"mcpServers": {
"pixapi": {
"type": "http",
"url": "https://api.pixapi.ai/mcp"
}
}
}README
pixapi-mcp
Use Pixapi image and video generation tools from MCP clients.
Quick start
Configure your project automatically (Node.js 22+):
Replace codex with your client, or use --client all for all five:
Without --client, the default is Claude Code and Cursor (--client both).
Use --project /path/to/project to configure another project.
Reload your MCP client and connect to pixapi. Complete its browser sign-in
and authorization prompt the first time. The client saves the OAuth session
and refreshes it automatically; no API key or credential editing is required.
The client may ask you to sign in again if authorization is revoked or expires.
Each client manages its own native OAuth session.
init configures a direct remote HTTP connection by default. If your client
has an Add MCP Server interface, you can also enter the endpoint URL there
without installing this npm package or Node.js.
Codex requires a trusted project. In VS Code, use MCP: List Servers to
start pixapi; in Gemini CLI, use /mcp to inspect it. Complete any client
trust or sign-in prompt. init does not change client security policies.
Generated configuration
Claude Code:
Cursor uses the same mcpServers entry with url and no type field.
VS Code uses servers with type: "http" and url.
Gemini CLI uses mcpServers with httpUrl.
Codex:
Running init updates the pixapi entry and preserves other servers and
settings. VS Code JSONC comments are preserved. Codex TOML settings are
preserved, but comments and formatting are not. All selected configurations
are parsed before writing; a filesystem failure during writes can still
leave some files updated. Correct the local issue and rerun init.
Local stdio bridge
For clients that need stdio, configure the bridge explicitly:
The generated entry runs npx -y pixapi-mcp proxy without credentials.
Registry installations of the npm package also start the bridge directly:
no separate init command or environment variable is required.
The bridge completes the local MCP handshake immediately. On the first tool request it opens browser authorization, then forwards tools to Pixapi. Subsequent connections reuse the saved session and refresh tokens automatically. For clients with a short tool-discovery timeout, sign in once beforehand:
If a client times out during the initial browser sign-in, complete sign-in and reconnect the client. No authorization URL, code, or token is printed to MCP stdout or error output.
OAuth sessions are stored per endpoint in ~/.pixapi/oauth-<hash>.json.
On macOS and Linux, the directory uses mode 0700 and files use 0600.
Writes are atomic; concurrent bridge processes share an authorization lock.
PKCE verifiers and callback state are kept only in memory. The callback binds
to loopback on the same host as the bridge. For a headless or remote host,
prefer the client's native remote OAuth connection.
Existing API key installations
Existing API key configurations remain compatible. For an explicit API key
installation, set PIXAPI_API_KEY when running init; it configures stdio and
saves the key privately in ~/.pixapi/mcp-credentials.json. An explicit
--transport remote always selects native OAuth, even if that variable is set.
The proxy also accepts PIXAPI_API_KEY directly for unattended deployments.
The proxy gives an explicit environment key priority, then a saved OAuth
session, then a legacy key file. To migrate an existing bridge to OAuth, run
pixapi-mcp login and remove any PIXAPI_API_KEY override from its environment.
Keys and tokens never appear in generated project configurations.
Available tools
This package forwards the live tool list from the remote Pixapi MCP endpoint.
After you connect, call tools/list or pixapi_get_pricing_and_balance for
the current catalog.
pixapi_get_pricing_and_balance
Returns your current balance and live image/video model pricing. Each catalog
row includes a type:
- Images:
text_to_image,image_to_image - Videos:
text_to_video,image_to_video
Rows marked mcp_generate_supported=true can be called through the matching
generate tool.
pixapi_generate_image
Starts an asynchronous image task and returns a task_id. Use
type=text_to_image for a prompt-only request, or type=image_to_image with
the image field. The tool accepts the image models in the live catalog,
including Gemini, GPT Image, Flux, Seedream, Qwen, and Wan.
This call consumes account credits. It is not idempotent: repeating the same call creates another task and may charge the account again.
pixapi_generate_video
Starts an asynchronous video task and returns a task_id. Use
type=text_to_video for a prompt-only request, or type=image_to_video with
the image field. Pass seconds and resolution as required by the selected
model.
This call consumes account credits and is not idempotent.
pixapi_get_task
Retrieves an image or video task owned by the authenticated account. Poll this
tool with the returned task_id until the status is completed or failed.
A completed task includes media URLs.
Recommended agent flow:
- Call
pixapi_get_pricing_and_balance. - Select a catalog row with
mcp_generate_supported=trueand check the balance. - Call
pixapi_generate_imageorpixapi_generate_videoonce and retain itstask_id. - Poll
pixapi_get_taskevery few seconds. - Return the result URL when the task is complete.
CLI reference
With no arguments, the package starts the stdio proxy.
Troubleshooting
- Tools do not appear: reload the client, enable the
pixapiserver, and complete project trust and browser sign-in. For stdio, ensure Node.js 22+ andnpxare available on the host running the bridge. - Authorization denied or timed out: retry sign-in from the native client,
or run
pixapi-mcp loginfor the bridge and complete browser authorization. - Callback port unavailable: close another pending Pixapi login and retry.
- Service unavailable: check your connection and retry later. Internal HTTP responses and exception details are omitted from public errors.
- Invalid legacy API key: replace the key, or migrate to OAuth as above.
Security and current limitations
- Do not commit or share files in
~/.pixapi/. - Revoke unused or exposed credentials in your Pixapi account.
- The stdio bridge forwards tools only. Resources, prompts, sampling, and elicitation are not exposed by this package.
- Image and video generation are asynchronous and not idempotent. The bridge retries HTTP authentication rejection once; it does not retry network failures or server errors that might have occurred after a tool executed.
- Account top-up is not exposed as an MCP tool; complete payment on Pixapi.
For service documentation, visit Pixapi docs.
Official MCP Registry
This server is published to the official MCP
Registry as
io.github.Pixapi-AI/pixapi-mcp, with both connection methods declared in
server.json: the remote endpoint and the npm package. Both support OAuth without a required API key starting with version 0.1.4.
Set matching versions in package.json, package-lock.json, and server.json
before pushing the corresponding v* tag. The release workflow installs locked
dependencies, runs checks, and validates the Registry manifest before publishing.
Manual runs must also select that release tag. A rerun compares existing npm
package integrity and Registry metadata and only publishes missing steps;
conflicting contents require a new version. Registry authentication uses GitHub
OIDC, without a stored Registry token.
来源:README.md,提交 17854c2
工具
0版本历史
1- v0.1.4最新Sep 16, 2026
评分
已满足适用检查项的 85%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通必需25 分
- 已声明认证方式必需10 分
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
