FASHN MCP Server
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
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:
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.
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:
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
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 <id>".
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.