Connect your agent · VS Code + Copilot

Give Copilot in VS Code a mailbox for its tasks.

Keep coding work and email identity in the same workspace without handing Copilot your personal inbox. VS Code connects to the separate mailbox you authorize in Stacksona Connect.

For developers who use GitHub Copilot in VS Code and want email tools available alongside their coding workflow.

Set it up

Add the remote MCP server in VS Code

Pick the VS Code configuration file and matching JSON shape before starting the server.

  1. Create the mailbox

    Create the agent mailbox and set the contacts or approval rules that should apply to its messages. Your mailbox address is assigned by Connect.

  2. Open MCP server setup

    In VS Code, run the MCP: Add Server command. Choose an HTTP server, paste the Connect URL, and save it in the scope that fits your workflow.

  3. Choose the matching config format

    For workspace config, VS Code uses .vscode/mcp.json with a top-level servers object. Portable .mcp.json uses mcpServers; do not copy the portable format into the VS Code workspace file.

  4. Start and authorize

    Start the server from VS Code’s MCP view, complete browser sign-in, and inspect which tools are enabled. Verify the granted permissions before asking Copilot to read mail.

Workspace configuration example

Save this as .vscode/mcp.json. VS Code workspace configuration uses a top-level servers object.

{
  "servers": {
    "stacksona-connect": {
      "type": "http",
      "url": "https://connect.stacksona.com/mcp"
    }
  }
}
The config file matters

Use the format VS Code expects for the scope you chose.

VS Code supports MCP server configuration in more than one place. The workspace file `.vscode/mcp.json` uses a `servers` map; the portable `.mcp.json` convention uses `mcpServers`. Matching the file and format prevents a quiet setup failure.

Keep Copilot’s email authority narrow

Access to an agent mailbox does not open your mailbox.

The OAuth flow ends at Connect, where you choose the specific scopes granted to the agent. Your personal Microsoft or Google email account is not part of this connection. You can begin with read and draft, then require review for unfamiliar recipients.

Match the file format to the VS Code configuration scope.

A workspace can carry the server address, but OAuth belongs to the person who authenticated. VS Code and Copilot may filter the tools that are available to the model, so check the running server and enabled tools after consent.

The workspace tells VS Code where Connect lives; Connect decides which mailbox permissions the signed-in owner granted.

Compare the available integration paths
Questions people ask about VS Code + Copilot

VS Code and Copilot setup details

Which file should I use in VS Code?

Use `.vscode/mcp.json` for workspace configuration with a top-level `servers` key. The portable `.mcp.json` format uses `mcpServers` instead.

Does this connect Copilot to my Outlook account?

No. Copilot receives access to a mailbox created in Stacksona Connect. It does not receive your Outlook password or a delegated Outlook inbox connection.

Why does the server appear but no tools show?

Check that the server started, finish the browser authorization, reload the MCP view, and confirm the Connect scopes include the actions you expect. The model may show fewer tools than Connect granted.

Stacksona Connect

Connect Copilot to an agent mailbox

Create the mailbox and add the remote server in VS Code using the configuration format for your chosen scope.

Create an agent mailbox