FASHN MCP
Fashion images and videos with the FASHN Agent: try-on, model swaps, product shots, and more.
ホスト型 MCP サーバー
npx add-mcp 'https://api.fashn.ai/mcp'Claude Code、Codex、Cursor などにインストールできます
ドキュメント
FASHN MCP Server
Connect Claude, Claude Code, Codex, and other MCP clients to the FASHN MCP server, and make fashion images and videos with the FASHN Agent from a chat.
The FASHN MCP server brings the FASHN Agent to any app that supports the Model Context Protocol, such as Claude, Claude Code, and Codex. Once connected, you describe the images or videos you want in the chat, attach or link your photos, and your assistant calls the FASHN Agent and shows you the results. You write no code.
To build FASHN into your own code instead, use the Agent API directly, or see Coding Agents.
Server URL
https://api.fashn.ai/mcp
The server uses the Streamable HTTP transport. You connect with your FASHN account (OAuth), or with an API key for clients that cannot sign in.
Connect
Ask your coding agent
In Claude Code or Codex, paste:
Install the FASHN MCP server for all my projects: https://api.fashn.ai/mcp
Your agent adds the server and asks you to approve the command. Then sign in to FASHN and pick an organization: Codex opens the sign-in in your browser, and in Claude Code you run /mcp, select fashn, and choose Authenticate. Start a new session to use the FASHN tools.
Set it up yourself
- In Claude, open Settings → Connectors and choose Add custom connector.
- Name it
FASHNand enterhttps://api.fashn.ai/mcpas the URL. - Choose Connect, sign in to FASHN, and pick the organization whose credits the connector uses.
Add the server:
claude mcp add --transport http fashn https://api.fashn.ai/mcp
Then sign in to FASHN and pick an organization: run claude mcp login fashn in your terminal, or run /mcp in Claude Code, select fashn, and choose Authenticate.
Add the server:
codex mcp add fashn --url https://api.fashn.ai/mcp
Codex opens the FASHN sign-in in your browser. Sign in and pick an organization. If the sign-in does not open, or you need to sign in again later, run codex mcp login fashn.
The Codex CLI and the Codex app share this configuration.
Most clients take a remote server as a URL in their MCP configuration. For example, in Cursor's mcp.json:
{
"mcpServers": {
"fashn": {
"url": "https://api.fashn.ai/mcp"
}
}
}
The client opens the FASHN sign-in the first time it connects.
Connect with an API key
A client that cannot sign in can send an API key as a bearer token instead. Create a key in API Setup, then pass it in the Authorization header:
claude mcp add --transport http fashn https://api.fashn.ai/mcp \
--header "Authorization: Bearer $FASHN_API_KEY"
codex mcp add fashn --url https://api.fashn.ai/mcp \
--bearer-token-env-var FASHN_API_KEY
Both ways spend the organization's API credits, at the Agent API prices below. A sign-in uses the organization you picked when connecting; an API key uses the organization it belongs to. A FASHN App subscription's credits are not used.
Tools
| Tool | What it does | Cost |
|---|---|---|
generate_images | Runs the FASHN Agent on a prompt and up to 6 images, and returns every image it made. | Agent Images prices |
generate_videos | Runs the FASHN Agent for video on a prompt and up to 6 images, and returns every video it made. | Agent Videos prices |
get_run | Waits for a run that is still processing and returns its results. | Free |
get_credits | Returns the organization's API credit balance. | Free |
generate_images and generate_videos take the settings of Agent Images and Agent Videos, except return_base64, since results are always links: resolution, aspect_ratio, generation_mode, duration, and audio. Your assistant fills them in from your request, so you can say "1080p, 10 seconds" in the chat. Input images can be public URLs or images your client sends as data. The same limits apply as on the API.
Example prompts
Use FASHN to put the jacket in this photo on a model in a bright studio,
full body, front view.
Make white-background packshots of these three bags with FASHN, fast mode.
With FASHN, make a 5-second video of the model in this photo turning
toward the camera.
How many FASHN API credits do I have left?
For more ideas, see the example prompts in the Agent API Quickstart.
Results
Each result is a full-size link on the FASHN CDN. Your assistant also receives small previews of the images to check the results, and gives you the full-size links. Clients that support MCP Apps show the images and videos right under the tool call, and open the full size when you click one.
Long runs
A generate tool waits up to about 45 seconds for the run to finish. A run that takes longer, as most videos do, returns its id instead, and your assistant calls get_run to keep waiting. You can also ask for it later: "check FASHN run ``".
Stopping your assistant or cancelling the tool call does not stop a run. It
finishes, the images and videos it makes are billed, and its results stay available through get_run.
Errors
A run that fails, such as one with no credits left or a prompt the Agent could not make an image for, returns the same error as the API, with its name and message, and your assistant tells you what went wrong. See the Agent Images errors for each one. Runs count against your organization's concurrency limit, like API requests.
Next: Try prompts from the Agent API Quickstart, or browse the Agent Images and Agent Videos references.