Copilot can refactor your components. Now it can make their images.
Agent mode is allowed to act across files. Give it an image server and the assets stop being the one part of a feature that has to wait for a person.
tools picker
generate_imageedit_imageremove_backgroundupscale_imagetext_to_svgcompress_imageThe config, with the key kept out of git
The inputs block is the part worth copying. It makes VS Code prompt for the key once and store it locally, so the file you commit contains a placeholder rather than a live credential.
⚠️ If a key does get committed
Revoke it from the dashboard rather than rewriting history. Keys are individually revocable, and issuing a new one takes seconds.
- 1Create .vscode/mcp.json in the workspace root.
- 2Paste the config and save.
- 3Start the server from the action shown above the entry, and paste your key when prompted.
- 4Open Copilot chat, switch to agent mode, and check the tools picker.
{
"inputs": [
{
"id": "imagemcp-key",
"type": "promptString",
"description": "imagemcpserver API key",
"password": true
}
],
"servers": {
"imagemcp": {
"type": "http",
"url": "https://mcp.imagemcpserver.com/mcp",
"headers": {
"x-api-key": "${input:imagemcp-key}"
}
}
}
}You do not have to enable all eleven
The tools picker is a real permission boundary. Turning tools off is the simplest way to give an agent exactly the capability the task needs and nothing more.
Optimisation only
compress_image, convert_formatCannot spend model credits at all. Every call costs 1 credit. Good for a repo-hygiene agent let loose on /public.
Post-processing
+ remove_background, upscale_imageWorks on images you already have. Fixed, predictable per-image costs.
Full creative
everythingCan originate artwork. Worth pairing with an instruction to check the balance first.
VS Code & Copilot questions
Where does the MCP config go in VS Code?
A .vscode/mcp.json file in the workspace makes the server available to everyone who opens that repository. You can also register a server in your user settings if you want it in every project on your machine.
How do I keep the API key out of the repository?
Use an input of type promptString marked as a password, and reference it from the header. VS Code asks for the value the first time and stores it locally — the committed file contains only the placeholder.
Do the tools work in Copilot chat, or only agent mode?
MCP tools are used by agent mode, where Copilot is allowed to take actions across files. Plain inline completion does not call tools at all.
How do I see whether the server connected?
Open the tools picker in the chat view — the server and its tools are listed there, and you can toggle individual tools off if you want a narrower set.
Can I restrict which image tools it may use?
Yes. Turning off tools in the picker is the simplest guardrail — leaving only compress_image and convert_format enabled, for example, gives you an optimisation assistant that cannot spend model credits.