Higgsfield
Build an xmcp server that generates images with Higgsfield Soul and edits them with Grok Image 2.0, with job polling and cancellation.
For the complete documentation index, see llms.txt. Markdown variants of every page are available by appending .md to the URL.Generate images with Higgsfield Soul and edit them with Grok Image 2.0 on Higgsfield. Start with the runnable example.
Configure access
Create an API key in the Higgsfield console. It has two parts, an ID and a secret. Higgsfield bills each output from the account balance; failed and blocked jobs are not charged.
MCP clients send MCP_API_KEY as x-api-key on every request, compared in constant time. The server is stateless: it keeps no sessions and no job records. The server calls https://api.higgsfield.ai with Authorization: Key <id>:<secret>. Each submission sends a fresh Idempotency-Key and is never retried. All authorized MCP clients share the same provider account and its credits, and any of them can read a job whose ID they have.
Available tools
| Tool | Purpose |
|---|---|
generate-image | Generate an image from a prompt with Higgsfield Soul. |
edit-image | Edit up to 10 source images (public https URLs) with Grok Image 2.0. |
get-image-job | Wait for a job and return its image, or its status. |
cancel-image-job | Cancel a job that is still queued. |
Results
Generation runs as a provider job. Each call answers within about 50 seconds, counted from when the tool starts, and sends MCP progress notifications while it polls. When the job finishes, the result contains the image inline and a JSON summary with the provider link and its expiry. Longer jobs return their jobId instead; call get-image-job with it to keep waiting. If the provider stops responding after a submission, the tool still returns the jobId. Cancelling the MCP request stops waiting but does not cancel the provider job. Images larger than 8 MB come back as a link only. Output links stay valid until the expiresAt Higgsfield reports, at least seven days.
Higgsfield only cancels jobs that are still queued. A job that already started runs to completion.
Run the example
Follow the example README for installation and startup. Its tests replace every provider request with a local fake, so they need no credentials.
Tested against Higgsfield's documented API on November 24, 2026.
