iso27001-mcp 0.8.2 → 0.8.4
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.
- package/README.md +326 -182
- package/dist/index.js +616 -75
- package/package.json +16 -5
package/README.md
CHANGED
|
@@ -1,160 +1,209 @@
|
|
|
1
1
|
# iso27001-mcp
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Turn Claude into an ISO 27001 compliance assistant** — controls, risk register, policies, evidence tracking, SoA generation, and full audit workflows in one local encrypted MCP server.
|
|
4
|
+
|
|
5
|
+
[](https://socket.dev/npm/package/iso27001-mcp/overview/0.8.4)
|
|
4
6
|
[](https://npmjs.com/package/iso27001-mcp)
|
|
5
7
|
[](https://npmjs.com/package/iso27001-mcp)
|
|
6
|
-
[](https://github.com/Sushegaad/MCP-Server-for-ISO27001/actions/workflows/ci.yml)
|
|
9
|
+
[](LICENSE)
|
|
10
|
+
[](https://www.iso.org/standard/27001)
|
|
7
11
|
|
|
8
12
|
**[▶ Live Interactive Demo](https://sushegaad.github.io/MCP-Server-for-ISO27001/)**
|
|
9
13
|
|
|
10
|
-
|
|
14
|
+
---
|
|
11
15
|
|
|
12
|
-
|
|
13
|
-
Claude ──MCP──► iso27001-mcp ──► encrypted SQLite (isms.db)
|
|
14
|
-
│
|
|
15
|
-
├── 93 ISO 27001:2022 controls (seeded)
|
|
16
|
-
├── 114 ISO 27001:2013 controls (seeded)
|
|
17
|
-
├── Gap assessments & remediation roadmaps
|
|
18
|
-
├── Risk register & treatment plans
|
|
19
|
-
├── Policy & procedure documents (Mustache templates)
|
|
20
|
-
├── Statement of Applicability
|
|
21
|
-
├── Audit findings & corrective actions
|
|
22
|
-
└── Evidence tracking (+ Jira / GitHub)
|
|
23
|
-
```
|
|
16
|
+
## Why this exists
|
|
24
17
|
|
|
25
|
-
|
|
18
|
+
ISO 27001 compliance work is typically scattered across spreadsheets, Word docs, ticketing systems, and shared drives. Security teams and consultants spend more time chasing evidence and reformatting documents than actually improving security posture.
|
|
26
19
|
|
|
27
|
-
|
|
20
|
+
**`iso27001-mcp` solves this by giving Claude a live, stateful ISMS** — all 93 ISO 27001:2022 controls seeded and ready, a real risk register, policy and procedure generators, evidence tracking, audit workflows, and a Statement of Applicability, backed by an encrypted local database that never leaves your machine.
|
|
28
21
|
|
|
29
|
-
|
|
30
|
-
- [Use Cases](#use-cases)
|
|
31
|
-
- [Installation](#installation)
|
|
32
|
-
- [Configuration](#configuration)
|
|
33
|
-
- [Connecting to Claude](#connecting-to-claude)
|
|
34
|
-
- [Tools Reference](#tools-reference)
|
|
35
|
-
- [Group 1 — Control Registry](#group-1--control-registry-minimum-role-viewer)
|
|
36
|
-
- [Group 2 — Gap Analysis](#group-2--gap-analysis-reads-viewer-writes-analyst)
|
|
37
|
-
- [Group 3 — Risk Management](#group-3--risk-management-reads-viewer-writes-analyst)
|
|
38
|
-
- [Group 4 — Policy Management](#group-4--policy-management-reads-viewer-create-analyst-update-admin)
|
|
39
|
-
- [Group 5 — Statement of Applicability](#group-5--statement-of-applicability-minimum-role-analyst)
|
|
40
|
-
- [Group 6 — Audit Management](#group-6--audit-management-reads-viewer-writes-admin)
|
|
41
|
-
- [Group 7 — Evidence Tracking](#group-7--evidence-tracking-reads-viewer-writes-analyst)
|
|
42
|
-
- [Group 8 — Server Info](#group-8--server-info-minimum-role-viewer)
|
|
43
|
-
- [Group 9 — Admin & Key Management](#group-9--admin--key-management-minimum-role-admin)
|
|
44
|
-
- [Group 10 — Organisation Profile](#group-10--organisation-profile-minimum-role-admin-for-writes-viewer-for-reads)
|
|
45
|
-
- [Group 11 — Procedure Management](#group-11--procedure-management-reads-viewer-createexport-analyst-update-admin)
|
|
46
|
-
- [Group 12 — Management Review](#group-12--management-review-reads-viewer-writes-admin--clause-93)
|
|
47
|
-
- [Group 13 — Improvement Plan](#group-13--improvement-plan-reads-viewer-writes-analyst--clause-101)
|
|
48
|
-
- [Group 14 — Evidence Templates](#group-14--evidence-templates-reads-viewer-generate-analyst)
|
|
49
|
-
- [MCP Resources](#mcp-resources)
|
|
50
|
-
- [Architecture](#architecture)
|
|
51
|
-
- [Modes](#modes)
|
|
52
|
-
- [Integrations](#integrations)
|
|
53
|
-
- [Sample Outputs](#sample-outputs)
|
|
54
|
-
- [Development](#development)
|
|
55
|
-
- [Security](#security)
|
|
56
|
-
- [Trust Center](https://github.com/Sushegaad/MCP-Server-for-ISO27001/tree/main/docs/security/) — threat model · hardening guide · data flow · supply chain · audit log integrity
|
|
22
|
+
The difference from generating static documents: Claude can *query, reason, and update* across your entire ISMS in a single conversation. Ask it to run a gap assessment, identify which open risks are linked to unimplemented controls, generate the policies that close those gaps, and produce a remediation roadmap — all without switching tools.
|
|
57
23
|
|
|
58
|
-
|
|
24
|
+
**Who it's for:** Security teams · Compliance consultants · GRC engineers · Startups preparing for ISO 27001 · Internal audit functions
|
|
59
25
|
|
|
60
|
-
|
|
26
|
+
---
|
|
61
27
|
|
|
62
|
-
|
|
28
|
+
## What Claude can do with it
|
|
29
|
+
|
|
30
|
+
| Capability | Example prompt |
|
|
31
|
+
|------------|----------------|
|
|
32
|
+
| **Gap assessment** | *"Run an ISO 27001:2022 gap assessment for a 50-person SaaS company."* |
|
|
33
|
+
| **Risk register** | *"Create a risk register for a startup using AWS, GitHub, Slack, and Google Workspace."* |
|
|
34
|
+
| **Statement of Applicability** | *"Generate a Statement of Applicability for all 93 ISO 27001:2022 controls."* |
|
|
35
|
+
| **Policy generation** | *"Create an Access Control Policy mapped to ISO 27001 controls."* |
|
|
36
|
+
| **Procedure generation** | *"Generate an Incident Handling Procedure with GDPR breach notification triggers."* |
|
|
37
|
+
| **Internal audit** | *"Plan an internal audit for clause 9.1 — Performance Evaluation."* |
|
|
38
|
+
| **Corrective actions** | *"List open audit findings and suggest corrective actions."* |
|
|
39
|
+
| **Evidence tracking** | *"Show me all implemented controls with no current evidence."* |
|
|
40
|
+
| **Remediation roadmap** | *"Generate a 26-week remediation roadmap grouped by risk level."* |
|
|
41
|
+
| **Management review** | *"Prepare agenda items for our Clause 9.3 management review."* |
|
|
63
42
|
|
|
64
|
-
|
|
43
|
+
---
|
|
65
44
|
|
|
66
|
-
|
|
45
|
+
## Quick Start
|
|
67
46
|
|
|
68
|
-
|
|
69
|
-
node --version # should print v20.x.x or higher
|
|
70
|
-
```
|
|
47
|
+
### Prerequisites
|
|
71
48
|
|
|
72
|
-
- **
|
|
49
|
+
- **Node.js 20.11.0+** — [nodejs.org](https://nodejs.org) or [nvm](https://github.com/nvm-sh/nvm) / [Volta](https://volta.sh)
|
|
50
|
+
- **Build tools** (for the encrypted SQLite native module):
|
|
73
51
|
- **macOS:** `xcode-select --install`
|
|
74
52
|
- **Ubuntu/Debian:** `sudo apt-get install build-essential python3`
|
|
75
|
-
- **Windows:**
|
|
53
|
+
- **Windows:** [Visual Studio Build Tools](https://visualstudio.microsoft.com/downloads/) → "Desktop development with C++"
|
|
76
54
|
|
|
77
|
-
###
|
|
55
|
+
### Four commands to get running
|
|
78
56
|
|
|
79
57
|
```bash
|
|
80
|
-
npm install -g iso27001-mcp
|
|
58
|
+
npm install -g iso27001-mcp # 1. install globally
|
|
59
|
+
iso27001-mcp init # 2. interactive setup wizard
|
|
60
|
+
iso27001-mcp keygen --label "me" --role admin # 3. generate admin API key (if not already done by init)
|
|
61
|
+
iso27001-mcp doctor # 4. verify everything is working
|
|
81
62
|
```
|
|
82
63
|
|
|
83
|
-
|
|
64
|
+
After running `iso27001-mcp doctor` you should see:
|
|
84
65
|
|
|
85
|
-
|
|
66
|
+
```
|
|
67
|
+
iso27001-mcp — health check
|
|
68
|
+
────────────────────────────────────────────────────────
|
|
69
|
+
✅ DB_ENCRYPTION_KEY set (64 hex chars)
|
|
70
|
+
✅ HMAC_SECRET set (64 hex chars)
|
|
71
|
+
✅ MCP_API_KEY set (starts with iso27001_)
|
|
72
|
+
✅ Database file /Users/you/.iso27001/isms.db
|
|
73
|
+
✅ Database accessible opened and queried successfully
|
|
74
|
+
✅ Migrations 6/6 applied
|
|
75
|
+
✅ Controls seeded 93 ISO 27001:2022 controls
|
|
76
|
+
✅ Active API key 1 active key found
|
|
77
|
+
✅ Claude Desktop config /Users/you/.../claude_desktop_config.json
|
|
78
|
+
✅ iso27001-mcp entry present in mcpServers
|
|
79
|
+
────────────────────────────────────────────────────────
|
|
80
|
+
All 10 checks passed. Restart Claude Desktop if you just ran init.
|
|
81
|
+
```
|
|
86
82
|
|
|
87
|
-
|
|
83
|
+
Then **restart Claude Desktop** (quit fully and reopen). You should see 63 tools in the tools panel.
|
|
88
84
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
85
|
+
### Five prompts to try first
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
"Use get_server_info to verify the server is running."
|
|
89
|
+
"Run an ISO 27001 gap assessment for a 50-person SaaS company."
|
|
90
|
+
"Create a risk register for a startup using AWS, GitHub, Slack, and Google Workspace."
|
|
91
|
+
"Generate a Statement of Applicability for ISO 27001:2022."
|
|
92
|
+
"Create an Access Control Policy mapped to ISO 27001 controls."
|
|
92
93
|
```
|
|
93
94
|
|
|
94
|
-
|
|
95
|
+
---
|
|
95
96
|
|
|
96
|
-
|
|
97
|
+
## Tool Categories
|
|
98
|
+
|
|
99
|
+
63 tools across 14 groups. All require an API key; minimum role is shown.
|
|
100
|
+
|
|
101
|
+
| Group | Tools | Min. role | What it does |
|
|
102
|
+
|-------|-------|-----------|--------------|
|
|
103
|
+
| **Control Registry** | 7 | viewer | Search, filter, and compare ISO 27001:2022 and 2013 controls; browse clause requirements |
|
|
104
|
+
| **Gap Analysis** | 7 | viewer / analyst | Create and track gap assessments; export gap reports; generate remediation roadmaps |
|
|
105
|
+
| **Risk Management** | 8 | viewer / analyst | Risk register with likelihood × impact scoring, treatment plans, and heat-map summaries |
|
|
106
|
+
| **Policy Management** | 4 | viewer / analyst / admin | Generate, version, and export policies from 12 Mustache templates |
|
|
107
|
+
| **Statement of Applicability** | 3 | analyst | Build and export SoA from a gap assessment; all 93 controls with applicability decisions |
|
|
108
|
+
| **Audit Management** | 5 | viewer / admin | Plan audits, record findings (NCs, OFIs), raise CARs, and close with effectiveness check |
|
|
109
|
+
| **Evidence Tracking** | 5 | viewer / analyst | Register evidence artefacts, spot gaps, link to Jira / GitHub issues |
|
|
110
|
+
| **Server Info** | 1 | viewer | Server version, tool count, capability summary |
|
|
111
|
+
| **Admin & Key Management** | 6 | admin | Generate / revoke API keys, query the HMAC audit log |
|
|
112
|
+
| **Organisation Profile** | 2 | admin (write) / viewer (read) | Set org name, scope, and defaults used by all templates |
|
|
113
|
+
| **Procedure Management** | 5 | viewer / analyst / admin | Generate, version, and export procedures from 12 Mustache templates |
|
|
114
|
+
| **Management Review** | 6 | viewer / admin | Full Clause 9.3 lifecycle — inputs, outputs, completion (enforces all 7 required input categories) |
|
|
115
|
+
| **Improvement Plan** | 4 | viewer / analyst | Clause 10.1 improvement opportunities — track, link, and report |
|
|
116
|
+
| **Evidence Templates** | 3 | viewer / analyst | Generate Mustache-rendered evidence documents; dual-write to evidence and generated_evidence tables |
|
|
97
117
|
|
|
98
|
-
|
|
118
|
+
---
|
|
99
119
|
|
|
100
|
-
|
|
101
|
-
export HMAC_SECRET=<your_hmac_secret>
|
|
102
|
-
export DB_ENCRYPTION_KEY=<your_db_key>
|
|
103
|
-
export DB_PATH=$HOME/.iso27001/isms.db
|
|
120
|
+
## Templates
|
|
104
121
|
|
|
105
|
-
|
|
106
|
-
```
|
|
122
|
+
The server ships 30 Mustache templates that Claude renders on demand with your organisation's name, scope, and control references automatically injected.
|
|
107
123
|
|
|
108
|
-
|
|
124
|
+
### ISO 27001 Policy Templates
|
|
109
125
|
|
|
110
|
-
|
|
126
|
+
Generate any of these with a single Claude prompt:
|
|
111
127
|
|
|
112
|
-
|
|
128
|
+
`information_security` · `access_control` · `risk_management` · `asset_management` · `incident_response` · `business_continuity` · `supplier_security` · `cryptography` · `physical_security` · `acceptable_use` · `data_classification` · `secure_development`
|
|
113
129
|
|
|
114
|
-
|
|
130
|
+
### ISO 27001 Procedure Templates
|
|
115
131
|
|
|
116
|
-
|
|
117
|
-
- **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
|
|
132
|
+
`incident_handling` · `access_provisioning` · `asset_onboarding_offboarding` · `audit_log_review` · `backup_restore` · `bcp_testing` · `change_management` · `cryptographic_key_management` · `data_classification_handling` · `secure_development_workflow` · `supplier_onboarding` · `vulnerability_management`
|
|
118
133
|
|
|
119
|
-
|
|
134
|
+
### Evidence Document Templates
|
|
120
135
|
|
|
121
|
-
|
|
122
|
-
{
|
|
123
|
-
"mcpServers": {
|
|
124
|
-
"iso27001": {
|
|
125
|
-
"command": "iso27001-mcp",
|
|
126
|
-
"env": {
|
|
127
|
-
"HMAC_SECRET": "your_hmac_secret",
|
|
128
|
-
"DB_ENCRYPTION_KEY": "your_db_encryption_key",
|
|
129
|
-
"MCP_API_KEY": "iso27001_your_api_key_here",
|
|
130
|
-
"DB_PATH": "/Users/you/.iso27001/isms.db"
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
```
|
|
136
|
+
Pre-structured evidence documents for auditor submissions: `risk_assessment` · `internal_audit` · `management_review` · `access_review` · `incident_review` · `bcp_test`
|
|
136
137
|
|
|
137
|
-
|
|
138
|
+
### Sample Outputs
|
|
138
139
|
|
|
139
|
-
|
|
140
|
+
The [`samples/`](samples/) directory contains auditor-ready example outputs for a fictitious organisation ("Acme Financial Services Ltd") — a full gap assessment, remediation roadmap, risk register CSV, SoA CSV, access control policy, incident handling procedure, internal audit report, corrective action records, and evidence package. See [Sample Outputs](#sample-outputs) for the full index.
|
|
140
141
|
|
|
141
|
-
|
|
142
|
+
> **ISO 27001 keywords:** ISO 27001 Statement of Applicability generator · ISO 27001 risk register template · ISO 27001 gap assessment tool · ISO 27001 audit evidence tracker · ISO 27001 MCP server · Claude ISO 27001 compliance assistant · AI GRC tool open source
|
|
142
143
|
|
|
143
|
-
|
|
144
|
+
---
|
|
144
145
|
|
|
145
|
-
|
|
146
|
+
## Security Model
|
|
146
147
|
|
|
147
|
-
###
|
|
148
|
+
### Role-Based Access Control (RBAC)
|
|
148
149
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
150
|
+
Three roles with strict hierarchy. A key can only call tools at or below its assigned role level.
|
|
151
|
+
|
|
152
|
+
| Capability | Viewer | Analyst | Admin |
|
|
153
|
+
|------------|--------|---------|-------|
|
|
154
|
+
| Read controls, clauses, version mappings | ✅ | ✅ | ✅ |
|
|
155
|
+
| Read gap assessments, risks, policies, audits, evidence | ✅ | ✅ | ✅ |
|
|
156
|
+
| Create / update gap assessments and control statuses | — | ✅ | ✅ |
|
|
157
|
+
| Create and manage risks and treatment plans | — | ✅ | ✅ |
|
|
158
|
+
| Generate policies and procedures | — | ✅ | ✅ |
|
|
159
|
+
| Create and export Statements of Applicability | — | ✅ | ✅ |
|
|
160
|
+
| Track and link evidence artefacts | — | ✅ | ✅ |
|
|
161
|
+
| Record and track improvement opportunities | — | ✅ | ✅ |
|
|
162
|
+
| Plan and close internal audits; raise CARs | — | — | ✅ |
|
|
163
|
+
| Set organisation profile | — | — | ✅ |
|
|
164
|
+
| Run management reviews (Clause 9.3) | — | — | ✅ |
|
|
165
|
+
| View and query the audit log | — | — | ✅ |
|
|
166
|
+
| Generate and revoke API keys | — | — | ✅ |
|
|
167
|
+
|
|
168
|
+
**Tool counts:** Viewer — 31 tools · Analyst — 49 tools · Admin — 63 tools
|
|
169
|
+
|
|
170
|
+
### What never leaves your machine
|
|
171
|
+
|
|
172
|
+
In `local` mode (stdio, the default), no data leaves the machine. The encrypted SQLite database, the `.env` secrets file, and the append-only audit log are all stored locally. There is no telemetry, no cloud sync, and no outbound network calls — unless you explicitly configure the optional Jira or GitHub integrations.
|
|
173
|
+
|
|
174
|
+
For the full security profile — threat model, hardening guide, supply chain attestation, and audit log integrity verification — see the **[Trust Center](https://github.com/Sushegaad/MCP-Server-for-ISO27001/tree/main/docs/security/)**.
|
|
175
|
+
|
|
176
|
+
### Encryption and audit trail summary
|
|
177
|
+
|
|
178
|
+
- **Database** — AES-256 encrypted SQLite via `better-sqlite3-multiple-ciphers`
|
|
179
|
+
- **API keys** — HMAC-SHA256 hashed; raw key printed once and never stored
|
|
180
|
+
- **Audit log** — HMAC-SHA256 hash chain; every row linked to its predecessor — insertion, deletion, or reordering is detectable
|
|
181
|
+
- **Prompt injection** — free-text fields sanitised before passing to any handler
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## Table of Contents
|
|
186
|
+
|
|
187
|
+
- [Why this exists](#why-this-exists)
|
|
188
|
+
- [What Claude can do with it](#what-claude-can-do-with-it)
|
|
189
|
+
- [Quick Start](#quick-start)
|
|
190
|
+
- [Tool Categories](#tool-categories)
|
|
191
|
+
- [Templates](#templates)
|
|
192
|
+
- [Security Model](#security-model)
|
|
193
|
+
- [Use Cases](#use-cases)
|
|
194
|
+
- [Installation](#installation)
|
|
195
|
+
- [Connecting to Claude](#connecting-to-claude)
|
|
196
|
+
- [Advanced / Manual Setup](#advanced--manual-setup)
|
|
197
|
+
- [Tools Reference](#tools-reference)
|
|
198
|
+
- [MCP Resources](#mcp-resources)
|
|
199
|
+
- [Architecture](#architecture)
|
|
200
|
+
- [Modes](#modes)
|
|
201
|
+
- [Sample Outputs](#sample-outputs)
|
|
202
|
+
- [Integrations](#integrations)
|
|
203
|
+
- [Roadmap](#roadmap)
|
|
204
|
+
- [Development](#development)
|
|
205
|
+
- [Contributing](#contributing)
|
|
206
|
+
- [Security](#security)
|
|
158
207
|
|
|
159
208
|
---
|
|
160
209
|
|
|
@@ -271,84 +320,41 @@ npm install -g iso27001-mcp
|
|
|
271
320
|
|
|
272
321
|
The `iso27001-mcp` command is now available globally. The encrypted SQLite module (`better-sqlite3-multiple-ciphers`) downloads a prebuilt binary on supported platforms; it compiles from source if none is available.
|
|
273
322
|
|
|
274
|
-
|
|
323
|
+
### Step 2 — Run the setup wizard
|
|
275
324
|
|
|
276
325
|
```bash
|
|
277
|
-
|
|
278
|
-
cd iso27001-mcp
|
|
279
|
-
npm install
|
|
280
|
-
npm run build
|
|
281
|
-
# Use `node dist/index.js` instead of `iso27001-mcp` in all commands below
|
|
326
|
+
iso27001-mcp init
|
|
282
327
|
```
|
|
283
328
|
|
|
284
|
-
|
|
329
|
+
The wizard handles everything in one guided session — no `openssl` required:
|
|
285
330
|
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
331
|
+
- Generates `DB_ENCRYPTION_KEY` and `HMAC_SECRET` (AES-256 / HMAC-SHA256, 64 hex chars each)
|
|
332
|
+
- Writes a `~/.iso27001/.env` file with mode `600`
|
|
333
|
+
- Creates and seeds the encrypted SQLite database with all 93 ISO 27001:2022 controls
|
|
334
|
+
- Generates an admin API key
|
|
335
|
+
- Detects your Claude Desktop config and offers to add the `iso27001-mcp` entry automatically
|
|
289
336
|
|
|
290
|
-
|
|
337
|
+
### Step 3 — Verify
|
|
291
338
|
|
|
292
339
|
```bash
|
|
293
|
-
|
|
294
|
-
openssl rand -hex 32 # → paste into HMAC_SECRET
|
|
295
|
-
|
|
296
|
-
# Generate a 32-byte AES-256 database encryption key
|
|
297
|
-
openssl rand -hex 32 # → paste into DB_ENCRYPTION_KEY
|
|
340
|
+
iso27001-mcp doctor
|
|
298
341
|
```
|
|
299
342
|
|
|
300
|
-
|
|
343
|
+
Runs 10 health checks and prints `✅ / ❌ / --` for each. All green means Claude Desktop is ready.
|
|
301
344
|
|
|
302
|
-
|
|
303
|
-
|----------|----------|---------|-------------|
|
|
304
|
-
| `HMAC_SECRET` | ✅ | — | 32-byte hex secret for HMAC-signing API keys |
|
|
305
|
-
| `DB_ENCRYPTION_KEY` | ✅ | — | 32-byte hex key for AES-256 SQLite encryption |
|
|
306
|
-
| `DB_PATH` | | `./isms.db` | Path to the encrypted database file |
|
|
307
|
-
| `AUDIT_LOG_PATH` | | `./audit.jsonl` | Path for the append-only JSON-L audit log (`.jsonl` or `.log` only) |
|
|
308
|
-
| `RATE_LIMIT_RPM` | | `500` | Tool calls per minute per API key |
|
|
309
|
-
| `SESSION_TTL_HOURS` | | `4` | SSE session TTL (hosted/team modes) |
|
|
310
|
-
| `SSE_PORT` | | `3000` | Port for the SSE server (hosted/team modes) |
|
|
311
|
-
| `BEHIND_TLS_PROXY` | | `false` | Set `true` when behind nginx/Caddy in production |
|
|
312
|
-
| `CORS_ORIGIN` | | `http://localhost` (dev) / `https://claude.ai` (prod) | Allowed CORS origin for the SSE server — never set to `*` |
|
|
313
|
-
| `JIRA_BASE_URL` | | — | e.g. `https://your-org.atlassian.net` |
|
|
314
|
-
| `JIRA_API_TOKEN` | | — | Jira API token for the integration |
|
|
315
|
-
| `JIRA_PROJECT_KEY` | | — | e.g. `SEC` |
|
|
316
|
-
| `JIRA_USER_EMAIL` | | — | Email address associated with the Jira API token |
|
|
317
|
-
| `GITHUB_TOKEN` | | — | GitHub personal access token (scope: `issues:write`) |
|
|
318
|
-
| `GITHUB_REPO` | | — | e.g. `your-org/your-repo` |
|
|
345
|
+
### Step 4 — Restart Claude Desktop
|
|
319
346
|
|
|
320
|
-
|
|
347
|
+
Quit the app fully and reopen it. The ISO 27001 tools will appear in the tools panel.
|
|
321
348
|
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
```bash
|
|
325
|
-
# Viewer — read-only access to 25 tools
|
|
326
|
-
iso27001-mcp keygen --label "Alice" --role viewer
|
|
327
|
-
|
|
328
|
-
# Analyst — read + write for gap/risk/policy/procedure/evidence tools (49 tools)
|
|
329
|
-
iso27001-mcp keygen --label "Bob" --role analyst --expires 90d
|
|
330
|
-
|
|
331
|
-
# Admin — all 63 tools including audit log and key management
|
|
332
|
-
iso27001-mcp keygen --label "CISO" --role admin --expires 1y
|
|
333
|
-
```
|
|
334
|
-
|
|
335
|
-
The raw key is printed **once** and never stored in plaintext. Save it immediately.
|
|
336
|
-
|
|
337
|
-
```bash
|
|
338
|
-
# List all keys
|
|
339
|
-
iso27001-mcp keys list
|
|
340
|
-
|
|
341
|
-
# Revoke a key immediately
|
|
342
|
-
iso27001-mcp keys revoke --label "Alice"
|
|
343
|
-
```
|
|
349
|
+
> **Tip:** Ask Claude `"Use get_server_info to verify the server is running"` to confirm the connection.
|
|
344
350
|
|
|
345
351
|
---
|
|
346
352
|
|
|
347
353
|
## Connecting to Claude
|
|
348
354
|
|
|
349
|
-
### Claude Desktop
|
|
355
|
+
### Claude Desktop (automatic via `init`)
|
|
350
356
|
|
|
351
|
-
|
|
357
|
+
`iso27001-mcp init` writes the following entry into `claude_desktop_config.json` automatically. You can also add or update it manually:
|
|
352
358
|
|
|
353
359
|
**macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
354
360
|
**Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
|
|
@@ -356,39 +362,114 @@ Add the server to your Claude Desktop MCP configuration file:
|
|
|
356
362
|
```json
|
|
357
363
|
{
|
|
358
364
|
"mcpServers": {
|
|
359
|
-
"iso27001": {
|
|
365
|
+
"iso27001-mcp": {
|
|
360
366
|
"command": "iso27001-mcp",
|
|
361
367
|
"env": {
|
|
362
|
-
"
|
|
363
|
-
"
|
|
364
|
-
"MCP_API_KEY": "
|
|
365
|
-
"DB_PATH": "/Users/you/.iso27001/isms.db"
|
|
368
|
+
"DB_ENCRYPTION_KEY": "<generated by init>",
|
|
369
|
+
"HMAC_SECRET": "<generated by init>",
|
|
370
|
+
"MCP_API_KEY": "<generated by init>",
|
|
371
|
+
"DB_PATH": "/Users/you/.iso27001/isms.db",
|
|
372
|
+
"AUDIT_LOG_PATH": "/Users/you/.iso27001/audit.jsonl"
|
|
366
373
|
}
|
|
367
374
|
}
|
|
368
375
|
}
|
|
369
376
|
}
|
|
370
377
|
```
|
|
371
378
|
|
|
372
|
-
Restart Claude Desktop. The ISO 27001 tools will appear in the tools panel.
|
|
373
|
-
|
|
374
|
-
> **Tip:** Store your `isms.db` in a stable location like `~/.iso27001/isms.db` so it persists across upgrades.
|
|
375
|
-
|
|
376
379
|
### Claude Code
|
|
377
380
|
|
|
378
381
|
```bash
|
|
379
382
|
# Add to your project's MCP config
|
|
380
|
-
claude mcp add iso27001 iso27001-mcp
|
|
383
|
+
claude mcp add iso27001-mcp iso27001-mcp
|
|
381
384
|
```
|
|
382
385
|
|
|
383
386
|
Then set the required env vars in your shell or `.env`:
|
|
384
387
|
|
|
385
388
|
```bash
|
|
386
|
-
export HMAC_SECRET=your_hmac_secret
|
|
387
389
|
export DB_ENCRYPTION_KEY=your_db_encryption_key
|
|
390
|
+
export HMAC_SECRET=your_hmac_secret
|
|
388
391
|
export MCP_API_KEY=iso27001_your_key_here
|
|
389
392
|
export DB_PATH=$HOME/.iso27001/isms.db
|
|
390
393
|
```
|
|
391
394
|
|
|
395
|
+
### Managing API Keys
|
|
396
|
+
|
|
397
|
+
```bash
|
|
398
|
+
# Generate additional keys for team members
|
|
399
|
+
iso27001-mcp keygen --label "Alice" --role viewer # read-only, 31 tools
|
|
400
|
+
iso27001-mcp keygen --label "Bob" --role analyst --expires 90d # 49 tools
|
|
401
|
+
iso27001-mcp keygen --label "CISO" --role admin --expires 1y # all 63 tools
|
|
402
|
+
|
|
403
|
+
# List all keys
|
|
404
|
+
iso27001-mcp keys list
|
|
405
|
+
|
|
406
|
+
# Revoke a key immediately
|
|
407
|
+
iso27001-mcp keys revoke --label "Alice"
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
The raw key is printed **once** and never stored in plaintext. Save it immediately.
|
|
411
|
+
|
|
412
|
+
---
|
|
413
|
+
|
|
414
|
+
## Advanced / Manual Setup
|
|
415
|
+
|
|
416
|
+
> Use this path if you need a custom database location, CI/CD integration, or prefer to manage secrets without the wizard.
|
|
417
|
+
|
|
418
|
+
**1. Generate secrets:**
|
|
419
|
+
|
|
420
|
+
```bash
|
|
421
|
+
openssl rand -hex 32 # → DB_ENCRYPTION_KEY
|
|
422
|
+
openssl rand -hex 32 # → HMAC_SECRET
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
**2. Create `.env`** (store outside your project root, never commit):
|
|
426
|
+
|
|
427
|
+
```bash
|
|
428
|
+
DB_ENCRYPTION_KEY=<64 hex chars>
|
|
429
|
+
HMAC_SECRET=<64 hex chars>
|
|
430
|
+
DB_PATH=/path/to/isms.db
|
|
431
|
+
AUDIT_LOG_PATH=/path/to/audit.jsonl
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
**3. Generate an admin API key:**
|
|
435
|
+
|
|
436
|
+
```bash
|
|
437
|
+
source /path/to/.env # or export vars individually
|
|
438
|
+
iso27001-mcp keygen --label admin --role admin
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
**4. Add the `iso27001-mcp` entry** to `claude_desktop_config.json` manually (see JSON block above), then restart Claude Desktop.
|
|
442
|
+
|
|
443
|
+
**Full environment variable reference:**
|
|
444
|
+
|
|
445
|
+
| Variable | Required | Default | Description |
|
|
446
|
+
|----------|----------|---------|-------------|
|
|
447
|
+
| `DB_ENCRYPTION_KEY` | ✅ | — | 32-byte hex key for AES-256 SQLite encryption |
|
|
448
|
+
| `HMAC_SECRET` | ✅ | — | 32-byte hex secret for HMAC-signing API keys |
|
|
449
|
+
| `DB_PATH` | | `./isms.db` | Path to the encrypted database file |
|
|
450
|
+
| `AUDIT_LOG_PATH` | | `./audit.jsonl` | Path for the append-only JSON-L audit log (`.jsonl` or `.log` only) |
|
|
451
|
+
| `RATE_LIMIT_RPM` | | `500` | Tool calls per minute per API key |
|
|
452
|
+
| `SESSION_TTL_HOURS` | | `4` | SSE session TTL (hosted/team modes) |
|
|
453
|
+
| `SSE_PORT` | | `3000` | Port for the SSE server (hosted/team modes) |
|
|
454
|
+
| `BEHIND_TLS_PROXY` | | `false` | Set `true` when behind nginx/Caddy in production |
|
|
455
|
+
| `CORS_ORIGIN` | | `http://localhost` (dev) / `https://claude.ai` (prod) | Allowed CORS origin for the SSE server — never set to `*` |
|
|
456
|
+
| `JIRA_BASE_URL` | | — | e.g. `https://your-org.atlassian.net` |
|
|
457
|
+
| `JIRA_API_TOKEN` | | — | Jira API token for the integration |
|
|
458
|
+
| `JIRA_PROJECT_KEY` | | — | e.g. `SEC` |
|
|
459
|
+
| `JIRA_USER_EMAIL` | | — | Email address associated with the Jira API token |
|
|
460
|
+
| `GITHUB_TOKEN` | | — | GitHub personal access token (scope: `issues:write`) |
|
|
461
|
+
| `GITHUB_REPO` | | — | e.g. `your-org/your-repo` |
|
|
462
|
+
|
|
463
|
+
**Run from source** (for development or to get the latest unreleased changes):
|
|
464
|
+
|
|
465
|
+
```bash
|
|
466
|
+
git clone https://github.com/Sushegaad/MCP-Server-for-ISO27001
|
|
467
|
+
cd MCP-server-for-ISO27001
|
|
468
|
+
npm install
|
|
469
|
+
npm run build
|
|
470
|
+
# Use `node dist/index.js` instead of `iso27001-mcp` in all commands below
|
|
471
|
+
```
|
|
472
|
+
|
|
392
473
|
---
|
|
393
474
|
|
|
394
475
|
## Tools Reference
|
|
@@ -1294,6 +1375,32 @@ Use `link_github_issue` to create an issue with `compliance` and `iso27001` labe
|
|
|
1294
1375
|
|
|
1295
1376
|
---
|
|
1296
1377
|
|
|
1378
|
+
## Roadmap
|
|
1379
|
+
|
|
1380
|
+
The following features are planned or under consideration. Contributions welcome — see [Contributing](#contributing).
|
|
1381
|
+
|
|
1382
|
+
### Near-term (next 1–2 releases)
|
|
1383
|
+
|
|
1384
|
+
- **ISO 27001:2022 ↔ SOC 2 control mapping** — show which ISO 27001 controls satisfy which SOC 2 Trust Services Criteria
|
|
1385
|
+
- **Evidence expiry alerts** — surface evidence artefacts approaching their `expiry_date` in gap summaries and audit reports
|
|
1386
|
+
- **Bulk control status import** — accept a CSV to batch-update control statuses in a gap assessment
|
|
1387
|
+
- **HTML export** — add `html` as an export format for gap reports, SoA, and the risk register
|
|
1388
|
+
|
|
1389
|
+
### Medium-term
|
|
1390
|
+
|
|
1391
|
+
- **ISO 27001:2022 ↔ NIST CSF 2.0 mapping** — cross-reference controls to NIST Cybersecurity Framework 2.0 functions and categories
|
|
1392
|
+
- **PostgreSQL backend** — optional PostgreSQL transport via a pluggable DB adapter (SQLite stays default for local use)
|
|
1393
|
+
- **Supplier risk register** — track third-party suppliers against ISO 27001 Annex A 5.19–5.22 controls
|
|
1394
|
+
- **Multi-ISMS support** — scope-isolated tenants sharing a single server instance (hosted mode)
|
|
1395
|
+
|
|
1396
|
+
### Under consideration
|
|
1397
|
+
|
|
1398
|
+
- GDPR Article 30 RoPA generation linked to the risk register
|
|
1399
|
+
- NIS2 control mapping
|
|
1400
|
+
- Automated evidence collection via API integrations (AWS Config, GitHub Security Advisories, etc.)
|
|
1401
|
+
|
|
1402
|
+
---
|
|
1403
|
+
|
|
1297
1404
|
## Development
|
|
1298
1405
|
|
|
1299
1406
|
```bash
|
|
@@ -1326,8 +1433,13 @@ npm run dev
|
|
|
1326
1433
|
|
|
1327
1434
|
```
|
|
1328
1435
|
src/
|
|
1329
|
-
├── index.ts CLI entry (keygen, keys, server startup)
|
|
1436
|
+
├── index.ts CLI entry (init, doctor, keygen, keys, server startup)
|
|
1330
1437
|
├── server.ts McpServer factory — registers tools + resources
|
|
1438
|
+
├── cli/
|
|
1439
|
+
│ ├── init.ts Interactive setup wizard (iso27001-mcp init)
|
|
1440
|
+
│ ├── doctor.ts 10-check health report (iso27001-mcp doctor)
|
|
1441
|
+
│ ├── prompt.ts Lazy readline wrapper — ask, confirm, banner, check
|
|
1442
|
+
│ └── claude-config.ts Claude Desktop config detection + entry builder
|
|
1331
1443
|
├── auth/
|
|
1332
1444
|
│ ├── api-key.ts Key generation, HMAC validation, expiry, revocation
|
|
1333
1445
|
│ ├── rbac.ts Permission matrix (63 tools × 3 roles)
|
|
@@ -1342,7 +1454,7 @@ src/
|
|
|
1342
1454
|
├── db/
|
|
1343
1455
|
│ ├── connection.ts Encrypted SQLite open/close/migrate
|
|
1344
1456
|
│ ├── dal.ts Shared helpers: newId, now, toJson, fromJsonArray, computeEvidenceStatus
|
|
1345
|
-
│ └── migrations/ 0001_initial.sql
|
|
1457
|
+
│ └── migrations/ 0001_initial.sql through 0006_audit_log_hmac.sql
|
|
1346
1458
|
├── seed/
|
|
1347
1459
|
│ ├── seeder.ts Idempotent seed runner with checksum verification
|
|
1348
1460
|
│ ├── controls-2022.json 93 ISO 27001:2022 Annex A controls
|
|
@@ -1399,9 +1511,41 @@ tests/
|
|
|
1399
1511
|
|
|
1400
1512
|
---
|
|
1401
1513
|
|
|
1514
|
+
## Contributing
|
|
1515
|
+
|
|
1516
|
+
Contributions are welcome — bug fixes, new policy/procedure templates, additional integrations, and documentation improvements are all valuable.
|
|
1517
|
+
|
|
1518
|
+
**Getting started:**
|
|
1519
|
+
|
|
1520
|
+
```bash
|
|
1521
|
+
git clone https://github.com/Sushegaad/MCP-Server-for-ISO27001
|
|
1522
|
+
cd MCP-server-for-ISO27001
|
|
1523
|
+
npm install
|
|
1524
|
+
npm test # should pass before any changes
|
|
1525
|
+
npm run typecheck # zero errors required
|
|
1526
|
+
```
|
|
1527
|
+
|
|
1528
|
+
**Before opening a PR:**
|
|
1529
|
+
|
|
1530
|
+
- Run `npm run typecheck` — zero TypeScript errors required
|
|
1531
|
+
- Run `npm test` — all tests must pass
|
|
1532
|
+
- Run `npm run lint` — no new lint errors
|
|
1533
|
+
- If adding seed data, run `npm run generate-checksums` and commit the updated checksums file
|
|
1534
|
+
|
|
1535
|
+
**Areas where help is most needed:**
|
|
1536
|
+
|
|
1537
|
+
- Additional policy and procedure templates (currently 12 + 12; ISO 27001 has room for more)
|
|
1538
|
+
- More evidence document templates
|
|
1539
|
+
- ISO 27001 ↔ other framework mappings (SOC 2, NIST CSF, CIS Controls)
|
|
1540
|
+
- Windows and Linux testing (most development is on macOS)
|
|
1541
|
+
|
|
1542
|
+
Please open an issue before starting significant work so we can align on direction.
|
|
1543
|
+
|
|
1544
|
+
---
|
|
1545
|
+
|
|
1402
1546
|
## Security
|
|
1403
1547
|
|
|
1404
|
-
For
|
|
1548
|
+
For the full security profile — threat model, hardening guide, data flow documentation, supply chain attestation, and audit log integrity verification — see the **[Trust Center](https://github.com/Sushegaad/MCP-Server-for-ISO27001/tree/main/docs/security/)**.
|
|
1405
1549
|
|
|
1406
1550
|
### API Key Storage
|
|
1407
1551
|
|