To use VidMage MCP in Claude Code, add VidMage to Claude Code's settings with your API key, check the connection with a free tool call, and then ask Claude Code to quote, create, and save your asset in a project folder. Claude Code finds the right VidMage tool, checks the price before it spends any credits, waits for the task to finish, and downloads the file into your folder.

You need an active VidMage subscription and the Claude desktop app on a Mac. You don't need any MCP experience, because this guide starts from a fresh setup.

What to Have Ready Before You Connect

  • A VidMage subscription with credits: MCP access runs on an API key, and API keys only work on a subscribed account. Anything you create uses the same credit balance as the VidMage website.
  • Claude Code in the Claude desktop app: Install the Claude app, sign in, and open the Code tab. Anthropic's desktop quickstart covers installation and which Claude plans include Claude Code. Claude bills its own usage separately from your VidMage credits.
  • A folder for your files: Create an empty folder, for example, VidMage Projects inside Documents. Claude Code saves your finished assets and their job records there.

How to Connect VidMage MCP to Claude Code

Step 1: Open the VidMage Developer Console, click API keys in the sidebar, and create a new key. Give it a name you will recognize, such as Claude Code MCP, and click Create key. VidMage shows the full key only once, so click the Copy key right away and store it somewhere private. You will paste it into a settings file in the next step, never into a Claude Code chat. For a closer look at this screen, see How to Create Your VidMage API Key.

VidMage Developer Console create API key for Claude Code

Step 2: Next comes the Claude Code MCP setup itself. Claude Code keeps its MCP servers in a hidden file called .claude.json in your Mac's home folder, and the Code tab reads VidMage from there. Quit the Claude app first with Command + Q.

Then open Terminal by pressing Command + Space, typing Terminal, and pressing Return. Run these commands one at a time. The first creates the file if it is missing and leaves any existing contents intact:

touch ~/.claude.json
open -e ~/.claude.json

