Connecting VS Code Copilot to Aegis routes every MCP tool call through Aegis for policy evaluation and logging. The integration is workspace-level: you create a single JSON file inside your project’sDocumentation Index
Fetch the complete documentation index at: https://docs.runaegis.co/llms.txt
Use this file to discover all available pages before exploring further.
.vscode/ folder, restart VS Code, and governance begins. No extensions, no code changes, and no modifications to your repositories are required.
Prerequisites
Before you connect VS Code Copilot, make sure you have:- An Aegis account at app.runaegis.co
- GitHub connected in Settings → GitHub
- At least one room created in Rooms, you need the room ID and access token from that room
Your user ID is in Settings → Profile. You will need it when filling in the config below.
Config file location
VS Code Copilot reads MCP servers from.vscode/mcp.json inside your project folder. This file is workspace-scoped, so it applies only to the project it lives in. You can commit it to your repository to share the Aegis connection with your team (but keep the access_token out of version control, see the warning below).
Setup
Create the .vscode folder
If your project does not already have a
.vscode/ folder, create one in the project root.Paste the config
Open Replace each placeholder:
.vscode/mcp.json, paste the snippet below, replace the four placeholder values with your actual credentials, and save the file..vscode/mcp.json
| Placeholder | Value |
|---|---|
<USER_ID> | Your Aegis user ID, find it in Settings → Profile |
<ROOM_ID> | The room ID from the room detail page |
<ACCESS_TOKEN> | The access token from the room detail page |
<ROLE> | DEVELOPER, ADMIN, or OWNER |
VS Code Copilot uses the
servers key (not mcpServers), and the server type field is type (not transport). These are the correct field names for VS Code, do not mix them with the Cursor or Claude Code format.Verify the connection
After restarting, ask Copilot to perform any tool call, for example, read a file or describe the repository structure. Then open the Aegis dashboard and go to Audit Trail. The action should appear within a few seconds. If it does not appear after a minute, check that the four placeholder values in the config are correct, that the room is active, and that the file is saved at.vscode/mcp.json (not .vscode/mcp.json.txt or another extension).