
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 分
