aegis-mcp-server 0.1.17 → 0.1.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,24 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "WebFetch(domain:blog.modelcontextprotocol.io)",
5
+ "WebFetch(domain:raw.githubusercontent.com)",
6
+ "Bash(npm run *)",
7
+ "Bash(echo \"BUILD_EXIT=$?\")",
8
+ "Bash(node dist/index.js --version)",
9
+ "Bash(node dist/index.js --help)",
10
+ "Bash(node -e 'const s=require\\('\\\\''./server.json'\\\\''\\); console.log\\('\\\\''schema:'\\\\'', s['\\\\''$schema'\\\\'']\\); console.log\\('\\\\''version:'\\\\'', s.version, '\\\\''| pkg version:'\\\\'', s.packages[0].version\\);')",
11
+ "Bash(node -e \"const p=require\\('./package.json'\\); console.log\\('deps:', Object.keys\\(p.dependencies\\).join\\(', '\\)\\); console.log\\('self-dep present:', 'aegis-mcp-server' in p.dependencies\\);\")",
12
+ "Bash(npm audit *)",
13
+ "Bash(pkill -f \"dist/index.js\")",
14
+ "Bash(npm ls *)",
15
+ "Bash(node scripts/sync-server-json.mjs)",
16
+ "Bash(echo \"exit=$?\")",
17
+ "Bash(node scripts/sync-server-json.mjs --check)",
18
+ "Bash(node -e 'const fs=require\\(\"fs\"\\);const p=\"server.json\";const s=JSON.parse\\(fs.readFileSync\\(p\\)\\);s.version=\"0.0.0-test\";s.packages[0].version=\"0.0.0-test\";fs.writeFileSync\\(p,JSON.stringify\\(s,null,2\\)+\"\\\\n\"\\);console.log\\(\"injected 0.0.0-test\"\\);')",
19
+ "Bash(node -e 'const s=require\\(\"./server.json\"\\);const p=require\\(\"./package.json\"\\);console.log\\(\"pkg:\",p.version,\"| server:\",s.version,\"| pkg-entry:\",s.packages[0].version,\"| match:\",s.version===p.version&&s.packages[0].version===p.version\\);')",
20
+ "Bash(node -p \"require\\('./node_modules/@modelcontextprotocol/sdk/package.json'\\).version\")",
21
+ "Bash(node -e 'const p=require\\(\"./package.json\"\\);console.log\\(\"deps:\",Object.keys\\(p.dependencies\\).join\\(\", \"\\)\\);console.log\\(\"has overrides:\",\"overrides\" in p\\);console.log\\(\"scripts:\",Object.keys\\(p.scripts\\).join\\(\", \"\\)\\);')"
22
+ ]
23
+ }
24
+ }
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 MCP Contributors
3
+ Copyright (c) 2026 MCP Contributors
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,11 +1,22 @@
1
1
  # aegis-mcp-server
2
2
  <!-- mcp-name: io.github.cleburn/aegis-mcp -->
