Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.runaegis.co/llms.txt

Use this file to discover all available pages before exploring further.

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:
ScopePathWhen to use
User-level~/.claude/mcp.jsonApply Aegis to all Claude Code sessions on this machine
Project-level.claude/mcp.jsonApply Aegis to a single repository

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
{
  "mcpServers": {
    "aegis_dep": {
      "transport": "sse",
      "url": "https://app.runaegis.co/sse?user_id=<USER_ID>&room_id=<ROOM_ID>&access_token=<ACCESS_TOKEN>&role=<ROLE>"
    }
  }
}
Replace each placeholder:
PlaceholderValue
<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
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.