The file opens in TextEdit. If it contains settings but no mcpServers section, click after the first opening brace, press Return, and paste the block below. If mcpServers already exists, add only the vidmage entry inside that section, preserving the other servers and separating entries with commas. Do not add a second mcpServers section.

  "mcpServers": {
    "vidmage": {
      "type": "http",
      "url": "https://vidmage.ai/api/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  },

Keep the final comma in this block only when other settings follow it. If the file is blank or contains only an empty pair of braces, use the complete version below instead:

{
  "mcpServers": {
    "vidmage": {
      "type": "http",
      "url": "https://vidmage.ai/api/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

Now replace YOUR_API_KEY with the key you copied in Step 1. Keep the word Bearer and the single space after it. Press Command + S to save. Since this file now holds your key, paste one more line into Terminal so only your Mac account can open it:

chmod 600 ~/.claude.json

NOTE: If you already use the claude command in Terminal, you can skip the file editing.

In the Developer Console, open MCP connections, choose the Claude Code tab, and click Copy configuration. Paste the command into Terminal, type your key when it asks, and Claude Code saves the same VidMage entry for you. The desktop app doesn't install the claude command on its own, so stay with the file steps above if Terminal says command not found.

Step 3: Open the Claude app again, go to the Code tab, and start a new session. Under the prompt box, choose This computer so the session runs on your Mac, then click the folder control next to it and select the folder you created. Claude Code asks Trust workspace? because it may read, write, and run files in that folder. Click Trust workspace, and click Allow if macOS asks for folder access too.

Claude Code choose local folder and trust workspace

Step 4: Before you create anything, make sure VidMage accepts your key. Send this message in the session:

Check my VidMage MCP connection. Use the VidMage server to call list_capabilities with a small limit and search for Grok AI Image Generator. Show me the capability name it returns and tell me whether the tool call succeeded. Don't upload or generate anything. If the server isn't available, tell me instead of using another service.

Claude Code loads the VidMage tools and shows its work as Used VidMage: List VidMage capabilities. Expand that line to see the result. If it shows "success": true along with Grok AI Image Generator, you are connected. If Claude Code asks for permission to use a VidMage tool, allow it.

Claude Code VidMage MCP connection check with list capabilities

How to Create and Save Your First Asset

Step 5: Describe what you want and ask for a quote before anything gets made. For instance:

I need a website hero image for a handmade ceramics shop. Use VidMage MCP to check what Grok AI Image Generator needs in text-to-image mode. Confirm that one 16:9 image at 1k in PNG is supported and estimate its credit cost. Show the required input, my settings, and the estimate in a short table. Don't generate anything yet.

Claude Code reads the tool's current rules and asks VidMage for a price. For instance, Grok AI Image Generator needs a prompt of 1 to 4,000 characters and offers 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, and 2:3 aspect ratios, 1k or 2k resolution, and JPEG, PNG, or WebP files. One image at 1k currently costs 10 credits, and the same image at 2k costs 15.

VidMage MCP credit estimate in Claude Code

Step 6: Once the quote looks right, approve it and hand Claude Code the full job in one message. A complete request names the tool and settings, your credit limit, your image description, the file name, and a reminder to submit only once:

Generate one image with VidMage MCP using Grok AI Image Generator in text-to-image mode: 16:9, 1k, PNG, one image. I approve the quoted 10 credits, and this task must not go over 10 credits.

Prompt: Create a photorealistic website hero image for an independent handmade ceramics shop. Arrange a matte ivory vase, a sage-green mug, and two small speckled stoneware bowls on a pale oak shelf. Soft morning light enters from the right, revealing the handmade glaze and subtle clay texture. Keep the ceramics in the right half and leave clean warm-white wall space on the left for a headline added later. Calm contemporary styling, realistic product photography. No people, no lettering, no logos, no watermark.

Before you submit, save the exact request and a unique idempotency key in a job record named ceramics-hero-job.json in this folder. Submit once and add the task ID to the job record. Check that same task until it finishes, waiting as long as VidMage asks between checks. Run the returned download command once to save the image as ceramics-hero.png in this folder, confirm that it opens, and show it to me. If the submission result is unclear, recover the existing task instead of submitting a new one.

Claude Code saves the job record, submits the task, and checks back every 10 seconds or so while VidMage reports it as running. An image like this often finishes in about a minute. Claude Code then downloads the PNG into your folder, shows you a preview, and reports the file details.

NOTE: If Claude Code asks for permission to run a command or write to your folder, allow it, because that's how the file reaches your Mac.

Claude Code saves VidMage MCP image and file check

Step 7: To confirm what the task cost, open the Developer Console and select the task from your recent tasks. Task details show the capability, the billing status, the credits used, and the task ID. That task ID matches the one in your job record, which comes in handy if you ever need to pick up the same task again.

VidMage Developer Console task details with credits charged

Use the Same Setup for AI Video Generation in Claude Code

You can use the same connection for more than images. AI video generation in Claude Code follows the same pattern: ask for a quote, approve it, then let Claude Code create and save the file. For example:

Use VidMage MCP's Grok Video Generator in text-to-video mode to quote one 6-second 16:9 video at 720p. Show me the required input, my settings, and the estimate. Don't generate anything yet.

In text-to-video mode, Grok Video Generator currently takes a prompt of 5 to 800 characters, 6 or 10 seconds in length, 16:9, 9:16, or 1:1 framing, and 480p or 720p resolution. Videos take longer than images, often a couple of minutes, and VidMage asks Claude Code to wait a bit longer between checks.

Reuse the Step 6 request with your video description, a credit limit that matches the new quote, and an .mp4 file name. Describe the movement and the camera too, such as "the camera makes a slow push toward the mug."

How to Finish a Task Without Paying Twice

Submitting the task is the step that spends credits, which is why Step 6 asks Claude Code to save a job record first. If the app closes, the session ends, or the download fails, don't ask for a brand-new image. Ask Claude Code to finish the one you already paid for. For instance:

Continue the task in ceramics-hero-job.json. Use the saved task ID to check its result and save the file if it's ready. Don't submit a new generation. If the record has no task ID, look up my recent VidMage tasks before you take any paid action.

Downloading a finished file again doesn't use generation credits. If you lose the job record, Claude Code can still find the task through VidMage's recent task list. Removing VidMage from .claude.json won't cancel a task you already submitted.

Fix Common VidMage MCP Claude Code Connection Issues

Problem

What to try

Claude Code shows no VidMage tools

Reopen .claude.json with the Terminal line from Step 2 and check that the vidmage block is there, saved, and includes "type": "http" and the full URL. Quit the app with Command + Q, reopen it, and start a new session.

Claude Code can't read its settings file

The usual causes are a missing comma after the VidMage block, an extra comma, or curly quotes from TextEdit. Paste the block again and save. If you'd already added other MCP servers for all your projects, put the vidmage entry inside that existing mcpServers section instead.

Claude Code answers without calling a VidMage tool

Make sure you're in a Code tab session on This computer, not a regular chat. Send the Step 4 check again and look for Used vidmage in the reply.

AUTHENTICATION_REQUIRED, AUTHORIZATION_HEADER_INVALID, or API_KEY_INVALID_OR_REVOKED

Check that the key line reads Bearer, one space, and your full key, with nothing else inside the quotes. If you revoked the key or lost it, create a new one in the Developer Console, swap it in, save, and restart the app.

Access denied or a 403 error

Read the error code first, since not every 403 means a bad key. Confirm that your VidMage subscription is active. On a work device, your company may block MCP servers.

The connection times out

Check your internet connection, and make sure a VPN, proxy, or firewall isn't blocking https://vidmage.ai/api/mcp.

Generation doesn't start

Ask Claude Code to show the estimate and the tool's rules. VidMage turns down a prompt that's too long, a setting from another mode, or a request your credit balance can't cover.

The task finished, but no file appeared

Let Claude Code run commands and write to your folder, then ask it to download the same task again. Don't submit a new one.

PUT IT INTO PRACTICE

Try it in VidMage

Open the tool and follow the steps above.

Open Developer resources ↗