3
+
4
+ <p align="center">
5
+ <img src="https://img.shields.io/npm/v/aegis-mcp-server?style=flat&label=npm" alt="npm version" />
6
+ <img src="https://img.shields.io/badge/license-MIT-blue?style=flat" alt="License: MIT" />
7
+ <img src="https://img.shields.io/badge/MCP-Registry-purple?style=flat" alt="MCP Registry" />
8
+ </p>
9
+
3
10
  **MCP enforcement layer for the [Aegis](https://github.com/cleburn/aegis-spec) agent governance specification.**
4
11
 
5
- The spec writes the law. The CLI generates the law. This enforces the law.
12
+ Policy at the root. Enforcement at runtime. Accountability on every action.
6
13
 
7
14
  ## What It Does
8
15
 
16
+ <p align="center">
17
+ <img src="assets/Open-page.png" alt="Aegis Lifecycle Overview" width="800" />
18
+ </p>
19
+
9
20
  `aegis-mcp-server` is an MCP server that validates every agent action against your `.agentpolicy/` files **before** it happens. Path permissions, content scanning, role boundaries, quality gates — all enforced at runtime with zero token overhead to the agent.
10
21
 
11
22
  The agent never loads your governance files. The MCP server reads them into its own process memory and validates silently. The agent calls governed tools and gets back either a success or a blocked response with the specific reason.
@@ -91,6 +102,10 @@ Aegis MCP approach: the server loads policy into its own process memory. The age
91
102
 
92
103
  ## Enforcement
93
104
 
105
+ <p align="center">
106
+ <img src="assets/03-runtime.png" alt="Aegis Runtime Enforcement" width="800" />
107
+ </p>
108
+
94
109
  - **Governance boundaries** — `writable`, `read_only`, `forbidden` path lists
95
110
  - **Role scoping** — agents confined to their role's writable and readable paths
96
111
  - **Sensitive pattern detection** — content scanned against governance-defined regex patterns (content only, not path-based)
@@ -102,6 +117,10 @@ Aegis MCP approach: the server loads policy into its own process memory. The age
102
117
 
103
118
  ## Override Protocol
104
119
 
120
+ <p align="center">
121
+ <img src="assets/04-completion.png" alt="Aegis Completion" width="800" />
122
+ </p>
123
+
105
124
  When an action is blocked and the governance override behavior is `warn_confirm_and_log`:
106
125
 
107
126
  1. The blocked response includes an `override_token` and the specific policy violated
Binary file
Binary file
Binary file
Binary file
package/assets/icon.png CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aegis-mcp-server",
3
- "version": "0.1.17",
3
+ "version": "0.1.18",
4
4
  "description": "MCP enforcement layer for the Aegis agent governance specification",
5
5
  "type": "module",
6
6
  "bin": {
@@ -10,7 +10,9 @@
10
10
  "scripts": {
11
11
  "build": "tsc",
12
12
  "start": "node dist/index.js",
13
- "dev": "tsc --watch"
13
+ "dev": "tsc --watch",
14
+ "sync:server-json": "node scripts/sync-server-json.mjs",
15
+ "version": "node scripts/sync-server-json.mjs && git add server.json"
14
16
  },
15
17
  "keywords": [
16
18
  "mcp",
@@ -27,7 +29,6 @@
27
29
  },
28
30
  "dependencies": {
29
31
  "@modelcontextprotocol/sdk": "^1.12.0",
30
- "aegis-mcp-server": "^0.1.2",
31
32
  "chokidar": "^4.0.0",
32
33
  "minimatch": "^10.0.0",
33
34
  "zod": "^3.24.0"
@@ -0,0 +1,72 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * sync-server-json.mjs — keep server.json's version fields in lockstep with package.json.
4
+ *
5
+ * package.json is the single source of truth for the version. This copies that
6
+ * version into the MCP registry manifest (server.json): the top-level `version`
7
+ * and the `version` of the npm package entry. It runs automatically from the
8
+ * npm "version" lifecycle hook (see package.json), so `npm version <patch|minor|major>`
9
+ * updates server.json and stages it into the same version commit — the registry
10
+ * manifest can never silently drift from the published npm version.
11
+ *
12
+ * Usage:
13
+ * node scripts/sync-server-json.mjs Write: sync server.json to package.json's version.
14
+ * node scripts/sync-server-json.mjs --check Verify only: exit 1 if out of sync (no write).
15
+ */
16
+
17
+ import { readFileSync, writeFileSync } from 'node:fs';
18
+ import { fileURLToPath } from 'node:url';
19
+ import { dirname, join } from 'node:path';
20
+
21
+ const root = join(dirname(fileURLToPath(import.meta.url)), '..');
22
+ const pkgPath = join(root, 'package.json');
23
+ const serverPath = join(root, 'server.json');
24
+
25
+ const check = process.argv.includes('--check');
26
+
27
+ const pkg = JSON.parse(readFileSync(pkgPath, 'utf-8'));
28
+ const server = JSON.parse(readFileSync(serverPath, 'utf-8'));
29
+
30
+ const target = pkg.version;
31
+ const drift = [];
32
+
33
+ if (server.version !== target) {
34
+ drift.push(` version: ${server.version} -> ${target}`);
35
+ server.version = target;
36
+ }
37
+
38
+ let matchedPackage = false;
39
+ for (const p of server.packages ?? []) {
40
+ if (p.identifier === pkg.name) {
41
+ matchedPackage = true;
42
+ if (p.version !== target) {
43
+ drift.push(` packages["${p.identifier}"].version: ${p.version} -> ${target}`);
44
+ p.version = target;
45
+ }
46
+ }
47
+ }
48
+
49
+ if ((server.packages ?? []).length > 0 && !matchedPackage) {
50
+ // The manifest lists packages but none match the npm package name — likely a
51
+ // rename. Surface it loudly rather than silently leaving a package un-synced.
52
+ console.warn(
53
+ `[sync-server-json] WARNING: no package entry with identifier "${pkg.name}" found in server.json. ` +
54
+ `Package versions were NOT synced. Check that server.json's packages[].identifier matches package.json "name".`
55
+ );
56
+ }
57
+
58
+ if (drift.length === 0) {
59
+ console.log(`[sync-server-json] server.json already at ${target} — no change.`);
60
+ process.exit(0);
61
+ }
62
+
63
+ if (check) {
64
+ console.error(`[sync-server-json] DRIFT: server.json does not match package.json (${target}):`);
65
+ console.error(drift.join('\n'));
66
+ console.error(`Run \`npm run sync:server-json\` to fix.`);
67
+ process.exit(1);
68
+ }
69
+
70
+ writeFileSync(serverPath, JSON.stringify(server, null, 2) + '\n', 'utf-8');
71
+ console.log(`[sync-server-json] Synced server.json to ${target}:`);
72
+ console.log(drift.join('\n'));
package/server.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
- "$schema": "https://static.modelcontextprotocol.io/schemas/2025-09-16/server.schema.json",
2
+ "$schema": "https://static.modelcontextprotocol.io/schemas/2025-10-17/server.schema.json",
3
3
  "name": "io.github.cleburn/aegis-mcp",
4
4
  "description": "Runtime governance enforcement for AI agents. Zero token overhead.",
5
5
  "repository": {
6
6
  "url": "https://github.com/cleburn/aegis-mcp",
7
7
  "source": "github"
8
8
  },
9
- "version": "0.1.12",
9
+ "version": "0.1.18",
10
10
  "packages": [
11
11
  {
12
12
  "registryType": "npm",
13
13
  "registryBaseUrl": "https://registry.npmjs.org",
14
14
  "identifier": "aegis-mcp-server",
15
- "version": "0.1.12",
15
+ "version": "0.1.18",
16
16
  "transport": {
17
17
  "type": "stdio"
18
18
  }
package/assets/icon.svg DELETED
@@ -1,54 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" width="512" height="512">
2
- <defs>
3
- <linearGradient id="shieldGrad" x1="0%" y1="0%" x2="0%" y2="100%">
4
- <stop offset="0%" stop-color="#79c0ff"/>
5
- <stop offset="35%" stop-color="#58a6ff"/>
6
- <stop offset="100%" stop-color="#1f6feb"/>
7
- </linearGradient>
8
- <clipPath id="roundedBg">
9
- <rect width="512" height="512" rx="80"/>
10
- </clipPath>
11
- </defs>
12
-
13
- <!-- Rounded rectangle background -->
14
- <rect width="512" height="512" rx="80" fill="#0d1117"/>
15
-
16
- <!-- Outer shield (blue filled) -->
17
- <path d="
18
- M 256 56
19
- L 120 116
20
- L 120 248
21
- C 120 348 178 432 256 472
22
- C 334 432 392 348 392 248
23
- L 392 116
24
- Z
25
- " fill="url(#shieldGrad)"/>
26
-
27
- <!-- Inner shield cutout (dark) -->
28
- <path d="
29
- M 256 96
30
- L 152 142
31
- L 152 248
32
- C 152 332 200 404 256 438
33
- C 312 404 360 332 360 248
34
- L 360 142
35
- Z
36
- " fill="#0d1117" opacity="0.87"/>
37
-
38
- <!-- Policy line 1 (top, faintest) -->
39
- <line x1="196" y1="212" x2="316" y2="212"
40
- stroke="#58a6ff" stroke-width="9" stroke-linecap="round" opacity="0.45"/>
41
-
42
- <!-- Policy line 2 (middle) -->
43
- <line x1="196" y1="252" x2="316" y2="252"
44
- stroke="#58a6ff" stroke-width="9" stroke-linecap="round" opacity="0.7"/>
45
-
46
- <!-- Policy line 3 (shorter, full) -->
47
- <line x1="196" y1="292" x2="288" y2="292"
48
- stroke="#58a6ff" stroke-width="9" stroke-linecap="round" opacity="1.0"/>
49
-
50
- <!-- Checkmark -->
51
- <polyline points="270,332 290,352 330,304"
52
- fill="none" stroke="#58a6ff" stroke-width="10"
53
- stroke-linecap="round" stroke-linejoin="round"/>
54
- </svg>