Use Medux MCP in Claude Code
Add the Medux-hosted remote MCP server to Claude Code, verify it, and call Medux media tools from your prompts.
How to start
Sign in and get your Medux API key. It looks like sk-medux-... — copy it once and store it safely.
Add the server with one command. The endpoint is the same for every Medux tool.
claude mcp add --transport http medux https://mcp.medux.io/api/mcp/v1 --header "Authorization: Bearer sk-medux-..."Choose where the server applies. By default it is saved for you in the current project only. Add --scope user to use it in every project, or --scope project to share it with your team through .mcp.json.
claude mcp add --scope user --transport http medux https://mcp.medux.io/api/mcp/v1 --header "Authorization: Bearer sk-medux-..."For a shared .mcp.json, reference the key through an environment variable as shown so it never lands in git.
Verify the connection. Start claude, then type /mcp — medux should show as connected.
claude mcp listUse it from a prompt. Start claude in the folder that holds your files and mention Medux so Claude picks the right tool.
Use Medux to generate a 1024x1024 image of a red fox in watercolor style.How a call works: Claude chooses a medux_* tool and fills in its parameters. For a local file it first calls medux_file_create_upload_url, uploads the file to the returned upload_url with an HTTP PUT (using the returned content_type), then passes the file_id to the tool. Most tools run as async tasks, so Claude polls medux_task_query with the task_id until the result URL is ready.
To find the exact tool for a capability, open Playground, switch to For AI Agents, and read the MCP tab for its mcp_tool_id.
What this means
- 401 Unauthorized: the key is missing or wrong. Re-copy it and keep the Bearer prefix; for .mcp.json make sure MEDUX_API_KEY is set in the shell that launched Claude Code.
- No medux_* tools listed: run /mcp to see the error, restart the session after changing config, and check the scope with claude mcp get medux. Approve project-scoped servers when prompted.
- Local-file upload fails: upload URLs expire. Ask Claude to request a new one and send the exact content_type it returns.
- Insufficient credits: top up or upgrade on the Pricing page. MCP calls use the same credits as the public API.