MeduxMedux
Overview / MCP / GitHub Copilot

Use Medux MCP in GitHub Copilot

Add the Medux-hosted remote MCP server to GitHub Copilot CLI, verify it, and call Medux media tools from your prompts. Using Copilot inside VS Code? See the Visual Studio Code guide.

How to start

1

Sign in and get your Medux API key. It looks like sk-medux-... — copy it once and store it safely.

2

Add the server to Copilot CLI with one command, or use the interactive /mcp add form inside a session (Server Type: HTTP, plus a JSON header). The server is available immediately, with no restart.

copilot mcp add --transport http --header "Authorization: Bearer sk-medux-..." medux https://mcp.medux.io/api/mcp/v1

The key is stored in plain text in ~/.copilot/mcp-config.json, so keep that file private and never commit it. A project-level .mcp.json or .github/mcp.json also works, but do not put a real key in a shared file.

3

Verify the connection. In a Copilot CLI session, /mcp show medux lists the server's status and tools, and /mcp list shows every configured server.

copilot mcp get medux
4

Use it from a prompt. Start GitHub Copilot in the folder that holds your files and mention Medux so it picks the right tool.

Use Medux to generate a 1024x1024 image of a red fox in watercolor style.
5

How a call works: GitHub Copilot 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 it polls medux_task_query with the task_id until the result URL is ready.

6

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

  • Server not listed: run copilot mcp get medux and check the type is http and the URL ends in /api/mcp/v1.
  • 401 Unauthorized: the key is missing or wrong. Re-add the server with the Bearer prefix.
  • Local-file upload fails: upload URLs expire. Ask the agent 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.