@nexart/mcp-server 0.0.0-stage → 0.2.0
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 +108 -0
- package/CONTRIBUTING.md +58 -0
- package/LICENSE +202 -0
- package/NOTICE +14 -0
- package/README.md +356 -2
- package/SECURITY.md +77 -0
- package/THIRD_PARTY_NOTICES.md +111 -0
- package/dist/adapters.d.ts +16 -0
- package/dist/adapters.js +48 -0
- package/dist/approve-public.d.ts +2 -0
- package/dist/approve-public.js +65 -0
- package/dist/contracts.d.ts +48 -0
- package/dist/contracts.js +35 -0
- package/dist/create-confidential.d.ts +2 -0
- package/dist/create-confidential.js +34 -0
- package/dist/instrumentation/openai-worker.d.ts +1 -0
- package/dist/instrumentation/openai-worker.js +26 -0
- package/dist/instrumentation/openai.d.ts +51 -0
- package/dist/instrumentation/openai.js +197 -0
- package/dist/json-schema.d.ts +9 -0
- package/dist/json-schema.js +20 -0
- package/dist/limits.d.ts +15 -0
- package/dist/limits.js +62 -0
- package/dist/lookup/contracts.d.ts +38 -0
- package/dist/lookup/contracts.js +23 -0
- package/dist/lookup/verify.d.ts +54 -0
- package/dist/lookup/verify.js +110 -0
- package/dist/network/client.d.ts +26 -0
- package/dist/network/client.js +188 -0
- package/dist/network/contracts.d.ts +104 -0
- package/dist/network/contracts.js +54 -0
- package/dist/network-tools.d.ts +5 -0
- package/dist/network-tools.js +32 -0
- package/dist/owner/create.d.ts +52 -0
- package/dist/owner/create.js +117 -0
- package/dist/owner/custody.d.ts +36 -0
- package/dist/owner/custody.js +210 -0
- package/dist/owner/host.d.ts +10 -0
- package/dist/owner/host.js +70 -0
- package/dist/owner/publisher.d.ts +21 -0
- package/dist/owner/publisher.js +27 -0
- package/dist/owner/reconcile.d.ts +16 -0
- package/dist/owner/reconcile.js +109 -0
- package/dist/protocol-safety.d.ts +3 -0
- package/dist/protocol-safety.js +16 -0
- package/dist/receipts/contracts.d.ts +72 -0
- package/dist/receipts/contracts.js +34 -0
- package/dist/receipts/verify.d.ts +4 -0
- package/dist/receipts/verify.js +104 -0
- package/dist/record/contracts.d.ts +323 -0
- package/dist/record/contracts.js +75 -0
- package/dist/record/customer.d.ts +40 -0
- package/dist/record/customer.js +99 -0
- package/dist/record/policy.d.ts +46 -0
- package/dist/record/policy.js +67 -0
- package/dist/record/publication.d.ts +23 -0
- package/dist/record/publication.js +148 -0
- package/dist/record/record.d.ts +15 -0
- package/dist/record/record.js +97 -0
- package/dist/record/state.d.ts +44 -0
- package/dist/record/state.js +84 -0
- package/dist/record-tools.d.ts +13 -0
- package/dist/record-tools.js +95 -0
- package/dist/recover-confidential.d.ts +2 -0
- package/dist/recover-confidential.js +13 -0
- package/dist/results.d.ts +8 -0
- package/dist/results.js +83 -0
- package/dist/server.d.ts +12 -0
- package/dist/server.js +39 -0
- package/dist/stdio.d.ts +2 -0
- package/dist/stdio.js +88 -0
- package/dist/trust/lifecycle.d.ts +13 -0
- package/dist/trust/lifecycle.js +42 -0
- package/dist/trust/policy.d.ts +14 -0
- package/dist/trust/policy.js +6 -0
- package/dist/verify.d.ts +3 -0
- package/dist/verify.js +56 -0
- package/dist/write/approval.d.ts +5 -0
- package/dist/write/approval.js +95 -0
- package/dist/write/attest.d.ts +17 -0
- package/dist/write/attest.js +141 -0
- package/dist/write/config.d.ts +11 -0
- package/dist/write/config.js +12 -0
- package/dist/write/contracts.d.ts +229 -0
- package/dist/write/contracts.js +61 -0
- package/dist/write/post.d.ts +11 -0
- package/dist/write/post.js +105 -0
- package/dist/write/profile.d.ts +19 -0
- package/dist/write/profile.js +114 -0
- package/dist/write/seal.d.ts +3 -0
- package/dist/write/seal.js +49 -0
- package/dist/write-tools.d.ts +4 -0
- package/dist/write-tools.js +36 -0
- package/docs/consumer-guide.md +133 -0
- package/docs/examples/customer-claude-desktop.json +14 -0
- package/docs/examples/customer-consent.json +15 -0
- package/docs/examples/customer-custody.json +8 -0
- package/docs/examples/customer-policy.json +43 -0
- package/package.json +58 -4
- package/server.json +20 -0
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { verifyCerV2, verifyConfidentialV2 } from '@nexart/ai-execution';
|
|
2
|
+
import { checkInput, isObject } from '../limits.js';
|
|
3
|
+
import { hashSchema } from '../network/contracts.js';
|
|
4
|
+
export const WRITE_LIMITS = Object.freeze({ inputBytes: 65_536, responseBytes: 65_536, timeoutMs: 10_000 });
|
|
5
|
+
export const PUBLIC_PROFILE = 'nexart.mcp.ai-v2.public-disclosure.v1';
|
|
6
|
+
export const LEGACY_DISCLOSURE = 'ai-v2-resolver-reviewed-2026-11';
|
|
7
|
+
export const OPENAI_DISCLOSURE = 'ai-v2-openai-disclosure-v1';
|
|
8
|
+
export function boundedInput(value) {
|
|
9
|
+
const invalid = checkInput(value);
|
|
10
|
+
if (invalid)
|
|
11
|
+
return invalid;
|
|
12
|
+
return Buffer.byteLength(JSON.stringify(value)) > WRITE_LIMITS.inputBytes ? 'INPUT_TOO_LARGE' : undefined;
|
|
13
|
+
}
|
|
14
|
+
export function validV2(value) {
|
|
15
|
+
if (!isObject(value) || value.bundleType !== 'cer.ai.execution.v2')
|
|
16
|
+
return false;
|
|
17
|
+
try {
|
|
18
|
+
return verifyCerV2(value).ok;
|
|
19
|
+
}
|
|
20
|
+
catch {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
function exactKeys(value, allowed) {
|
|
25
|
+
return Object.keys(value).every(key => allowed.includes(key));
|
|
26
|
+
}
|
|
27
|
+
const requiredSnapshot = [
|
|
28
|
+
'type', 'protocolVersion', 'executionSurface', 'executionId', 'timestamp', 'provider',
|
|
29
|
+
'model', 'input', 'inputHash', 'parameters', 'output', 'outputHash', 'executionRole', 'confidential',
|
|
30
|
+
];
|
|
31
|
+
function envelope(value) {
|
|
32
|
+
return isObject(value) && exactKeys(value, ['_redacted', 'mode', 'commitmentScheme', 'commitment'])
|
|
33
|
+
&& value._redacted === true && value.mode === 'confidential'
|
|
34
|
+
&& value.commitmentScheme === 'hmac-sha256-v1'
|
|
35
|
+
&& typeof value.commitment === 'string';
|
|
36
|
+
}
|
|
37
|
+
/** SDK integrity first. This is a disclosure policy, NOT commitment cryptography. */
|
|
38
|
+
function confidentialCore(bundle, extras = []) {
|
|
39
|
+
if (!exactKeys(bundle, ['bundleType', 'version', 'createdAt', 'snapshot', 'certificateHash', 'protectedSet']))
|
|
40
|
+
return false;
|
|
41
|
+
if (!isObject(bundle.protectedSet) || !exactKeys(bundle.protectedSet, ['stabilitySchemeId', 'protectedSetId', 'protectedFields']))
|
|
42
|
+
return false;
|
|
43
|
+
const snapshot = bundle.snapshot;
|
|
44
|
+
if (!exactKeys(snapshot, [...requiredSnapshot, 'sdkVersion', 'identity', 'instruction', 'instructionKind', 'decisionRefs', ...extras]))
|
|
45
|
+
return false;
|
|
46
|
+
if (!envelope(snapshot.input) || !envelope(snapshot.output))
|
|
47
|
+
return false;
|
|
48
|
+
if (snapshot.instruction !== undefined && !envelope(snapshot.instruction))
|
|
49
|
+
return false;
|
|
50
|
+
if (snapshot.decisionRefs !== undefined &&
|
|
51
|
+
(!Array.isArray(snapshot.decisionRefs) || !snapshot.decisionRefs.every(ref => isObject(ref) && exactKeys(ref, ['ref', 'refForm']) && ref.refForm === 'commitment' && envelope(ref.ref))))
|
|
52
|
+
return false;
|
|
53
|
+
try {
|
|
54
|
+
return verifyConfidentialV2(bundle).state === 'AUTHENTIC';
|
|
55
|
+
}
|
|
56
|
+
catch {
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
export function confidentialProfile(bundle) {
|
|
61
|
+
return confidentialCore(bundle);
|
|
62
|
+
}
|
|
63
|
+
/** Every accepted readable value is disclosed, including identity and IO hashes.
|
|
64
|
+
* No arbitrary metadata/extension/tool/context bags. Owner approval remains mandatory.
|
|
65
|
+
*/
|
|
66
|
+
export function publicProfile(bundle) {
|
|
67
|
+
if (!confidentialProfile(bundle))
|
|
68
|
+
return false;
|
|
69
|
+
return publicDescriptors(bundle);
|
|
70
|
+
}
|
|
71
|
+
function publicDescriptors(bundle) {
|
|
72
|
+
const s = bundle.snapshot;
|
|
73
|
+
if ([s.executionId, s.provider, s.model, s.sdkVersion].some(value => value !== undefined && (value.length > 128 || /[\u0000-\u001f\u007f]/.test(value))))
|
|
74
|
+
return false;
|
|
75
|
+
if (![s.timestamp, bundle.createdAt].every(value => value.length <= 64 && Number.isFinite(Date.parse(value))))
|
|
76
|
+
return false;
|
|
77
|
+
if (![s.inputHash, s.outputHash].every(value => hashSchema.safeParse(value).success))
|
|
78
|
+
return false;
|
|
79
|
+
if (s.identity) {
|
|
80
|
+
if ([s.identity.provider, s.identity.sub].some(value => value.length > 256 || /[\u0000-\u001f\u007f]/.test(value)))
|
|
81
|
+
return false;
|
|
82
|
+
if (!hashSchema.safeParse(s.identity.assertionHash).success ||
|
|
83
|
+
(s.identity.emailHash !== undefined && !hashSchema.safeParse(s.identity.emailHash).success))
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
return s.decisionRefs === undefined || s.decisionRefs.length <= 16;
|
|
87
|
+
}
|
|
88
|
+
/** Additive profile. No rewriting/deleting fields and no wildcard metadata. */
|
|
89
|
+
export function disclosureEligible(bundle, visibility, profile = LEGACY_DISCLOSURE) {
|
|
90
|
+
if (profile === LEGACY_DISCLOSURE)
|
|
91
|
+
return visibility === 'public' ? publicProfile(bundle) : confidentialProfile(bundle);
|
|
92
|
+
if (profile !== OPENAI_DISCLOSURE || !confidentialCore(bundle, ['modelEvidence']) ||
|
|
93
|
+
bundle.snapshot.provider !== 'openai')
|
|
94
|
+
return false;
|
|
95
|
+
const evidence = bundle.snapshot.modelEvidence;
|
|
96
|
+
const bounded = (v, max) => typeof v === 'string' && v.length > 0 &&
|
|
97
|
+
v.length <= max && !/[\u0000-\u001f\u007f]/.test(v);
|
|
98
|
+
if (evidence !== undefined) {
|
|
99
|
+
if (!isObject(evidence) || !Object.keys(evidence).length ||
|
|
100
|
+
!exactKeys(evidence, ['responseDeclaredModel', 'transactionRef', 'providerEvidence']))
|
|
101
|
+
return false;
|
|
102
|
+
if (evidence.responseDeclaredModel !== undefined && !bounded(evidence.responseDeclaredModel, 128))
|
|
103
|
+
return false;
|
|
104
|
+
if (evidence.transactionRef !== undefined && !bounded(evidence.transactionRef, 256))
|
|
105
|
+
return false;
|
|
106
|
+
if (evidence.providerEvidence !== undefined && (!isObject(evidence.providerEvidence) ||
|
|
107
|
+
!exactKeys(evidence.providerEvidence, ['system_fingerprint']) ||
|
|
108
|
+
!bounded(evidence.providerEvidence.system_fingerprint, 128)))
|
|
109
|
+
return false;
|
|
110
|
+
}
|
|
111
|
+
// Use the same metadata bounds even for private provider-profile submissions.
|
|
112
|
+
return publicDescriptors(bundle);
|
|
113
|
+
}
|
|
114
|
+
//# sourceMappingURL=profile.js.map
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { createSnapshotV2, sealCerV2, } from '@nexart/ai-execution';
|
|
2
|
+
import { LIMITS } from '../limits.js';
|
|
3
|
+
import { sealInput } from './contracts.js';
|
|
4
|
+
import { boundedInput, validV2 } from './profile.js';
|
|
5
|
+
export function seal(args, config, signal) {
|
|
6
|
+
const output = {
|
|
7
|
+
contractVersion: '1', reasonCode: 'INVALID_ARGUMENTS', artifactIntegrity: 'not_performed',
|
|
8
|
+
certificateHash: null, confidential: false, identity: 'absent', bundle: null,
|
|
9
|
+
disclosure: 'not_performed',
|
|
10
|
+
limitations: [
|
|
11
|
+
'Producer-supplied execution claims are not observed or authenticated by this server.',
|
|
12
|
+
'Identity, including verified:true, is a producer declaration; no identity provider was checked.',
|
|
13
|
+
'No confidential openings or salts are generated or returned.',
|
|
14
|
+
],
|
|
15
|
+
};
|
|
16
|
+
if (!config.sealEnabled)
|
|
17
|
+
return { ...output, reasonCode: 'WRITE_DISABLED' };
|
|
18
|
+
const limit = boundedInput(args);
|
|
19
|
+
if (limit)
|
|
20
|
+
return { ...output, reasonCode: limit };
|
|
21
|
+
const parsed = sealInput.safeParse(args);
|
|
22
|
+
if (!parsed.success)
|
|
23
|
+
return output;
|
|
24
|
+
if (signal?.aborted)
|
|
25
|
+
return { ...output, reasonCode: 'CANCELLED' };
|
|
26
|
+
try {
|
|
27
|
+
const input = parsed.data;
|
|
28
|
+
const snapshot = input.mode === 'from_execution'
|
|
29
|
+
? createSnapshotV2(input.execution)
|
|
30
|
+
: input.snapshot;
|
|
31
|
+
// No meta/signals/policy input surface in this initial sealing contract.
|
|
32
|
+
const bundle = sealCerV2(snapshot, { createdAt: input.createdAt });
|
|
33
|
+
if (!validV2(bundle))
|
|
34
|
+
return { ...output, artifactIntegrity: 'invalid', reasonCode: 'SDK_VERIFICATION_FAILED' };
|
|
35
|
+
const result = {
|
|
36
|
+
...output, reasonCode: 'OK', artifactIntegrity: 'valid', certificateHash: bundle.certificateHash,
|
|
37
|
+
confidential: snapshot.confidential !== undefined,
|
|
38
|
+
identity: snapshot.identity ? 'producer_declared_not_authenticated' : 'absent',
|
|
39
|
+
disclosure: config.discloseCer ? 'full_cer' : 'summary_only',
|
|
40
|
+
bundle: config.discloseCer ? bundle : null,
|
|
41
|
+
};
|
|
42
|
+
return Buffer.byteLength(JSON.stringify(result)) > LIMITS.outputBytes
|
|
43
|
+
? { ...output, reasonCode: 'OUTPUT_TOO_LARGE' } : result;
|
|
44
|
+
}
|
|
45
|
+
catch {
|
|
46
|
+
return { ...output, artifactIntegrity: 'invalid', reasonCode: 'SDK_SEAL_REJECTED' };
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=seal.js.map
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { McpServer } from '@modelcontextprotocol/server';
|
|
2
|
+
import { type WriteConfig } from './write/config.js';
|
|
3
|
+
import { type AttestDependencies } from './write/attest.js';
|
|
4
|
+
export declare function registerWriteTools(server: McpServer, config?: WriteConfig, dependencies?: AttestDependencies): void;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { WRITE_TOOL_NAMES, sealInput, sealOutput, attestInput, attestOutput } from './write/contracts.js';
|
|
2
|
+
import { writeConfig } from './write/config.js';
|
|
3
|
+
import { seal } from './write/seal.js';
|
|
4
|
+
import { attest } from './write/attest.js';
|
|
5
|
+
import { NodeNetwork } from './network/client.js';
|
|
6
|
+
import { AttestPoster } from './write/post.js';
|
|
7
|
+
import { WRITE_LIMITS } from './write/profile.js';
|
|
8
|
+
export function registerWriteTools(server, config = writeConfig(), dependencies = {}) {
|
|
9
|
+
if (config.sealEnabled) {
|
|
10
|
+
server.registerTool(WRITE_TOOL_NAMES[0], {
|
|
11
|
+
description: 'Create ordinary AI V2 evidence from_execution, or seal an SDK-ready ordinary or already-committed from_snapshot. This tool does not create confidential commitments or openings. Use the separate owner-operated confidential creation workflow for confidential-by-default evidence. Optional identity is producer-declared, not authenticated. Full CER output requires host configuration.',
|
|
12
|
+
inputSchema: sealInput, outputSchema: sealOutput,
|
|
13
|
+
annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
|
|
14
|
+
}, (args, context) => {
|
|
15
|
+
const result = seal(args, config, context.mcpReq.signal);
|
|
16
|
+
return { content: [{ type: 'text', text: JSON.stringify(result) }], structuredContent: result };
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
if (config.attestEnabled) {
|
|
20
|
+
// Share one semaphore/queue across every write call on this server.
|
|
21
|
+
const writeDependencies = {
|
|
22
|
+
...dependencies,
|
|
23
|
+
network: dependencies.network ?? new NodeNetwork(undefined, WRITE_LIMITS.timeoutMs),
|
|
24
|
+
poster: dependencies.poster ?? new AttestPoster(),
|
|
25
|
+
};
|
|
26
|
+
server.registerTool(WRITE_TOOL_NAMES[1], {
|
|
27
|
+
description: 'Submit an already-sealed eligible confidential AI V2 CER to the fixed Canonical Node. Omitted visibility defaults public; explicit private remains private. Public selection is NOT permission: host enablement AND exact-payload single-use independent owner approval are required outside MCP. No fallback to private. May consume quota; no automatic retries. Signature, trust, identity declarations and visibility are separate.',
|
|
28
|
+
inputSchema: attestInput, outputSchema: attestOutput,
|
|
29
|
+
annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: true },
|
|
30
|
+
}, async (args, context) => {
|
|
31
|
+
const result = await attest(args, config, writeDependencies, context.mcpReq.signal);
|
|
32
|
+
return { content: [{ type: 'text', text: JSON.stringify(result) }], structuredContent: result };
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=write-tools.js.map
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# NexArt MCP consumer guide
|
|
2
|
+
|
|
3
|
+
## Installation and compatibility
|
|
4
|
+
|
|
5
|
+
Use Node.js 24 (`>=24.0.0 <25`) and install `@nexart/mcp-server@0.2.0`
|
|
6
|
+
after the owner publishes that version. This repository currently prepares an
|
|
7
|
+
unpublished release candidate; npm/Registry publication is a separate action.
|
|
8
|
+
The npm package runs over stdio. Use an absolute Node/executable path when a
|
|
9
|
+
desktop client has a different PATH. Protocols `2025-11-25` and `2026-07-28`
|
|
10
|
+
are exercised independently. Host UI compatibility requires a real client test;
|
|
11
|
+
MCP conformance is not a guarantee of every provider's strict-schema subset.
|
|
12
|
+
|
|
13
|
+
The hosted HTTPS service is separate from the npm stdio process. Production
|
|
14
|
+
infrastructure and operator acceptance procedures are not part of this package.
|
|
15
|
+
Connecting through a remote client's Streamable HTTP configuration does not
|
|
16
|
+
enable certification or grant customer authority.
|
|
17
|
+
|
|
18
|
+
## Tools and schemas
|
|
19
|
+
|
|
20
|
+
Default discovery exposes exactly seven read-only verification/lookup tools:
|
|
21
|
+
|
|
22
|
+
| Tool | Scope |
|
|
23
|
+
| --- | --- |
|
|
24
|
+
| `nexart_verify_ai_cer` | AI CER V1/V2 integrity through the published AI SDK |
|
|
25
|
+
| `nexart_verify_consequential_cer` | Consequential CER integrity |
|
|
26
|
+
| `nexart_verify_governed_execution` | Governed execution versions 0.1/0.2 |
|
|
27
|
+
| `nexart_verify_project_bundle` | Project Bundle and embedded artifact integrity |
|
|
28
|
+
| `nexart_lookup_cer` | Bounded public CER lookup and local integrity verification |
|
|
29
|
+
| `nexart_lookup_project_bundle` | Bounded public Project Bundle lookup |
|
|
30
|
+
| `nexart_verify_node_receipt` | CER receipt signature, binding and separate trust checks |
|
|
31
|
+
|
|
32
|
+
The four inline verifiers take a strict `{ "bundle": <JSON value> }` argument
|
|
33
|
+
envelope. Any JSON value is accepted for examination: malformed/non-object
|
|
34
|
+
artifacts produce structured failures, not successful verification. Published
|
|
35
|
+
SDKs own artifact-family, version and cryptographic validation. No second MCP
|
|
36
|
+
artifact schema strips or rewrites evidence. Extra envelope keys are rejected.
|
|
37
|
+
|
|
38
|
+
Lookup arguments are exactly `certificateHash` or `projectHash`, respectively,
|
|
39
|
+
formatted `sha256:<64 lowercase hexadecimal digits>`. Lookup does not forward raw
|
|
40
|
+
evidence, canonical payloads, private identifiers or receipt bodies to the model.
|
|
41
|
+
Not-found and not-public are deliberately indistinguishable.
|
|
42
|
+
|
|
43
|
+
Receipt arguments have `source` (`inline` or `public_lookup`) and an expected
|
|
44
|
+
`certificateHash`. Inline mode requires `receipt` plus `signatureB64Url`;
|
|
45
|
+
public lookup forbids supplying either. Receipts are examined before strict
|
|
46
|
+
supported-version parsing so unsupported versions retain explicit outcomes.
|
|
47
|
+
Project receipts are not supported by the CER receipt verifier.
|
|
48
|
+
|
|
49
|
+
Discovery spells any-JSON inputs with typed `anyOf` branches. SDK metadata maps
|
|
50
|
+
use `additionalProperties: true`. These are equivalent descriptions of the
|
|
51
|
+
existing runtime contracts, not new validation or publication permissions.
|
|
52
|
+
They do not promise compatibility with closed-object grammar-constrained APIs.
|
|
53
|
+
|
|
54
|
+
## Results and limits
|
|
55
|
+
|
|
56
|
+
Logical contract version remains `1`. Outputs separate artifact integrity,
|
|
57
|
+
reason codes and a bounded/redacted SDK projection. Legacy results include
|
|
58
|
+
structured content and JSON text; modern transport encoding may differ.
|
|
59
|
+
Invalid artifacts do not become valid because the MCP call itself succeeded.
|
|
60
|
+
|
|
61
|
+
Inline limits include 1 MiB serialized arguments, depth 64, 25,000 JSON nodes,
|
|
62
|
+
4,096 keys/items per container, 100 project steps and 256 KiB logical output.
|
|
63
|
+
Network tools have additional response, timeout and concurrency bounds.
|
|
64
|
+
Inputs are not truncated. Synchronous SDK verification is not preemptible.
|
|
65
|
+
SDK errors/details/warnings are redacted, not copied as evidence-bearing text.
|
|
66
|
+
|
|
67
|
+
## Customer recording setup
|
|
68
|
+
|
|
69
|
+
Recording is opt-in through `NEXART_ENABLE_RECORD=true`; default discovery has
|
|
70
|
+
no recording tool. Explicit `certification: {"mode":"local"}` performs no Node
|
|
71
|
+
submission. A key alone does not authorise automatic or public certification.
|
|
72
|
+
|
|
73
|
+
Reviewed placeholder examples:
|
|
74
|
+
|
|
75
|
+
- [Claude Desktop configuration](examples/customer-claude-desktop.json)
|
|
76
|
+
- [Disabled customer consent](examples/customer-consent.json)
|
|
77
|
+
- [Age-encrypted custody](examples/customer-custody.json)
|
|
78
|
+
- [Customer policy](examples/customer-policy.json)
|
|
79
|
+
|
|
80
|
+
Replace placeholders locally, never in chat or public logs. The example policy
|
|
81
|
+
is deliberately expired and consent is disabled. Review new dates, account/key
|
|
82
|
+
binding, the actual credential fingerprint, recipient, readable fields,
|
|
83
|
+
visibility and quota/retention consequences before explicitly approving them.
|
|
84
|
+
Never treat an example maximum as a Node-enforced account or per-key quota.
|
|
85
|
+
|
|
86
|
+
Use owner-only configuration files (0600), directories (0700) and safe ancestors.
|
|
87
|
+
Custody requires an approved age X25519 public recipient and an absolute real
|
|
88
|
+
native age executable path. Stable age versions `>=1.2.1 <2` accept both `1.x`
|
|
89
|
+
and `v1.x` version output; malformed/prerelease output fails closed. Keep the
|
|
90
|
+
private age identity on the owner device, outside MCP configuration and custody.
|
|
91
|
+
Missing/invalid custody fails closed. Do not weaken ownership/TLS safeguards.
|
|
92
|
+
|
|
93
|
+
Customer delegation requires explicit enabled consent and matching policy,
|
|
94
|
+
including credential/account context, fingerprint, expiry/revocation, permitted
|
|
95
|
+
disclosure and durable state. Review the complete example before enabling it.
|
|
96
|
+
Omitted certification visibility expresses public intent, not authority.
|
|
97
|
+
Private and local-only modes remain available; there is no silent downgrade.
|
|
98
|
+
Legacy isolated-owner approval and optional seal/attest tools remain separate.
|
|
99
|
+
An agent controlling the same OS account can access that account's credentials
|
|
100
|
+
and policy; local approvals/counters do not create an isolation boundary.
|
|
101
|
+
|
|
102
|
+
## Recovery and security
|
|
103
|
+
|
|
104
|
+
Commitments protect selected fields, not all metadata. Public CERs can expose
|
|
105
|
+
readable metadata, commitments, signatures and canonical proofs permanently.
|
|
106
|
+
Encryption at rest does not hide plaintext from an agent already handling it.
|
|
107
|
+
Recovery requires retained plaintext plus every committed field's opening.
|
|
108
|
+
The owner recovery executables are included, but private recovery files are not.
|
|
109
|
+
Never expose openings, salts, private identities or customer keys through MCP.
|
|
110
|
+
Native age decryption and SDK opening verification belong on the owner host.
|
|
111
|
+
|
|
112
|
+
Integrity, receipt signature mathematics, hash binding, Node identity, key
|
|
113
|
+
lifecycle and independently approved signer trust are separate conclusions.
|
|
114
|
+
No production trust pins or historical exceptions are supplied by default.
|
|
115
|
+
A valid signature may therefore report `UNAPPROVED_KEY`/trust not established.
|
|
116
|
+
The tools do not establish execution truth, producer authenticity, completeness
|
|
117
|
+
or RFC 3161 timestamp cryptography. Receipt verification is not verification
|
|
118
|
+
of a separate verification-envelope signature.
|
|
119
|
+
|
|
120
|
+
A timeout or ambiguous certification response may follow a committed operation.
|
|
121
|
+
Retain ciphertext and attempt evidence; reconcile read-only. Never automatically
|
|
122
|
+
retry, reseal or substitute an execution ID. See [SECURITY.md](../SECURITY.md)
|
|
123
|
+
for private vulnerability reporting and [third-party notices](../THIRD_PARTY_NOTICES.md)
|
|
124
|
+
for licensing boundaries. Original MCP code is Apache-2.0; SDKs retain their own rights.
|
|
125
|
+
|
|
126
|
+
## Release policy
|
|
127
|
+
|
|
128
|
+
Minor 0.x releases may add capabilities; this release hardening preserves the
|
|
129
|
+
existing logical contracts and negative outcomes. Pin versions for repeatability.
|
|
130
|
+
Publication and Registry registration remain owner-controlled. Never overwrite
|
|
131
|
+
a published npm version. Internal deployment/acceptance evidence is intentionally
|
|
132
|
+
excluded from the consumer archive; repository tests validate an exact allowlist,
|
|
133
|
+
synthetic tool execution and installation outside the development workspace.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"mcpServers": {
|
|
3
|
+
"nexart": {
|
|
4
|
+
"command": "/absolute/real/path/to/node",
|
|
5
|
+
"args": ["/absolute/path/to/consumer/node_modules/@nexart/mcp-server/dist/stdio.js"],
|
|
6
|
+
"env": {
|
|
7
|
+
"NEXART_ENABLE_RECORD": "true",
|
|
8
|
+
"NEXART_RECORD_CUSTODY_CONFIG": "/absolute/path/to/nexart/custody.json",
|
|
9
|
+
"NEXART_RECORD_CERTIFICATION_CONFIG": "/absolute/path/to/nexart/consent.json",
|
|
10
|
+
"NEXART_NODE_API_KEY": "REPLACE_LOCALLY_WITH_CUSTOMER_KEY_NEVER_IN_CHAT"
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"mode": "customer_delegated",
|
|
4
|
+
"enabled": false,
|
|
5
|
+
"automaticNodeSubmissions": false,
|
|
6
|
+
"publicDisclosureAcknowledged": false,
|
|
7
|
+
"quotaConsumptionAcknowledged": false,
|
|
8
|
+
"revoked": false,
|
|
9
|
+
"expiresAt": "2030-01-01T00:00:00.000Z",
|
|
10
|
+
"accountContext": "REPLACE_ACCOUNT_LABEL",
|
|
11
|
+
"credentialContext": "REPLACE_KEY_LABEL",
|
|
12
|
+
"policyFile": "/absolute/path/to/nexart/policy.json",
|
|
13
|
+
"stateDirectory": "/absolute/path/to/nexart/attempts",
|
|
14
|
+
"approvalDirectory": "/absolute/path/to/nexart/approvals"
|
|
15
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"id": "customer-recording",
|
|
4
|
+
"revision": 1,
|
|
5
|
+
"accountContext": "REPLACE_ACCOUNT_LABEL",
|
|
6
|
+
"credentialContext": "REPLACE_KEY_LABEL",
|
|
7
|
+
"credentialFingerprint": "REPLACE_WITH_SHA256_OF_CONFIGURED_KEY",
|
|
8
|
+
"destination": "https://node.nexart.io/api/attest",
|
|
9
|
+
"evidenceTypes": ["cer.ai.execution.v2"],
|
|
10
|
+
"captureSources": ["producer_supplied"],
|
|
11
|
+
"visibilities": ["public", "private"],
|
|
12
|
+
"requiredConfidentialFields": ["input", "output"],
|
|
13
|
+
"identityDisclosure": "forbid",
|
|
14
|
+
"nodeDisclosureProfile": "ai-v2-resolver-reviewed-2026-11",
|
|
15
|
+
"maximumCertifications": 10,
|
|
16
|
+
"periodStartsAt": "2026-11-12T00:00:00.000Z",
|
|
17
|
+
"periodEndsAt": "2026-11-13T00:00:00.000Z",
|
|
18
|
+
"expiresAt": "2026-11-13T00:00:00.000Z",
|
|
19
|
+
"revoked": false,
|
|
20
|
+
"readableFields": [
|
|
21
|
+
"/bundleType", "/certificateHash", "/createdAt", "/version",
|
|
22
|
+
"/snapshot/type", "/snapshot/protocolVersion", "/snapshot/executionSurface",
|
|
23
|
+
"/snapshot/executionId", "/snapshot/timestamp", "/snapshot/provider", "/snapshot/model",
|
|
24
|
+
"/snapshot/input/_redacted", "/snapshot/input/mode",
|
|
25
|
+
"/snapshot/input/commitmentScheme", "/snapshot/input/commitment", "/snapshot/inputHash",
|
|
26
|
+
"/snapshot/parameters/temperature", "/snapshot/parameters/maxTokens",
|
|
27
|
+
"/snapshot/parameters/topP", "/snapshot/parameters/seed",
|
|
28
|
+
"/snapshot/output/_redacted", "/snapshot/output/mode",
|
|
29
|
+
"/snapshot/output/commitmentScheme", "/snapshot/output/commitment", "/snapshot/outputHash",
|
|
30
|
+
"/snapshot/executionRole", "/snapshot/sdkVersion",
|
|
31
|
+
"/snapshot/confidential/scheme", "/snapshot/confidential/fields/0",
|
|
32
|
+
"/snapshot/confidential/fields/1",
|
|
33
|
+
"/protectedSet/stabilitySchemeId", "/protectedSet/protectedSetId",
|
|
34
|
+
"/protectedSet/protectedFields/0", "/protectedSet/protectedFields/1",
|
|
35
|
+
"/protectedSet/protectedFields/2", "/protectedSet/protectedFields/3",
|
|
36
|
+
"/protectedSet/protectedFields/4", "/protectedSet/protectedFields/5",
|
|
37
|
+
"/protectedSet/protectedFields/6", "/protectedSet/protectedFields/7",
|
|
38
|
+
"/protectedSet/protectedFields/8", "/protectedSet/protectedFields/9",
|
|
39
|
+
"/protectedSet/protectedFields/10", "/protectedSet/protectedFields/11",
|
|
40
|
+
"/protectedSet/protectedFields/12", "/protectedSet/protectedFields/13",
|
|
41
|
+
"/protectedSet/protectedFields/14"
|
|
42
|
+
]
|
|
43
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,60 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexart/mcp-server",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"mcpName": "io.github.artnames/nexart-mcp-server",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"registry": "https://registry.npmjs.org/",
|
|
7
|
+
"access": "public"
|
|
8
|
+
},
|
|
9
|
+
"description": "NexArt verification, bounded lookup and opt-in AI V2 sealing and attestation over MCP stdio",
|
|
10
|
+
"license": "Apache-2.0",
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/artnames/nexart-mcp-server.git"
|
|
14
|
+
},
|
|
15
|
+
"packageManager": "pnpm@10.26.1",
|
|
16
|
+
"type": "module",
|
|
17
|
+
"engines": { "node": ">=24.0.0 <25" },
|
|
18
|
+
"bin": {
|
|
19
|
+
"mcp-server": "./dist/stdio.js",
|
|
20
|
+
"nexart-mcp-server": "./dist/stdio.js",
|
|
21
|
+
"nexart-mcp-approve-public": "./dist/approve-public.js",
|
|
22
|
+
"nexart-create-confidential": "./dist/create-confidential.js",
|
|
23
|
+
"nexart-recover-confidential": "./dist/recover-confidential.js"
|
|
24
|
+
},
|
|
25
|
+
"files": [
|
|
26
|
+
"dist/**/*.js", "dist/**/*.d.ts",
|
|
27
|
+
"docs/consumer-guide.md",
|
|
28
|
+
"docs/examples/customer-claude-desktop.json",
|
|
29
|
+
"docs/examples/customer-consent.json",
|
|
30
|
+
"docs/examples/customer-custody.json",
|
|
31
|
+
"docs/examples/customer-policy.json",
|
|
32
|
+
"./server.json",
|
|
33
|
+
"./THIRD_PARTY_NOTICES.md", "./CHANGELOG.md", "./SECURITY.md", "./CONTRIBUTING.md",
|
|
34
|
+
"./LICENSE", "./NOTICE"
|
|
35
|
+
],
|
|
36
|
+
"scripts": {
|
|
37
|
+
"build": "tsc -p tsconfig.json",
|
|
38
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
39
|
+
"start": "node dist/stdio.js",
|
|
40
|
+
"test": "node --test --test-concurrency=1 tests/*.test.mjs tests/validation/*.test.mjs",
|
|
41
|
+
"test:hosted": "pnpm --filter @nexart/mcp-hosted test",
|
|
42
|
+
"benchmark": "node tests/benchmark.mjs",
|
|
43
|
+
"evidence": "node tests/transport-evidence.mjs",
|
|
44
|
+
"check:clean-install": "node tests/release-validation.mjs",
|
|
45
|
+
"validate:release": "node tests/release-validation.mjs"
|
|
46
|
+
},
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"@modelcontextprotocol/server": "2.4.0",
|
|
49
|
+
"@nexart/ai-execution": "1.4.0",
|
|
50
|
+
"@nexart/consequential-execution": "0.1.0",
|
|
51
|
+
"@nexart/governed-execution": "0.4.2",
|
|
52
|
+
"zod": "4.6.7"
|
|
53
|
+
},
|
|
54
|
+
"devDependencies": {
|
|
55
|
+
"@modelcontextprotocol/client": "2.4.0",
|
|
56
|
+
"@modelcontextprotocol/core": "2.4.0",
|
|
57
|
+
"@types/node": "25.3.3",
|
|
58
|
+
"typescript": "5.9.3"
|
|
59
|
+
}
|
|
60
|
+
}
|
package/server.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
|
|
3
|
+
"name": "io.github.artnames/nexart-mcp-server",
|
|
4
|
+
"title": "NexArt MCP Server",
|
|
5
|
+
"description": "Verify NexArt evidence and opt in to confidential AI recording and authorised Node certification.",
|
|
6
|
+
"repository": {
|
|
7
|
+
"url": "https://github.com/artnames/nexart-mcp-server",
|
|
8
|
+
"source": "github"
|
|
9
|
+
},
|
|
10
|
+
"version": "0.2.0",
|
|
11
|
+
"packages": [
|
|
12
|
+
{
|
|
13
|
+
"registryType": "npm",
|
|
14
|
+
"registryBaseUrl": "https://registry.npmjs.org",
|
|
15
|
+
"identifier": "@nexart/mcp-server",
|
|
16
|
+
"version": "0.2.0",
|
|
17
|
+
"transport": { "type": "stdio" }
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|