Skip to main content
Connecting Claude Code to Aegis lets you govern every tool call the agent makes, pushing code, creating branches, opening pull requests, without changing your agent setup or your repositories. Aegis connects via the Model Context Protocol (MCP) over SSE. Once the config is in place and Claude Code is restarted, governance starts automatically.

Prerequisites

Before you connect Claude Code, 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

Claude Code reads its MCP configuration from one of two locations depending on how broadly you want Aegis to apply:

Setup

1

Open or create your MCP config file

For user-level scope, open ~/.claude/mcp.json. For project-level scope, create a .claude/ folder in your project root and open .claude/mcp.json inside it. If the file does not exist yet, create it.
2

Paste the config

Copy the snippet below, replace the four placeholder values with your actual credentials, and save the file.
~/.claude/mcp.json
Replace each placeholder:
3

Restart Claude Code

Quit and reopen Claude Code. It will read the updated config on startup and open a persistent SSE connection to Aegis.

Verify the connection

After restarting, ask Claude Code to perform any tool call, for example, list the files in a repository. 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, double-check that all four placeholder values in the config are correct and that the room is active.
If you have both a user-level and a project-level config, the project-level file takes precedence for that project.
Keep your access_token private. If it is exposed, rotate it from the room detail page in the Aegis dashboard immediately.