Microsoft · Editor
How to Generate Images in VS Code (GitHub Copilot) with MCP
Connect PixelMCP to VS Code (GitHub Copilot) and your agent can generate images while it builds: hero images, icons, illustrations, blog headers and OG cards. It can save the files straight into your project using Nano Banana, GPT Image, FLUX, Seedream or Recraft.
Use PixelMCP in Copilot's agent mode inside VS Code.
- 1
Add the server
Run “MCP: Add Server” from the Command Palette (choose Workspace or Global), or create .vscode/mcp.json:
{ "servers": { "pixelmcp": { "type": "http", "url": "https://pixelmcp.com/mcp" } } } - 2
Start and sign in
Start the server from the inline action in mcp.json, confirm the trust prompt, and complete the sign-in.
- 3
Use it
In Copilot Chat (Agent), click Configure Tools to check PixelMCP is enabled, then ask for an image.
Things to try
“Create a set of 6 feature icons in our brand palette for the pricing page.”
Image models you can use in VS Code (GitHub Copilot)
Not sure which to pick? Compare the models.
FAQ
What do I need to use PixelMCP in VS Code (GitHub Copilot)?+
VS Code with GitHub Copilot. You also need a PixelMCP account, which starts with 100 free credits.
Which image models can I use in VS Code (GitHub Copilot)?+
Nano Banana 2 and Pro, GPT Image 2 and GPT Image 2 HD, FLUX.2 Pro and Klein, Seedream 5.0 Pro and Recraft V4.1. Name a model in your prompt or let the assistant choose.
How much does it cost?+
You pay per image with credits, from 6 credits (6¢) an image. There's no subscription and credits never expire. New accounts get 100 free credits.
How long does setup take?+
About a minute. Add the PixelMCP server URL to VS Code (GitHub Copilot), sign in once, and you're ready to generate.
Menus change often. If a label here doesn't match what you see, look for “Connectors”, “MCP” or “Integrations” in VS Code (GitHub Copilot)'s settings, or check Microsoft's docs.