Skip to content

The Aegis MCP server

The Aegis MCP server connects an AI client, such as Claude Code or Cursor, to your organisation's Aegis. You ask in plain words and the model reads and changes your context and configuration, variables and repositories instead of you using the admin UI.

The server is in alpha. Its tools may change between releases.

How it works

The server runs on your machine. Your AI client starts it, and it calls Aegis with an API token. Aegis checks every call against the token, so the server can do what the token can do in the admin UI, no more. Every change shows in Activity under your name.

A token works at editor level at most, so the server cannot manage people, permissions or settings.

Install

First make an API token. A developer API key (starting aeg_) won't work.

On macOS and Linux:

curl -fsSL https://github.com/Krathos-systems/aegis-mcp/releases/latest/download/install.sh | sh

On Windows, in PowerShell:

irm https://github.com/Krathos-systems/aegis-mcp/releases/latest/download/install.ps1 | iex

The installer checks the download against the release's checksums and needs no administrator rights. It then runs aegis-mcp setup, which:

  1. asks for your organisation's Aegis address and your token
  2. checks them with Aegis
  3. saves them in a file only you can read
  4. adds the server to Claude Code if you have it, and prints the configuration for any other MCP client

Run aegis-mcp setup again whenever you have a new token.

To run the server in Docker instead, see the project's README.

Examples

Onboarding a new repository and tuning it for each role

You ask:

Add git@github.com:acme/payments-api.git to Aegis as payments-api and bring in its CLAUDE.md and .claude/ folder. Backend and frontend engineers both work in it, so give each role only what it needs.

The model:

  1. registers the repository and scans its existing files
  2. keeps what is true for everyone in the repository (build and test commands, layout, traps) in the repository's own layer
  3. moves what only one role needs into that role's layer for this repository, and settings into settings.json rather than prose
  4. drops lines that repeat your global, team or role files, or that the code already makes obvious
  5. shows the CLAUDE.md each role will receive, with its length, and waits for your go-ahead before writing anything

The add-repo prompt starts the same task.

Sorting existing context into the right layers

You ask:

Our global CLAUDE.md has grown to 300 lines. Sort it into the right layers and keep what every developer receives short.

The model reads your global file and the team, role and repository files it lands beside, then proposes where each part belongs:

  • rules for every developer everywhere, such as secrets and commit conventions, stay global
  • how a team works (reviews, tickets, releases) moves to that team
  • how a job function works moves to that role
  • facts about one repository move to that repository
  • a procedure used only for some tasks becomes a skill
  • anything a setting can enforce becomes a permission or setting
  • repeats and things the code already shows are cut

It shows the plan file by file, with sizes before and after, and writes nothing until you agree. The health-check prompt runs the same review without a request.

Adding one rule

You ask:

Everyone on the payments team puts the ticket number in their pull request titles.

The model sees that this is about how one team works, checks that no other layer already says it, and proposes one line for the payments team's CLAUDE.md. The add-guidance prompt starts the same task.

Read-only

To let the model look but not change anything, limit the token to collaborator when you make it. The server then offers only the tools that read.

What it can do

Tool Does
aegis_whoami Your account, your permission levels, and the Aegis version
aegis_list_files, aegis_read_file List and read files in Context & Config and All files
aegis_create_file, aegis_update_file, aegis_delete_file Create, change and delete those files
aegis_list_repos Registered repositories
aegis_register_repo, aegis_move_repo, aegis_unregister_repo Register repositories and change their remotes
aegis_scan_repo_import, aegis_import_repo Bring a repository's existing context and configuration into Aegis
aegis_list_variables, aegis_create_variable, aegis_update_variable, aegis_delete_variable Manage variables. A secret's value can be set but never read back
aegis_preview_role What one role receives in one repository
aegis_compose_context A repository's CLAUDE.md as one developer receives it, with line counts and repeated lines. It can check a draft before it's saved
aegis_list_activity, aegis_show_change Who changed what, and the diff of one change

The model checks what developers will receive before it changes a CLAUDE.md, and shows you its plan before it writes anything.

If someone else changed a file since the model read it, Aegis refuses the change and the model reads the file again.

Prompts

Prompts start a whole task by name. In Claude Code, type /mcp__aegis__<name>.

Prompt Does
add-repo Brings a repository's existing instructions into Aegis, split across the right layers instead of copied as one long file
add-guidance Finds the layer one rule belongs in, or that it needs no line, and adds it without repeating another layer
health-check Finds what developers receive that is too long, repeated or in the wrong layer, and suggests fixes. It applies only the ones you pick