VS Code Copilot agent mode: add an email MCP server
GitHub Copilot's agent mode in VS Code can use MCP servers. Add an email server and Copilot can create test addresses and read the codes and links your app sends.
Step 1: create .vscode/mcp.json
In your project, create .vscode/mcp.json with this block. VS Code asks for your API key the first time and stores it securely, so the key never ends up in the file:
{
"inputs": [
{
"type": "promptString",
"id": "quickinbox-key",
"description": "QuickInbox API key",
"password": true
}
],
"servers": {
"quickinbox": {
"type": "http",
"url": "https://quickinbox.net/mcp",
"headers": { "Authorization": "Bearer ${input:quickinbox-key}" }
}
}
}Click Start above the server name in the file. Because the key isn't in the file, it's safe to commit it, and every teammate enters their own key.
Step 2: use it in Agent mode
Open Copilot Chat, switch to Agent mode and check that the QuickInbox tools are enabled in the tools list. Then ask:
Sign up on http://localhost:5173 with a new QuickInbox address, read the
6-digit code from the email and finish the signup.Want it in every workspace?
Run MCP: Open User Configuration from the Command Palette and paste the same block there.
The tools Copilot gets
quickinbox_generate_test_address: makes a fresh address in your namespace, such asacme7x.signup-test@quickinbox.net.quickinbox_get_verification: finds the code or the link in the newest matching email.quickinbox_get_emails: reads the latest emails, optionally for one address only.quickinbox_list_namespaces,quickinbox_whoamiandquickinbox_about: tell the agent what it can use.
Using Claude Code inside VS Code instead?
The Claude Code extension uses Claude Code's own settings. Run the Claude Code command in VS Code's terminal and the tools appear there too.
Related guides
- Test magic link login with an AI agent
- Playwright MCP plus an email inbox: a full signup test run by an agent
- MCP server for OTP and 2FA testing
- Safe API keys for AI agents: one key per agent, one namespace
- MCP server overview
Try it: the QuickInbox MCP server is included on every plan, including the free plan with 5,000 emails a month. Create a free account, make an API key and connect your agent in two minutes.