MeduxMedux
Overview / MCP / Visual Studio Code

Use Medux MCP in Visual Studio Code

Add the Medux-hosted remote MCP server to Visual Studio Code (Copilot agent mode) with .vscode/mcp.json, verify it, and call Medux media tools from chat.

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

Create .vscode/mcp.json inside your workspace folder. VS Code uses servers as the root key (not mcpServers), and an inputs entry prompts you for the key once and stores it securely, so it never sits in the file.

{ "inputs": [ { "type": "promptString", "id": "medux-api-key", "description": "Medux API key", "password": true } ], "servers": { "medux": { "type": "http", "url": "https://mcp.medux.io/api/mcp/v1", "headers": { "Authorization": "Bearer ${input:medux-api-key}" } } } }

Files copied from other clients that use mcpServers will not work in VS Code. MCP support needs VS Code 1.99 or later.

3

Save the file. A Start CodeLens appears above the medux server — click it and enter your key when prompted. Then open Copilot Chat (Ctrl+Shift+I / Cmd+Shift+I), switch to agent mode, and confirm the medux_* tools appear under Configure Tools.

4

Use it from a prompt. Start Visual Studio Code 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: Visual Studio Code 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

  • No Start CodeLens: check the root key is servers and the file is in a .vscode folder inside the opened workspace.
  • 401 Unauthorized: re-run the server and re-enter the key. The first request can show 401 until you choose Allow in the Copilot Chat authorization prompt.
  • 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.