gia-mcp-server 0.3.1 → 0.3.2
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/CHANGELOG.md +36 -41
- package/LICENSE +216 -53
- package/README.md +155 -280
- package/bin/gia-mcp-server.js +1 -19
- package/dist/proxy.d.ts +17 -0
- package/dist/proxy.js +178 -0
- package/package.json +20 -41
- package/dist/index.d.ts +0 -38
package/CHANGELOG.md
CHANGED
|
@@ -2,46 +2,41 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to GIA MCP Server will be documented in this file.
|
|
4
4
|
|
|
5
|
-
## [0.
|
|
5
|
+
## [0.2.2] - 2026-02-26
|
|
6
6
|
|
|
7
|
-
###
|
|
7
|
+
### Fixed
|
|
8
|
+
- Proxy no longer crashes when upstream GIA server is unreachable
|
|
9
|
+
- Server stays alive in disconnected mode — returns clear errors on tool calls
|
|
10
|
+
- Local ping responses keep health checks passing (Glama, monitoring)
|
|
11
|
+
- Lazy reconnect: automatically retries upstream on next tool call
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
- Stdio transport starts before upstream connection (resilient startup order)
|
|
15
|
+
- Upstream connection failure is now WARNING, not FATAL
|
|
16
|
+
|
|
17
|
+
## [0.2.0] - 2026-02-25
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
- **Architecture**: Package is now a thin proxy to the hosted GIA server at `gia.aceadvising.com`
|
|
21
|
+
- All governance logic executes server-side
|
|
22
|
+
- Requires `GIA_API_KEY` environment variable for authentication
|
|
8
23
|
|
|
9
|
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
|
|
29
|
-
#### Storey Threshold
|
|
30
|
-
- Governance health metric measuring MANDATORY escalation rate
|
|
31
|
-
- Healthy band: 10-18%
|
|
32
|
-
- Status levels: HEALTHY, DEGRADED, CRITICAL
|
|
33
|
-
|
|
34
|
-
#### Compliance Mapping
|
|
35
|
-
- NIST AI RMF (8 controls)
|
|
36
|
-
- EU AI Act (8 articles)
|
|
37
|
-
- ISO/IEC 42001 (6 controls)
|
|
38
|
-
- NIST SP 800-53 (11 controls)
|
|
39
|
-
|
|
40
|
-
#### EU AI Act Risk Assessment
|
|
41
|
-
- Four-tier risk classification (Unacceptable, High, Limited, Minimal)
|
|
42
|
-
- Governance and documentation requirements per tier
|
|
43
|
-
- Domain-aware assessment
|
|
44
|
-
|
|
45
|
-
#### MCP Transport
|
|
46
|
-
- 10 MCP tools via stdio transport
|
|
47
|
-
- Compatible with Claude Desktop and Claude Code
|
|
24
|
+
### Added
|
|
25
|
+
- Dynamic tool discovery (tools are fetched from the server — no package update needed when new tools are added)
|
|
26
|
+
- Bearer token authentication via API key
|
|
27
|
+
- Configurable server URL via `GIA_SERVER_URL` environment variable
|
|
28
|
+
- 29 governance tools available (up from 10 in v0.1.0)
|
|
29
|
+
- MCP tool annotations (readOnlyHint, destructiveHint, idempotentHint)
|
|
30
|
+
- Support for MCP resources and prompts
|
|
31
|
+
|
|
32
|
+
### Removed
|
|
33
|
+
- Local governance engine (all logic is now server-side)
|
|
34
|
+
|
|
35
|
+
## [0.1.0] - 2026-02-09
|
|
36
|
+
|
|
37
|
+
### Initial Release
|
|
38
|
+
- Local governance engine with 10 MCP tools
|
|
39
|
+
- MAI Framework classification
|
|
40
|
+
- Forensic audit ledger
|
|
41
|
+
- Governance scoring
|
|
42
|
+
- Compliance mapping
|
package/LICENSE
CHANGED
|
@@ -1,53 +1,216 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
1
|
+
The MCP project is undergoing a licensing transition from the MIT License to the Apache License, Version 2.0 ("Apache-2.0"). All new code and specification contributions to the project are licensed under Apache-2.0. Documentation contributions (excluding specifications) are licensed under CC-BY-4.0.
|
|
2
|
+
|
|
3
|
+
Contributions for which relicensing consent has been obtained are licensed under Apache-2.0. Contributions made by authors who originally licensed their work under the MIT License and who have not yet granted explicit permission to relicense remain licensed under the MIT License.
|
|
4
|
+
|
|
5
|
+
No rights beyond those granted by the applicable original license are conveyed for such contributions.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
Apache License
|
|
10
|
+
Version 2.0, January 2004
|
|
11
|
+
http://www.apache.org/licenses/
|
|
12
|
+
|
|
13
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
14
|
+
|
|
15
|
+
1. Definitions.
|
|
16
|
+
|
|
17
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
18
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
19
|
+
|
|
20
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
21
|
+
the copyright owner that is granting the License.
|
|
22
|
+
|
|
23
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
24
|
+
other entities that control, are controlled by, or are under common
|
|
25
|
+
control with that entity. For the purposes of this definition,
|
|
26
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
27
|
+
direction or management of such entity, whether by contract or
|
|
28
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
29
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
30
|
+
|
|
31
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
32
|
+
exercising permissions granted by this License.
|
|
33
|
+
|
|
34
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
35
|
+
including but not limited to software source code, documentation
|
|
36
|
+
source, and configuration files.
|
|
37
|
+
|
|
38
|
+
"Object" form shall mean any form resulting from mechanical
|
|
39
|
+
transformation or translation of a Source form, including but
|
|
40
|
+
not limited to compiled object code, generated documentation,
|
|
41
|
+
and conversions to other media types.
|
|
42
|
+
|
|
43
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
44
|
+
Object form, made available under the License, as indicated by a
|
|
45
|
+
copyright notice that is included in or attached to the work
|
|
46
|
+
(an example is provided in the Appendix below).
|
|
47
|
+
|
|
48
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
49
|
+
form, that is based on (or derived from) the Work and for which the
|
|
50
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
51
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
52
|
+
of this License, Derivative Works shall not include works that remain
|
|
53
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
54
|
+
the Work and Derivative Works thereof.
|
|
55
|
+
|
|
56
|
+
"Contribution" shall mean any work of authorship, including
|
|
57
|
+
the original version of the Work and any modifications or additions
|
|
58
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
59
|
+
submitted to the Licensor for inclusion in the Work by the copyright
|
|
60
|
+
owner or by an individual or Legal Entity authorized to submit on behalf
|
|
61
|
+
of the copyright owner. For the purposes of this definition, "submitted"
|
|
62
|
+
means any form of electronic, verbal, or written communication sent
|
|
63
|
+
to the Licensor or its representatives, including but not limited to
|
|
64
|
+
communication on electronic mailing lists, source code control systems,
|
|
65
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
66
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
67
|
+
excluding communication that is conspicuously marked or otherwise
|
|
68
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
69
|
+
|
|
70
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
71
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
72
|
+
subsequently incorporated within the Work.
|
|
73
|
+
|
|
74
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
78
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
79
|
+
Work and such Derivative Works in Source or Object form.
|
|
80
|
+
|
|
81
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
82
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
83
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
84
|
+
(except as stated in this section) patent license to make, have made,
|
|
85
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
86
|
+
where such license applies only to those patent claims licensable
|
|
87
|
+
by such Contributor that are necessarily infringed by their
|
|
88
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
89
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
90
|
+
institute patent litigation against any entity (including a
|
|
91
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
92
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
93
|
+
or contributory patent infringement, then any patent licenses
|
|
94
|
+
granted to You under this License for that Work shall terminate
|
|
95
|
+
as of the date such litigation is filed.
|
|
96
|
+
|
|
97
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
98
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
99
|
+
modifications, and in Source or Object form, provided that You
|
|
100
|
+
meet the following conditions:
|
|
101
|
+
|
|
102
|
+
(a) You must give any other recipients of the Work or
|
|
103
|
+
Derivative Works a copy of this License; and
|
|
104
|
+
|
|
105
|
+
(b) You must cause any modified files to carry prominent notices
|
|
106
|
+
stating that You changed the files; and
|
|
107
|
+
|
|
108
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
109
|
+
that You distribute, all copyright, patent, trademark, and
|
|
110
|
+
attribution notices from the Source form of the Work,
|
|
111
|
+
excluding those notices that do not pertain to any part of
|
|
112
|
+
the Derivative Works; and
|
|
113
|
+
|
|
114
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
115
|
+
distribution, then any Derivative Works that You distribute must
|
|
116
|
+
include a readable copy of the attribution notices contained
|
|
117
|
+
within such NOTICE file, excluding those notices that do not
|
|
118
|
+
pertain to any part of the Derivative Works, in at least one
|
|
119
|
+
of the following places: within a NOTICE text file distributed
|
|
120
|
+
as part of the Derivative Works; within the Source form or
|
|
121
|
+
documentation, if provided along with the Derivative Works; or,
|
|
122
|
+
within a display generated by the Derivative Works, if and
|
|
123
|
+
wherever such third-party notices normally appear. The contents
|
|
124
|
+
of the NOTICE file are for informational purposes only and
|
|
125
|
+
do not modify the License. You may add Your own attribution
|
|
126
|
+
notices within Derivative Works that You distribute, alongside
|
|
127
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
128
|
+
that such additional attribution notices cannot be construed
|
|
129
|
+
as modifying the License.
|
|
130
|
+
|
|
131
|
+
You may add Your own copyright statement to Your modifications and
|
|
132
|
+
may provide additional or different license terms and conditions
|
|
133
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
134
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
135
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
136
|
+
the conditions stated in this License.
|
|
137
|
+
|
|
138
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
139
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
140
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
141
|
+
this License, without any additional terms or conditions.
|
|
142
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
143
|
+
the terms of any separate license agreement you may have executed
|
|
144
|
+
with Licensor regarding such Contributions.
|
|
145
|
+
|
|
146
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
147
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
148
|
+
except as required for reasonable and customary use in describing the
|
|
149
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
150
|
+
|
|
151
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
152
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
153
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
154
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
155
|
+
implied, including, without limitation, any warranties or conditions
|
|
156
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
157
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
158
|
+
appropriateness of using or redistributing the Work and assume any
|
|
159
|
+
risks associated with Your exercise of permissions under this License.
|
|
160
|
+
|
|
161
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
162
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
163
|
+
unless required by applicable law (such as deliberate and grossly
|
|
164
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
165
|
+
liable to You for damages, including any direct, indirect, special,
|
|
166
|
+
incidental, or consequential damages of any character arising as a
|
|
167
|
+
result of this License or out of the use or inability to use the
|
|
168
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
169
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
170
|
+
other commercial damages or losses), even if such Contributor
|
|
171
|
+
has been advised of the possibility of such damages.
|
|
172
|
+
|
|
173
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
174
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
175
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
176
|
+
or other liability obligations and/or rights consistent with this
|
|
177
|
+
License. However, in accepting such obligations, You may act only
|
|
178
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
179
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
180
|
+
defend, and hold each Contributor harmless for any liability
|
|
181
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
182
|
+
of your accepting any such warranty or additional liability.
|
|
183
|
+
|
|
184
|
+
END OF TERMS AND CONDITIONS
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
MIT License
|
|
189
|
+
|
|
190
|
+
Copyright (c) 2024-2025 Model Context Protocol a Series of LF Projects, LLC.
|
|
191
|
+
|
|
192
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
193
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
194
|
+
in the Software without restriction, including without limitation the rights
|
|
195
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
196
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
197
|
+
furnished to do so, subject to the following conditions:
|
|
198
|
+
|
|
199
|
+
The above copyright notice and this permission notice shall be included in all
|
|
200
|
+
copies or substantial portions of the Software.
|
|
201
|
+
|
|
202
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
203
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
204
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
205
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
206
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
207
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
208
|
+
SOFTWARE.
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
Creative Commons Attribution 4.0 International (CC-BY-4.0)
|
|
213
|
+
|
|
214
|
+
Documentation in this project (excluding specifications) is licensed under
|
|
215
|
+
CC-BY-4.0. See https://creativecommons.org/licenses/by/4.0/legalcode for
|
|
216
|
+
the full license text.
|
package/README.md
CHANGED
|
@@ -1,280 +1,155 @@
|
|
|
1
|
-
# GIA
|
|
2
|
-
|
|
3
|
-
**
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
|
111
|
-
|
|
112
|
-
|
|
|
113
|
-
|
|
|
114
|
-
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
###
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
```
|
|
158
|
-
"List pending gates"
|
|
159
|
-
→ 1 pending gate: GATE-1707350400-a1b2c3
|
|
160
|
-
|
|
161
|
-
"Approve gate GATE-1707350400-a1b2c3 rationale: Verified retention policy"
|
|
162
|
-
→ Status: APPROVED | Approved by: operator
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
### audit_pipeline
|
|
166
|
-
|
|
167
|
-
Query the hash-chained forensic ledger. Every entry is cryptographically linked to the previous (SHA-256). Tamper with one, the chain breaks.
|
|
168
|
-
|
|
169
|
-
### assess_risk_tier
|
|
170
|
-
|
|
171
|
-
EU AI Act risk classification (Unacceptable, High, Limited, Minimal) with governance and documentation requirements per tier.
|
|
172
|
-
|
|
173
|
-
### map_compliance
|
|
174
|
-
|
|
175
|
-
Map GIA controls to regulatory frameworks:
|
|
176
|
-
- **NIST AI RMF** — GOVERN, MAP, MEASURE, MANAGE
|
|
177
|
-
- **EU AI Act** — Articles 9, 10, 11, 12, 13, 14, 15, 52
|
|
178
|
-
- **ISO/IEC 42001** — AI management system
|
|
179
|
-
- **NIST SP 800-53** — Security and privacy controls
|
|
180
|
-
|
|
181
|
-
### monitor_agents
|
|
182
|
-
|
|
183
|
-
Health status for all governed agents.
|
|
184
|
-
|
|
185
|
-
### generate_report
|
|
186
|
-
|
|
187
|
-
Governance status report: threshold health, compliance coverage, agent states, operational metrics.
|
|
188
|
-
|
|
189
|
-
### system_status
|
|
190
|
-
|
|
191
|
-
Full system snapshot: uptime, ledger state, configuration, governance module status.
|
|
192
|
-
|
|
193
|
-
---
|
|
194
|
-
|
|
195
|
-
## Architecture
|
|
196
|
-
|
|
197
|
-
```
|
|
198
|
-
┌──────────────────────────────────────────────────────────┐
|
|
199
|
-
│ Claude Desktop / Claude Code (MCP Client) │
|
|
200
|
-
└──────────────────────┬───────────────────────────────────┘
|
|
201
|
-
│ stdio
|
|
202
|
-
┌──────────────────────▼───────────────────────────────────┐
|
|
203
|
-
│ GIA MCP Server │
|
|
204
|
-
│ │
|
|
205
|
-
│ ┌─────────────────────────────────────────────────────┐ │
|
|
206
|
-
│ │ Transport Layer (MCP Protocol) │ │
|
|
207
|
-
│ │ 10 tools | validate | delegate │ │
|
|
208
|
-
│ └─────────────────────┬───────────────────────────────┘ │
|
|
209
|
-
│ │ │
|
|
210
|
-
│ ┌─────────────────────▼───────────────────────────────┐ │
|
|
211
|
-
│ │ Governance Engine │ │
|
|
212
|
-
│ │ │ │
|
|
213
|
-
│ │ MAI Classifier ── Gate Enforcer ── Forensic Ledger │ │
|
|
214
|
-
│ │ Scoring Engine ── Storey Threshold ── Compliance │ │
|
|
215
|
-
│ └─────────────────────────────────────────────────────┘ │
|
|
216
|
-
└──────────────────────────────────────────────────────────┘
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
**Design principles:**
|
|
220
|
-
- Transport layer does zero business logic
|
|
221
|
-
- Every operation writes to the forensic ledger
|
|
222
|
-
- Classification is deterministic (pattern matching + rules, not LLM-based)
|
|
223
|
-
- Audit entries are hash-chained (SHA-256)
|
|
224
|
-
- Zero external dependencies beyond `@modelcontextprotocol/sdk`
|
|
225
|
-
|
|
226
|
-
---
|
|
227
|
-
|
|
228
|
-
## Concepts
|
|
229
|
-
|
|
230
|
-
### MAI Framework
|
|
231
|
-
|
|
232
|
-
Every AI agent decision is classified as **Mandatory**, **Advisory**, or **Informational**:
|
|
233
|
-
|
|
234
|
-
- **MANDATORY** — Blocks execution until a human approves through the gate. Deletions, submissions, deployments, financial transactions, PII operations.
|
|
235
|
-
- **ADVISORY** — Logs a recommendation, continues execution. Searches, drafts, rankings, analysis.
|
|
236
|
-
- **INFORMATIONAL** — Audit trail entry only. Status checks, read operations, internal routing.
|
|
237
|
-
|
|
238
|
-
Context elevates, never reduces. A search (ADVISORY) that touches PII becomes MANDATORY.
|
|
239
|
-
|
|
240
|
-
### Storey Threshold
|
|
241
|
-
|
|
242
|
-
A quantitative health metric. Measures what percentage of decisions require MANDATORY classification.
|
|
243
|
-
|
|
244
|
-
- Too low (<10%): Rubber-stamping. Critical decisions aren't being caught.
|
|
245
|
-
- Healthy (10-18%): Appropriate friction. Most decisions flow; critical ones stop.
|
|
246
|
-
- Too high (>18%): Bottleneck. Trust calibration needed.
|
|
247
|
-
|
|
248
|
-
### Forensic Ledger
|
|
249
|
-
|
|
250
|
-
Append-only, hash-chained audit trail. Every entry contains:
|
|
251
|
-
- Operation name and timestamp
|
|
252
|
-
- MAI classification level
|
|
253
|
-
- Input/output hashes (SHA-256)
|
|
254
|
-
- Chain link to previous entry
|
|
255
|
-
|
|
256
|
-
Verify chain integrity at any time. If any entry is modified, the chain breaks.
|
|
257
|
-
|
|
258
|
-
---
|
|
259
|
-
|
|
260
|
-
## Limitations (v0.1)
|
|
261
|
-
|
|
262
|
-
| Works | Not yet |
|
|
263
|
-
|-------|---------|
|
|
264
|
-
| MAI classification with elevation rules | No persistent storage (in-memory, resets on restart) |
|
|
265
|
-
| Human-in-the-loop gate enforcement | No auth on MCP transport |
|
|
266
|
-
| SHA-256 hash-chained audit trail | No distributed deployment |
|
|
267
|
-
| Governance scoring with pass/fail | No rate limiting |
|
|
268
|
-
| Storey Threshold health monitoring | Compliance mappings are static |
|
|
269
|
-
| 4-framework compliance mapping | Single vertical (ACE/VA claims) |
|
|
270
|
-
| EU AI Act risk assessment | No database persistence |
|
|
271
|
-
|
|
272
|
-
Known gaps with planned solutions. Governance engine is fully functional.
|
|
273
|
-
|
|
274
|
-
---
|
|
275
|
-
|
|
276
|
-
## License
|
|
277
|
-
|
|
278
|
-
Proprietary. Copyright (c) 2025-2026 William J. Storey III / ACE Advising. All rights reserved.
|
|
279
|
-
|
|
280
|
-
The MAI Framework, Storey Threshold, Forensic Ledger architecture, and GIA governance patterns are intellectual property of the author. See [LICENSE](LICENSE) for terms.
|
|
1
|
+
# GIA Governed Intelligence Architecture
|
|
2
|
+
|
|
3
|
+
**Enterprise AI governance through the Model Context Protocol.**
|
|
4
|
+
|
|
5
|
+
GIA is a production governance engine that gives AI agents enforceable decision controls, compliance scoring, immutable audit chains, and human-in-the-loop gates. Built for organizations operating under NIST, FedRAMP, CMMC, EU AI Act, and SOC 2 requirements.
|
|
6
|
+
|
|
7
|
+
29 MCP tools. One integration point. Works with Claude Desktop, Claude Code, OpenAI Agent Builder, and any MCP-compatible client.
|
|
8
|
+
|
|
9
|
+
## Quick Start
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npx gia-mcp-server
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Or install globally:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install -g gia-mcp-server
|
|
19
|
+
gia-mcp-server
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
The server connects to the hosted GIA engine at `https://gia.aceadvising.com`. Configure your API key:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
GIA_API_KEY=your-key npx gia-mcp-server
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Claude Desktop
|
|
29
|
+
|
|
30
|
+
Add to your `claude_desktop_config.json`:
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
{
|
|
34
|
+
"mcpServers": {
|
|
35
|
+
"gia-governance": {
|
|
36
|
+
"command": "npx",
|
|
37
|
+
"args": ["-y", "gia-mcp-server"],
|
|
38
|
+
"env": {
|
|
39
|
+
"GIA_API_KEY": "your-key"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Claude Code
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
claude mcp add gia-governance -- npx -y gia-mcp-server
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### OpenAI Agent Builder
|
|
53
|
+
|
|
54
|
+
Point to the Streamable HTTP endpoint:
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
https://gia.aceadvising.com/mcp
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Smithery
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
npx -y @smithery/cli install @knowledgepa3/gia-mcp-server --client claude
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Tools
|
|
67
|
+
|
|
68
|
+
### Decision Controls (MAI Framework)
|
|
69
|
+
|
|
70
|
+
| Tool | Description |
|
|
71
|
+
|------|-------------|
|
|
72
|
+
| `classify_decision` | Classify agent decisions as Mandatory, Advisory, or Informational |
|
|
73
|
+
| `approve_gate` | Human-in-the-loop approval for Mandatory gates |
|
|
74
|
+
| `evaluate_threshold` | Compute escalation health (Storey Threshold) |
|
|
75
|
+
| `score_governance` | Weighted governance scoring (Integrity, Accuracy, Compliance) |
|
|
76
|
+
|
|
77
|
+
### Compliance & Audit
|
|
78
|
+
|
|
79
|
+
| Tool | Description |
|
|
80
|
+
|------|-------------|
|
|
81
|
+
| `audit_pipeline` | Query the hash-chained forensic audit ledger |
|
|
82
|
+
| `verify_ledger` | Verify SHA-256 chain integrity from genesis |
|
|
83
|
+
| `map_compliance` | Map controls to NIST AI RMF, EU AI Act, ISO 42001, NIST 800-53 |
|
|
84
|
+
| `assess_risk_tier` | EU AI Act risk tier classification |
|
|
85
|
+
| `generate_report` | Governance status reports (summary, detailed, executive) |
|
|
86
|
+
|
|
87
|
+
### Knowledge Packs
|
|
88
|
+
|
|
89
|
+
| Tool | Description |
|
|
90
|
+
|------|-------------|
|
|
91
|
+
| `seal_memory_pack` | Create immutable, TTL-bound knowledge artifacts |
|
|
92
|
+
| `load_memory_pack` | Load packs with trust level and role enforcement |
|
|
93
|
+
| `transfer_memory_pack` | Governed knowledge transfer between agents |
|
|
94
|
+
| `compose_memory_packs` | Merge packs with risk contamination rules |
|
|
95
|
+
| `distill_memory_pack` | Extract governance patterns from usage history |
|
|
96
|
+
| `promote_memory_pack` | Promote packs to higher trust levels after review |
|
|
97
|
+
|
|
98
|
+
### Security & Operations
|
|
99
|
+
|
|
100
|
+
| Tool | Description |
|
|
101
|
+
|------|-------------|
|
|
102
|
+
| `monitor_agents` | Agent health, repair history, failure counts |
|
|
103
|
+
| `srt_run_watchdog` | Infrastructure health probes (API, disk, memory, TLS, DB, DNS) |
|
|
104
|
+
| `srt_diagnose` | Incident diagnosis with playbook matching |
|
|
105
|
+
| `srt_approve_repair` | Human-approved repair execution |
|
|
106
|
+
| `srt_generate_postmortem` | Structured incident postmortems with TTD/TTR metrics |
|
|
107
|
+
|
|
108
|
+
### Infrastructure Remediation
|
|
109
|
+
|
|
110
|
+
| Tool | Description |
|
|
111
|
+
|------|-------------|
|
|
112
|
+
| `gia_scan_environment` | Scout swarm for environment detection |
|
|
113
|
+
| `gia_list_packs` | List remediation, patrol, hardening, and audit packs |
|
|
114
|
+
| `gia_dry_run_pack` | Preview pack execution with blast radius analysis |
|
|
115
|
+
| `gia_apply_pack` | Execute remediation with mandatory human approval |
|
|
116
|
+
| `gia_run_patrol` | Read-only posture checks and compliance audits |
|
|
117
|
+
|
|
118
|
+
### Impact & Value
|
|
119
|
+
|
|
120
|
+
| Tool | Description |
|
|
121
|
+
|------|-------------|
|
|
122
|
+
| `record_value_metric` | Track time saved, risks blocked, autonomy levels |
|
|
123
|
+
| `record_governance_event` | Log gates, drift prevention, violations blocked |
|
|
124
|
+
| `generate_impact_report` | Economic + governance ROI reporting |
|
|
125
|
+
| `system_status` | Engine health, uptime, configuration |
|
|
126
|
+
|
|
127
|
+
## Architecture
|
|
128
|
+
|
|
129
|
+
GIA enforces governance through three layers:
|
|
130
|
+
|
|
131
|
+
1. **Decision Controls** — MAI classification gates side effects and high-impact actions
|
|
132
|
+
2. **Step Hooks** — Workflow progression control at each pipeline stage
|
|
133
|
+
3. **Kernel Hooks** — Resource control at the LLM boundary, including sub-agents
|
|
134
|
+
|
|
135
|
+
Every governance action is recorded in a SHA-256 hash-chained audit ledger that can be independently verified.
|
|
136
|
+
|
|
137
|
+
## Compliance Coverage
|
|
138
|
+
|
|
139
|
+
- **NIST AI RMF** — Risk management framework mapping
|
|
140
|
+
- **EU AI Act** — Risk tier assessment and control mapping
|
|
141
|
+
- **ISO 42001** — AI management system alignment
|
|
142
|
+
- **NIST 800-53** — Federal security control mapping
|
|
143
|
+
- **CMMC 2.0** — DoD cybersecurity maturity
|
|
144
|
+
- **FedRAMP** — Federal cloud authorization
|
|
145
|
+
- **SOC 2** — Service organization controls
|
|
146
|
+
|
|
147
|
+
## About
|
|
148
|
+
|
|
149
|
+
Built by [Advanced Consulting Experts (ACE)](https://aceadvising.com) — a Service-Disabled Veteran-Owned Small Business (SDVOSB).
|
|
150
|
+
|
|
151
|
+
GIA was designed by William J. Storey III, a 17-year Information System Security Officer with experience across DoD contracts and U.S. Army Ranger Battalion operations. The same discipline applied to securing classified systems now governs AI agent workforces.
|
|
152
|
+
|
|
153
|
+
## License
|
|
154
|
+
|
|
155
|
+
MIT
|
package/bin/gia-mcp-server.js
CHANGED
|
@@ -1,20 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* GIA MCP Server — CLI Entry Point
|
|
5
|
-
*
|
|
6
|
-
* Governance Intelligence Architecture
|
|
7
|
-
* Built on Anthropic's Model Context Protocol
|
|
8
|
-
*
|
|
9
|
-
* Copyright (c) 2025-2026 William J. Storey III / ACE Advising
|
|
10
|
-
* All rights reserved. See LICENSE for details.
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
import { fileURLToPath } from 'node:url';
|
|
14
|
-
import { dirname, join } from 'node:path';
|
|
15
|
-
|
|
16
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
17
|
-
const __dirname = dirname(__filename);
|
|
18
|
-
|
|
19
|
-
// Load the compiled server
|
|
20
|
-
await import(join(__dirname, '..', 'dist', 'index.js'));
|
|
2
|
+
import '../dist/proxy.js';
|
package/dist/proxy.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* GIA MCP Server — Proxy
|
|
4
|
+
*
|
|
5
|
+
* Transparent MCP bridge that connects Claude Desktop / Claude Code
|
|
6
|
+
* to the hosted GIA governance engine at gia.aceadvising.com.
|
|
7
|
+
*
|
|
8
|
+
* All governance logic executes server-side. This package contains
|
|
9
|
+
* zero governance algorithms — it is a pure protocol relay.
|
|
10
|
+
*
|
|
11
|
+
* Architecture:
|
|
12
|
+
* Claude <--stdio--> this proxy <--HTTPS--> gia.aceadvising.com/mcp
|
|
13
|
+
*
|
|
14
|
+
* @author Advanced Consulting Experts (ACE)
|
|
15
|
+
* @version 0.2.1
|
|
16
|
+
*/
|
|
17
|
+
export {};
|
package/dist/proxy.js
ADDED
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* GIA MCP Server — Proxy
|
|
4
|
+
*
|
|
5
|
+
* Transparent MCP bridge that connects Claude Desktop / Claude Code
|
|
6
|
+
* to the hosted GIA governance engine at gia.aceadvising.com.
|
|
7
|
+
*
|
|
8
|
+
* All governance logic executes server-side. This package contains
|
|
9
|
+
* zero governance algorithms — it is a pure protocol relay.
|
|
10
|
+
*
|
|
11
|
+
* Architecture:
|
|
12
|
+
* Claude <--stdio--> this proxy <--HTTPS--> gia.aceadvising.com/mcp
|
|
13
|
+
*
|
|
14
|
+
* @author Advanced Consulting Experts (ACE)
|
|
15
|
+
* @version 0.2.1
|
|
16
|
+
*/
|
|
17
|
+
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
18
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
19
|
+
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
20
|
+
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
|
|
21
|
+
import { ListToolsResultSchema, CallToolResultSchema, ListResourcesResultSchema, ReadResourceResultSchema, ListResourceTemplatesResultSchema, ListPromptsResultSchema, GetPromptResultSchema, CompleteResultSchema, EmptyResultSchema, } from '@modelcontextprotocol/sdk/types.js';
|
|
22
|
+
const VERSION = '0.2.2';
|
|
23
|
+
const DEFAULT_SERVER_URL = 'https://gia.aceadvising.com/mcp';
|
|
24
|
+
// Result schema map — tells the SDK how to validate upstream responses
|
|
25
|
+
const RESULT_SCHEMAS = {
|
|
26
|
+
'tools/list': ListToolsResultSchema,
|
|
27
|
+
'tools/call': CallToolResultSchema,
|
|
28
|
+
'resources/list': ListResourcesResultSchema,
|
|
29
|
+
'resources/read': ReadResourceResultSchema,
|
|
30
|
+
'resources/templates/list': ListResourceTemplatesResultSchema,
|
|
31
|
+
'prompts/list': ListPromptsResultSchema,
|
|
32
|
+
'prompts/get': GetPromptResultSchema,
|
|
33
|
+
'completion/complete': CompleteResultSchema,
|
|
34
|
+
'ping': EmptyResultSchema,
|
|
35
|
+
'logging/setLevel': EmptyResultSchema,
|
|
36
|
+
};
|
|
37
|
+
function log(msg) {
|
|
38
|
+
process.stderr.write(`[GIA] ${msg}\n`);
|
|
39
|
+
}
|
|
40
|
+
// Upstream connection state
|
|
41
|
+
let upstream = null;
|
|
42
|
+
let upstreamConnected = false;
|
|
43
|
+
async function connectUpstream(apiKey, serverUrl) {
|
|
44
|
+
log(`Connecting to ${serverUrl}...`);
|
|
45
|
+
const transport = new StreamableHTTPClientTransport(new URL(serverUrl), {
|
|
46
|
+
requestInit: {
|
|
47
|
+
headers: {
|
|
48
|
+
'Authorization': `Bearer ${apiKey}`,
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
upstream = new Client({ name: 'gia-mcp-proxy', version: VERSION }, { capabilities: {} });
|
|
53
|
+
try {
|
|
54
|
+
await upstream.connect(transport);
|
|
55
|
+
upstreamConnected = true;
|
|
56
|
+
log('Connected to upstream GIA server.');
|
|
57
|
+
// Handle upstream errors without crashing
|
|
58
|
+
transport.onerror = (err) => {
|
|
59
|
+
log(`Upstream error: ${err.message}`);
|
|
60
|
+
};
|
|
61
|
+
transport.onclose = () => {
|
|
62
|
+
log('Upstream connection closed. Server remains available — reconnect on next request.');
|
|
63
|
+
upstreamConnected = false;
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
catch (err) {
|
|
67
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
68
|
+
log(`WARNING: Failed to connect to GIA server: ${message}`);
|
|
69
|
+
log('Server is running in disconnected mode.');
|
|
70
|
+
log('Tool calls will return errors until upstream is reachable.');
|
|
71
|
+
upstreamConnected = false;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
async function main() {
|
|
75
|
+
// ── Read configuration from environment ──
|
|
76
|
+
const apiKey = process.env.GIA_API_KEY;
|
|
77
|
+
const serverUrl = process.env.GIA_SERVER_URL || DEFAULT_SERVER_URL;
|
|
78
|
+
if (!apiKey) {
|
|
79
|
+
log('ERROR: GIA_API_KEY environment variable is required.');
|
|
80
|
+
log('');
|
|
81
|
+
log('Get your API key at https://gia.aceadvising.com');
|
|
82
|
+
log('Then set it:');
|
|
83
|
+
log(' export GIA_API_KEY=gia_your_key_here');
|
|
84
|
+
log('');
|
|
85
|
+
log('Or configure it in your Claude Desktop / Claude Code settings.');
|
|
86
|
+
process.exit(1);
|
|
87
|
+
}
|
|
88
|
+
// ── Create local stdio server FIRST (so health checks work) ──
|
|
89
|
+
const local = new Server({ name: 'gia-mcp-server', version: VERSION }, {
|
|
90
|
+
capabilities: {
|
|
91
|
+
tools: {},
|
|
92
|
+
resources: {},
|
|
93
|
+
prompts: {},
|
|
94
|
+
},
|
|
95
|
+
});
|
|
96
|
+
// ── Bridge: forward requests to upstream (or return error if disconnected) ──
|
|
97
|
+
local.fallbackRequestHandler = async (request) => {
|
|
98
|
+
const method = request.method;
|
|
99
|
+
const params = request.params ?? {};
|
|
100
|
+
const schema = RESULT_SCHEMAS[method];
|
|
101
|
+
if (!schema) {
|
|
102
|
+
throw new Error(`Unsupported method: ${method}`);
|
|
103
|
+
}
|
|
104
|
+
// Ping always succeeds locally — keeps the server alive for health checks
|
|
105
|
+
if (method === 'ping') {
|
|
106
|
+
return {};
|
|
107
|
+
}
|
|
108
|
+
if (!upstreamConnected || !upstream) {
|
|
109
|
+
// Try to reconnect on demand
|
|
110
|
+
await connectUpstream(apiKey, serverUrl);
|
|
111
|
+
}
|
|
112
|
+
// When disconnected, return empty results for discovery methods
|
|
113
|
+
// so health checks and tool listing still work
|
|
114
|
+
if (!upstreamConnected || !upstream) {
|
|
115
|
+
const disconnectedMsg = `[GIA disconnected] Connect to ${serverUrl} with a valid GIA_API_KEY to enable tools.`;
|
|
116
|
+
switch (method) {
|
|
117
|
+
case 'tools/list':
|
|
118
|
+
return { tools: [{ name: 'gia_system_status', description: disconnectedMsg, inputSchema: { type: 'object', properties: {} } }] };
|
|
119
|
+
case 'resources/list':
|
|
120
|
+
return { resources: [] };
|
|
121
|
+
case 'resources/templates/list':
|
|
122
|
+
return { resourceTemplates: [] };
|
|
123
|
+
case 'prompts/list':
|
|
124
|
+
return { prompts: [] };
|
|
125
|
+
case 'logging/setLevel':
|
|
126
|
+
return {};
|
|
127
|
+
default:
|
|
128
|
+
throw new Error('GIA upstream server is not reachable. Check your GIA_API_KEY and network connection. ' +
|
|
129
|
+
`Server URL: ${serverUrl}`);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
const result = await upstream.request({ method, params }, schema);
|
|
133
|
+
return result;
|
|
134
|
+
};
|
|
135
|
+
// Forward notifications from Claude to upstream
|
|
136
|
+
local.fallbackNotificationHandler = async (notification) => {
|
|
137
|
+
if (!upstreamConnected || !upstream)
|
|
138
|
+
return;
|
|
139
|
+
try {
|
|
140
|
+
await upstream.notification({
|
|
141
|
+
method: notification.method,
|
|
142
|
+
params: notification.params,
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
catch {
|
|
146
|
+
// Notifications are fire-and-forget; don't crash on failure
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
// ── Start stdio transport ──
|
|
150
|
+
const stdioTransport = new StdioServerTransport();
|
|
151
|
+
await local.connect(stdioTransport);
|
|
152
|
+
log(`GIA Governance MCP Proxy v${VERSION}`);
|
|
153
|
+
log(`Upstream: ${serverUrl}`);
|
|
154
|
+
log('Transport: stdio <-> HTTPS');
|
|
155
|
+
log('Ready.');
|
|
156
|
+
// ── Now connect upstream (non-fatal) ──
|
|
157
|
+
await connectUpstream(apiKey, serverUrl);
|
|
158
|
+
// ── Graceful shutdown ──
|
|
159
|
+
const shutdown = async () => {
|
|
160
|
+
log('Shutting down...');
|
|
161
|
+
try {
|
|
162
|
+
await local.close();
|
|
163
|
+
if (upstream)
|
|
164
|
+
await upstream.close();
|
|
165
|
+
}
|
|
166
|
+
catch {
|
|
167
|
+
// Best-effort cleanup
|
|
168
|
+
}
|
|
169
|
+
process.exit(0);
|
|
170
|
+
};
|
|
171
|
+
process.on('SIGINT', shutdown);
|
|
172
|
+
process.on('SIGTERM', shutdown);
|
|
173
|
+
}
|
|
174
|
+
main().catch((err) => {
|
|
175
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
176
|
+
log(`FATAL: ${message}`);
|
|
177
|
+
process.exit(1);
|
|
178
|
+
});
|
package/package.json
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gia-mcp-server",
|
|
3
|
-
"version": "0.3.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.3.2",
|
|
4
|
+
"description": "MCP server for GIA Governance — connects Claude Desktop, Claude Code, OpenAI Agent Builder, and any MCP client to the hosted GIA governance engine.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "William J. Storey III",
|
|
7
|
-
"url": "https://
|
|
7
|
+
"url": "https://aceadvising.com"
|
|
8
8
|
},
|
|
9
|
-
"license": "
|
|
9
|
+
"license": "MIT",
|
|
10
10
|
"type": "module",
|
|
11
|
-
"main": "dist/
|
|
11
|
+
"main": "dist/proxy.js",
|
|
12
|
+
"types": "dist/proxy.d.ts",
|
|
12
13
|
"bin": {
|
|
13
14
|
"gia-mcp-server": "bin/gia-mcp-server.js"
|
|
14
15
|
},
|
|
15
16
|
"files": [
|
|
16
|
-
"dist/
|
|
17
|
-
"dist/
|
|
17
|
+
"dist/proxy.js",
|
|
18
|
+
"dist/proxy.d.ts",
|
|
18
19
|
"bin/",
|
|
19
20
|
"LICENSE",
|
|
20
21
|
"README.md",
|
|
@@ -25,56 +26,34 @@
|
|
|
25
26
|
"model-context-protocol",
|
|
26
27
|
"anthropic",
|
|
27
28
|
"claude",
|
|
29
|
+
"openai",
|
|
30
|
+
"agent-builder",
|
|
28
31
|
"governance",
|
|
29
|
-
"
|
|
32
|
+
"ai-safety",
|
|
30
33
|
"compliance",
|
|
31
|
-
"
|
|
32
|
-
"eu-ai-act",
|
|
33
|
-
"iso-42001",
|
|
34
|
+
"audit",
|
|
34
35
|
"human-in-the-loop",
|
|
35
|
-
"
|
|
36
|
-
"forensic-ledger",
|
|
37
|
-
"openai",
|
|
38
|
-
"agent-builder",
|
|
39
|
-
"ai-governance",
|
|
40
|
-
"ai-contract",
|
|
41
|
-
"soc2",
|
|
42
|
-
"cmmc",
|
|
43
|
-
"fedramp",
|
|
44
|
-
"sdvosb"
|
|
36
|
+
"forensic-ledger"
|
|
45
37
|
],
|
|
46
38
|
"repository": {
|
|
47
39
|
"type": "git",
|
|
48
|
-
"url": "https://github.com/
|
|
40
|
+
"url": "https://github.com/knowledgepa3/gia-mcp-server"
|
|
49
41
|
},
|
|
42
|
+
"homepage": "https://gia.aceadvising.com",
|
|
43
|
+
"mcpName": "io.github.knowledgepa3/gia-mcp-server",
|
|
50
44
|
"engines": {
|
|
51
45
|
"node": ">=18.0.0"
|
|
52
46
|
},
|
|
53
47
|
"scripts": {
|
|
54
48
|
"build": "tsc",
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"start:http": "node dist/mcp/server-http.js",
|
|
58
|
-
"test": "vitest run",
|
|
59
|
-
"test:watch": "vitest",
|
|
60
|
-
"test:governance": "vitest run tests/core/",
|
|
61
|
-
"test:integration": "vitest run tests/integration/",
|
|
62
|
-
"test:smoke": "tsx tests/smoke/live-server.ts",
|
|
63
|
-
"lint": "eslint src/",
|
|
64
|
-
"onboard": "tsx src/onboarding/generate-client-config.ts"
|
|
49
|
+
"start": "node dist/proxy.js",
|
|
50
|
+
"prepublishOnly": "npm run build"
|
|
65
51
|
},
|
|
66
52
|
"dependencies": {
|
|
67
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
68
|
-
"pg": "^8.13.0",
|
|
69
|
-
"uuid": "^9.0.0",
|
|
70
|
-
"zod": "^3.22.0"
|
|
53
|
+
"@modelcontextprotocol/sdk": "^1.26.0"
|
|
71
54
|
},
|
|
72
55
|
"devDependencies": {
|
|
73
56
|
"@types/node": "^20.0.0",
|
|
74
|
-
"
|
|
75
|
-
"@types/uuid": "^9.0.0",
|
|
76
|
-
"tsx": "^4.0.0",
|
|
77
|
-
"typescript": "^5.3.0",
|
|
78
|
-
"vitest": "^3.2.4"
|
|
57
|
+
"typescript": "^5.3.0"
|
|
79
58
|
}
|
|
80
59
|
}
|
package/dist/index.d.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* GIA MCP Server — Governed Intelligence Architecture
|
|
4
|
-
*
|
|
5
|
-
* Enterprise-grade Model Context Protocol server exposing GIA governance
|
|
6
|
-
* capabilities. Every tool enforces the MAI framework, produces auditable
|
|
7
|
-
* evidence, and maintains a hash-chained forensic ledger.
|
|
8
|
-
*
|
|
9
|
-
* Architecture:
|
|
10
|
-
* ┌──────────────────────────────────────────────────────────────────┐
|
|
11
|
-
* │ Claude Code / Claude Desktop (MCP Client) │
|
|
12
|
-
* └────────────────────────┬─────────────────────────────────────────┘
|
|
13
|
-
* │ stdio / SSE
|
|
14
|
-
* ┌────────────────────────▼─────────────────────────────────────────┐
|
|
15
|
-
* │ GIA MCP Server │
|
|
16
|
-
* │ ├── classify_decision MAI classification engine │
|
|
17
|
-
* │ ├── score_governance Integrity/Accuracy/Compliance scoring │
|
|
18
|
-
* │ ├── evaluate_threshold Storey Threshold health metric │
|
|
19
|
-
* │ ├── assess_risk_tier EU AI Act risk categorization │
|
|
20
|
-
* │ ├── map_compliance Regulatory framework mapping │
|
|
21
|
-
* │ ├── audit_pipeline Forensic ledger query │
|
|
22
|
-
* │ ├── approve_gate MANDATORY gate approval (HITL) │
|
|
23
|
-
* │ ├── monitor_agents Agent health and status │
|
|
24
|
-
* │ ├── generate_report Governance status report │
|
|
25
|
-
* │ └── system_status Full system health │
|
|
26
|
-
* └──────────────────────────────────────────────────────────────────┘
|
|
27
|
-
*
|
|
28
|
-
* SECURITY:
|
|
29
|
-
* - No secrets stored in server code
|
|
30
|
-
* - All ledger entries are hash-chained (SHA-256)
|
|
31
|
-
* - PII is never stored — only hashes
|
|
32
|
-
* - Object.freeze on critical config (tamper-proof)
|
|
33
|
-
* - Negative assurance captured (what DIDN'T happen)
|
|
34
|
-
*
|
|
35
|
-
* @author ACE Advising
|
|
36
|
-
* @version 1.0.0
|
|
37
|
-
*/
|
|
38
|
-
export {};
|