Implementation
Step 1: Install the Freebeat MCP package
Open a terminal in an environment where npx is available and run:
npx -y freebeat-mcp
The MCP client configuration will launch this command when it starts the server.
Success looks like: the command is available in the environment the MCP client will use, and the package can be launched through npx.
Common mistake to avoid: Installing or running the server in a different environment from the one used by the desktop client.
Step 2: Add the server configuration to your MCP client
Add the following server entry to your Claude Desktop or Cursor MCP configuration, replacing the placeholder with your own key:
{
"mcpServers": {
"freebeat": {
"command": "npx",
"args": ["-y", "freebeat-mcp"],
"env": {
"FREEBEAT_API_KEY": "your-api-key-here"
}
}
}
}
Keep the required environment variable name exactly as shown. Store the configuration in the client’s designated MCP settings, not inside a prompt.
Success looks like: the client configuration contains the freebeat server, the npx command and arguments, and a valid FREEBEAT_API_KEY.
Common mistake to avoid: Leaving the placeholder key in place or using a different environment-variable name.
Step 3: Start the server and discover image models
Restart or refresh the MCP client so it reads the server entry. Then call list_models with type: "image" and note a supported model’s identifier or API model key, commands, and constraints.
For model-specific examples or requirements, optionally call get_model_help with the model’s numeric ID or API model key. Since the available models can change, use the current discovery response instead of relying on a hard-coded model value.
Success looks like: the client can call the image model list and returns model details you can use in a request.
Common mistake to avoid: Sending a guessed or outdated model identifier instead of choosing one returned by list_models.
Step 4: Generate an image or prepare an edit
For new artwork, call generate_image with the selected model and a clear prompt. You can optionally provide size, resolution, quality, or count; count defaults to 1. For model ID 108, omitted quality and resolution default to medium and 1024×1024. If resolution is omitted but size is supplied, size is also sent as resolution for compatibility.
For an edit, first call upload_image or use an existing image URL, then call edit_image with one image URL and the prompt. The upload tool accepts one or two images and returns image URLs; an edit request uses a single image.
Success looks like: the request is accepted and returns a batch identifier. The prompt is 1–2,000 trimmed characters and the selected model supports the requested operation.
Common mistake to avoid: Sending an empty prompt, exceeding the prompt length, or passing multiple images to a single-image edit request.
Step 5: Poll the asynchronous batch
Use the returned batch_id as the task_id argument to get_task_status. Check the status response and continue polling while it is pending; inspect the response for failure details if the status is failed.
A completed response may contain an items array with image URLs or edited images. For completed Open RPC image and video batches, the result URLs are returned directly by the status call; get_task_result is not used for these batches.
Success looks like: the status reaches completed and the response includes an output URL or edited image you can access.
Common mistake to avoid: Polling with the wrong identifier or looking for results through get_task_result instead of the status response.
Step 6: Handle the result and any task error
When a task completes, capture the image URL or edit output from the status response and pass it to the next step in your workflow. If it fails, inspect error_code and error_message when present, then correct the relevant key, model, input image, or prompt before trying again.
Success looks like: your workflow can identify completed and failed tasks and handle the corresponding result or error information.
Common mistake to avoid: Treating a pending task as a failure or assuming a successful response always contains a result URL without checking its items.