@nexart/mcp-server 0.1.0 → 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 +63 -8
- package/CONTRIBUTING.md +7 -5
- package/README.md +47 -31
- package/SECURITY.md +8 -7
- package/THIRD_PARTY_NOTICES.md +2 -2
- package/dist/contracts.js +3 -2
- package/dist/json-schema.d.ts +9 -0
- package/dist/json-schema.js +20 -0
- package/dist/lookup/contracts.js +2 -1
- package/dist/network/contracts.d.ts +2 -2
- package/dist/owner/custody.d.ts +3 -0
- package/dist/owner/custody.js +26 -16
- package/dist/protocol-safety.d.ts +3 -0
- package/dist/protocol-safety.js +16 -0
- package/dist/receipts/contracts.d.ts +2 -2
- package/dist/receipts/contracts.js +2 -1
- package/dist/record/contracts.d.ts +42 -0
- package/dist/record/contracts.js +5 -0
- package/dist/record/record.d.ts +3 -0
- package/dist/record/record.js +6 -2
- package/dist/record-tools.d.ts +3 -0
- package/dist/record-tools.js +15 -5
- package/dist/server.d.ts +11 -1
- package/dist/server.js +5 -5
- package/dist/stdio.js +3 -19
- package/dist/write/attest.d.ts +3 -0
- package/dist/write/attest.js +2 -1
- package/dist/write/contracts.d.ts +2 -2
- package/docs/consumer-guide.md +133 -0
- package/package.json +11 -4
- package/server.json +2 -2
- package/docs/age-version-compatibility.md +0 -46
- package/docs/architecture.md +0 -72
- package/docs/compatibility.md +0 -163
- package/docs/contracts.md +0 -127
- package/docs/licensing-review.md +0 -109
- package/docs/milestone-1-validation.md +0 -110
- package/docs/milestone-2.md +0 -291
- package/docs/milestone-3.2.md +0 -291
- package/docs/milestone-3.md +0 -274
- package/docs/milestone-4a.md +0 -221
- package/docs/milestone-4b1.md +0 -220
- package/docs/milestone-4b2.md +0 -260
- package/docs/public-default.md +0 -263
- package/docs/recording-schema-compatibility.md +0 -46
- package/docs/release.md +0 -311
- package/docs/security-fixes.md +0 -47
- package/docs/security.md +0 -195
- package/docs/standalone-acceptance.md +0 -81
- package/docs/validation.md +0 -85
|
@@ -1,4 +1,24 @@
|
|
|
1
1
|
import * as z from 'zod/v4';
|
|
2
|
+
export declare const receiptProofSchema: z.ZodObject<{
|
|
3
|
+
receipt: z.ZodObject<{
|
|
4
|
+
receiptVersion: z.ZodLiteral<"attestation.receipt.v1">;
|
|
5
|
+
attestationId: z.ZodString;
|
|
6
|
+
certificateHash: z.ZodString;
|
|
7
|
+
nodeRuntimeHash: z.ZodString;
|
|
8
|
+
protocolVersion: z.ZodEnum<{
|
|
9
|
+
"1.2.0": "1.2.0";
|
|
10
|
+
"1.3.0": "1.3.0";
|
|
11
|
+
"1.3.1": "1.3.1";
|
|
12
|
+
}>;
|
|
13
|
+
nodeId: z.ZodString;
|
|
14
|
+
attestorKeyId: z.ZodString;
|
|
15
|
+
attestedAt: z.ZodOptional<z.ZodString>;
|
|
16
|
+
timestampType: z.ZodOptional<z.ZodString>;
|
|
17
|
+
timestampStatus: z.ZodOptional<z.ZodString>;
|
|
18
|
+
timestampProvider: z.ZodOptional<z.ZodString>;
|
|
19
|
+
}, z.core.$strict>;
|
|
20
|
+
signatureB64Url: z.ZodString;
|
|
21
|
+
}, z.core.$strict>;
|
|
2
22
|
export declare const recordInput: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
3
23
|
kind: z.ZodLiteral<"execution">;
|
|
4
24
|
execution: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
@@ -181,6 +201,8 @@ export declare const recordDiscoveryInput: z.ZodObject<{
|
|
|
181
201
|
}, z.core.$strict>;
|
|
182
202
|
export type CaptureSource = 'producer_supplied' | 'instrumented_provider_call';
|
|
183
203
|
export interface RecordResult {
|
|
204
|
+
/** Hosted-only additive proof; never contains recovery openings. */
|
|
205
|
+
receiptProof?: z.infer<typeof receiptProofSchema>;
|
|
184
206
|
contractVersion: '1';
|
|
185
207
|
captureProvenance: CaptureSource;
|
|
186
208
|
evidence: 'not_created' | 'created_confidential' | 'existing_unchanged' | 'custody_failed' | 'invalid';
|
|
@@ -204,6 +226,26 @@ export interface RecordResult {
|
|
|
204
226
|
};
|
|
205
227
|
}
|
|
206
228
|
export declare const recordOutput: z.ZodObject<{
|
|
229
|
+
receiptProof: z.ZodOptional<z.ZodObject<{
|
|
230
|
+
receipt: z.ZodObject<{
|
|
231
|
+
receiptVersion: z.ZodLiteral<"attestation.receipt.v1">;
|
|
232
|
+
attestationId: z.ZodString;
|
|
233
|
+
certificateHash: z.ZodString;
|
|
234
|
+
nodeRuntimeHash: z.ZodString;
|
|
235
|
+
protocolVersion: z.ZodEnum<{
|
|
236
|
+
"1.2.0": "1.2.0";
|
|
237
|
+
"1.3.0": "1.3.0";
|
|
238
|
+
"1.3.1": "1.3.1";
|
|
239
|
+
}>;
|
|
240
|
+
nodeId: z.ZodString;
|
|
241
|
+
attestorKeyId: z.ZodString;
|
|
242
|
+
attestedAt: z.ZodOptional<z.ZodString>;
|
|
243
|
+
timestampType: z.ZodOptional<z.ZodString>;
|
|
244
|
+
timestampStatus: z.ZodOptional<z.ZodString>;
|
|
245
|
+
timestampProvider: z.ZodOptional<z.ZodString>;
|
|
246
|
+
}, z.core.$strict>;
|
|
247
|
+
signatureB64Url: z.ZodString;
|
|
248
|
+
}, z.core.$strict>>;
|
|
207
249
|
contractVersion: z.ZodLiteral<"1">;
|
|
208
250
|
captureProvenance: z.ZodEnum<{
|
|
209
251
|
producer_supplied: "producer_supplied";
|
package/dist/record/contracts.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import * as z from 'zod/v4';
|
|
2
2
|
import { executionSchema, identitySchema } from '../write/contracts.js';
|
|
3
3
|
import { hashSchema } from '../network/contracts.js';
|
|
4
|
+
import { receiptSchema } from '../receipts/contracts.js';
|
|
5
|
+
export const receiptProofSchema = z.strictObject({
|
|
6
|
+
receipt: receiptSchema, signatureB64Url: z.string().regex(/^[A-Za-z0-9_-]{86}$/),
|
|
7
|
+
});
|
|
4
8
|
const certification = z.strictObject({
|
|
5
9
|
mode: z.enum(['node', 'local']).default('node'),
|
|
6
10
|
visibility: z.enum(['public', 'private']).optional(),
|
|
@@ -50,6 +54,7 @@ export const recordDiscoveryInput = z.strictObject({
|
|
|
50
54
|
certification: certification.optional(),
|
|
51
55
|
});
|
|
52
56
|
export const recordOutput = z.strictObject({
|
|
57
|
+
receiptProof: receiptProofSchema.optional(),
|
|
53
58
|
contractVersion: z.literal('1'),
|
|
54
59
|
captureProvenance: z.enum(['producer_supplied', 'instrumented_provider_call']),
|
|
55
60
|
evidence: z.enum(['not_created', 'created_confidential', 'existing_unchanged', 'custody_failed', 'invalid']),
|
package/dist/record/record.d.ts
CHANGED
|
@@ -3,6 +3,9 @@ import { type CaptureSource, type RecordResult, type PreparedRecord, type Public
|
|
|
3
3
|
/** Trusted application configuration, never MCP arguments. Credential discovery
|
|
4
4
|
* belongs to the explicitly configured publisher, not this recording library. */
|
|
5
5
|
export interface RecordRuntime {
|
|
6
|
+
/** Trusted embedding port: must verify and durably retain encrypted recovery
|
|
7
|
+
* before returning the SDK CER. Never populated from environment/tool input. */
|
|
8
|
+
createConfidential?: (creation: unknown) => Promise<unknown>;
|
|
6
9
|
custodyDirectory?: string;
|
|
7
10
|
recoveryStorage?: 'unencrypted_owner_approved';
|
|
8
11
|
encryptedCustody?: EncryptedCustody;
|
package/dist/record/record.js
CHANGED
|
@@ -27,7 +27,7 @@ export async function recordExecution(raw, runtime = {}) {
|
|
|
27
27
|
result.policyAuthorization = mode === 'local' ? 'not_required' : 'setup_required';
|
|
28
28
|
let bundle;
|
|
29
29
|
if (input.kind === 'execution') {
|
|
30
|
-
if (!runtime.encryptedCustody && (!runtime.custodyDirectory || runtime.recoveryStorage !== 'unencrypted_owner_approved')) {
|
|
30
|
+
if (!runtime.createConfidential && !runtime.encryptedCustody && (!runtime.custodyDirectory || runtime.recoveryStorage !== 'unencrypted_owner_approved')) {
|
|
31
31
|
return { ...result, evidence: 'custody_failed', reasonCode: 'APPROVED_CUSTODY_REQUIRED' };
|
|
32
32
|
}
|
|
33
33
|
try {
|
|
@@ -39,7 +39,11 @@ export async function recordExecution(raw, runtime = {}) {
|
|
|
39
39
|
decisionRefIndexes: Array.isArray(input.execution.decisionRefs)
|
|
40
40
|
? input.execution.decisionRefs.map((_, i) => i) : [],
|
|
41
41
|
};
|
|
42
|
-
if (runtime.
|
|
42
|
+
if (runtime.createConfidential) {
|
|
43
|
+
bundle = await runtime.createConfidential(creation);
|
|
44
|
+
result.custody = 'encrypted_owner_recipient';
|
|
45
|
+
}
|
|
46
|
+
else if (runtime.encryptedCustody) {
|
|
43
47
|
bundle = createEncryptedConfidential(creation, runtime.encryptedCustody);
|
|
44
48
|
result.custody = 'encrypted_owner_recipient';
|
|
45
49
|
}
|
package/dist/record-tools.d.ts
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import type { McpServer } from '@modelcontextprotocol/server';
|
|
2
2
|
import { type EncryptedCustody } from './owner/custody.js';
|
|
3
|
+
import { type RecordResult } from './record/contracts.js';
|
|
3
4
|
import type { RecordRuntime } from './record/record.js';
|
|
4
5
|
export interface RecordingConfig {
|
|
5
6
|
enabled: boolean;
|
|
6
7
|
custody?: EncryptedCustody;
|
|
7
8
|
publish?: RecordRuntime['publish'];
|
|
9
|
+
/** Trusted hosted embedding only; no environment/stdio selector. */
|
|
10
|
+
execute?: (args: unknown) => Promise<RecordResult>;
|
|
8
11
|
}
|
|
9
12
|
export declare function recordingConfig(env?: NodeJS.ProcessEnv): RecordingConfig;
|
|
10
13
|
export declare function registerRecordingTool(server: McpServer, config?: RecordingConfig): void;
|
package/dist/record-tools.js
CHANGED
|
@@ -10,6 +10,14 @@ const custodyConfig = z.strictObject({
|
|
|
10
10
|
version: z.literal(1), directory: z.string().min(1), ageExecutable: z.string().min(1),
|
|
11
11
|
recipient: z.string().min(1), ownerApproved: z.literal(true), decryptionIdentityExcluded: z.literal(true),
|
|
12
12
|
});
|
|
13
|
+
const hostedDiscovery = recordDiscoveryInput.omit({ bundle: true }).extend({
|
|
14
|
+
kind: z.literal('execution'),
|
|
15
|
+
execution: recordDiscoveryInput.shape.execution.unwrap(),
|
|
16
|
+
createdAt: recordDiscoveryInput.shape.createdAt.unwrap(),
|
|
17
|
+
certification: z.strictObject({
|
|
18
|
+
mode: z.literal('node').default('node'), visibility: z.enum(['public', 'private']).optional(),
|
|
19
|
+
}).optional(),
|
|
20
|
+
});
|
|
13
21
|
// Constant guidance only: never interpolate credentials, arguments or paths.
|
|
14
22
|
const SETUP_MESSAGES = Object.freeze({
|
|
15
23
|
CUSTODY_CONFIG_MISSING: 'Configure the owner-only NEXART_RECORD_CUSTODY_CONFIG JSON before execution recording.',
|
|
@@ -57,9 +65,11 @@ export function registerRecordingTool(server, config = recordingConfig()) {
|
|
|
57
65
|
if (!config.enabled)
|
|
58
66
|
return;
|
|
59
67
|
server.registerTool('nexart_record_execution', {
|
|
60
|
-
description:
|
|
61
|
-
|
|
62
|
-
|
|
68
|
+
description: config.execute
|
|
69
|
+
? 'Create and certify a new confidential AI V2 execution using the customer API key in the HTTP Authorization header and the approved NexArt dashboard policy. May consume the customer account allowance. Existing CERs and local-only mode are unsupported on hosted HTTP. Model/provider require policy approval; other optional readable metadata is rejected. Structural IDs, timestamps, parameters, roles, SDK version, hashes and commitment descriptors remain readable. Input/output, instructions and decision references receive confidential commitments and durable age-encrypted recovery custody before submission. Producer-supplied data is not an authenticated provider observation. No plaintext/openings returned. Keep a stable executionId on retries; uncertain submissions are never automatically repeated.'
|
|
70
|
+
: 'Record producer-supplied execution data as confidential AI V2 with encrypted recovery custody, or verify an unchanged existing confidential AI V2 CER. Node/public is the default intent. Automatic submission requires customer-configured API key, explicit delegation consent and disclosure policy; may consume quota. Missing setup is reported, never silently falls back. Explicit private and local-only supported. Does not observe all host interactions or authenticate a provider call. No openings or plaintext returned. No automatic POST retries.',
|
|
71
|
+
inputSchema: config.execute ? hostedDiscovery : recordDiscoveryInput, outputSchema: recordOutput,
|
|
72
|
+
annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: Boolean(config.execute || config.publish) },
|
|
63
73
|
}, async (args) => {
|
|
64
74
|
// Discovery optionality never authorizes a partial or mixed branch.
|
|
65
75
|
// Validate before reading runtime custody or calling any recording path.
|
|
@@ -69,14 +79,14 @@ export function registerRecordingTool(server, config = recordingConfig()) {
|
|
|
69
79
|
isError: true, content: [{ type: 'text', text: 'INVALID_RECORDING_ARGUMENTS' }],
|
|
70
80
|
};
|
|
71
81
|
// Only explicitly configured customer delegation; never tool-controlled policy.
|
|
72
|
-
const result = await recordExecution(parsed.data, {
|
|
82
|
+
const result = config.execute ? await config.execute(parsed.data) : await recordExecution(parsed.data, {
|
|
73
83
|
captureSource: 'producer_supplied', ...(config.custody ? { encryptedCustody: config.custody } : {}),
|
|
74
84
|
...(config.publish ? { publish: config.publish } : {}),
|
|
75
85
|
});
|
|
76
86
|
const diagnostic = result.reasonCode === 'APPROVED_CUSTODY_REQUIRED'
|
|
77
87
|
? custodySetupDiagnostics.get(config) ?? 'CUSTODY_CONFIG_MISSING' : result.reasonCode;
|
|
78
88
|
const guidance = SETUP_MESSAGES[diagnostic];
|
|
79
|
-
return { content: [
|
|
89
|
+
return { ...(config.execute && result.submission !== 'node_reported_accepted' ? { isError: true } : {}), content: [
|
|
80
90
|
{ type: 'text', text: JSON.stringify(result) },
|
|
81
91
|
...(guidance ? [{ type: 'text', text: `${diagnostic}: ${guidance}` }] : []),
|
|
82
92
|
], structuredContent: result };
|
package/dist/server.d.ts
CHANGED
|
@@ -1,2 +1,12 @@
|
|
|
1
1
|
import { McpServer } from '@modelcontextprotocol/server';
|
|
2
|
-
|
|
2
|
+
import type { RecordingConfig } from './record-tools.js';
|
|
3
|
+
import type { WriteConfig } from './write/config.js';
|
|
4
|
+
import type { NodeNetwork } from './network/client.js';
|
|
5
|
+
/** Trusted host inputs, never MCP arguments. HTTP callers must supply explicit
|
|
6
|
+
* request-scoped configuration rather than inheriting a stdio owner's environment. */
|
|
7
|
+
export interface ServerRuntime {
|
|
8
|
+
network?: NodeNetwork;
|
|
9
|
+
write?: WriteConfig;
|
|
10
|
+
recording?: RecordingConfig;
|
|
11
|
+
}
|
|
12
|
+
export declare function createServer(runtime?: ServerRuntime): McpServer;
|
package/dist/server.js
CHANGED
|
@@ -10,8 +10,8 @@ const DESCRIPTIONS = [
|
|
|
10
10
|
'Verify inline governed execution 0.1/0.2 with explicit version dispatch. No state-hash or producer authentication.',
|
|
11
11
|
'Verify an inline Project Bundle and embedded AI CERs using the SDK; require project hash integrity.',
|
|
12
12
|
];
|
|
13
|
-
export function createServer() {
|
|
14
|
-
const server = new McpServer({ name: 'nexart-mcp-server', version: '0.
|
|
13
|
+
export function createServer(runtime = {}) {
|
|
14
|
+
const server = new McpServer({ name: 'nexart-mcp-server', version: '0.2.0' });
|
|
15
15
|
TOOL_NAMES.forEach((name, index) => {
|
|
16
16
|
server.registerTool(name, {
|
|
17
17
|
description: DESCRIPTIONS[index],
|
|
@@ -29,9 +29,9 @@ export function createServer() {
|
|
|
29
29
|
};
|
|
30
30
|
});
|
|
31
31
|
});
|
|
32
|
-
registerNetworkTools(server);
|
|
33
|
-
registerWriteTools(server);
|
|
34
|
-
registerRecordingTool(server);
|
|
32
|
+
registerNetworkTools(server, runtime.network);
|
|
33
|
+
registerWriteTools(server, runtime.write);
|
|
34
|
+
registerRecordingTool(server, runtime.recording);
|
|
35
35
|
// The SDK may report parsing/validation exceptions containing input fragments.
|
|
36
36
|
server.server.onerror = () => { process.stderr.write('NEXART_MCP_PROTOCOL_ERROR\n'); };
|
|
37
37
|
return server;
|
package/dist/stdio.js
CHANGED
|
@@ -3,6 +3,7 @@ import { Transform } from 'node:stream';
|
|
|
3
3
|
import { serveStdio, StdioServerTransport } from '@modelcontextprotocol/server/stdio';
|
|
4
4
|
import { createServer } from './server.js';
|
|
5
5
|
import { LIMITS } from './limits.js';
|
|
6
|
+
import { redactProtocolMessage } from './protocol-safety.js';
|
|
6
7
|
/**
|
|
7
8
|
* Pre-parse byte/depth guard. MCP framing/parsing stays in the official SDK.
|
|
8
9
|
* No evidence is stored or logged. A hard framing limit closes the connection.
|
|
@@ -57,29 +58,12 @@ class SafeStdioTransport extends StdioServerTransport {
|
|
|
57
58
|
guard.destroy();
|
|
58
59
|
}
|
|
59
60
|
send(message) {
|
|
60
|
-
|
|
61
|
-
return super.send({
|
|
62
|
-
...message, error: { code: message.error.code, message: 'MCP request rejected' },
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
if ('result' in message && typeof message.result === 'object' &&
|
|
66
|
-
message.result !== null && 'isError' in message.result &&
|
|
67
|
-
message.result.isError === true) {
|
|
68
|
-
return super.send({
|
|
69
|
-
...message,
|
|
70
|
-
result: {
|
|
71
|
-
...message.result,
|
|
72
|
-
isError: true,
|
|
73
|
-
content: [{ type: 'text', text: 'Invalid MCP tool request' }],
|
|
74
|
-
},
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
return super.send(message);
|
|
61
|
+
return super.send(redactProtocolMessage(message));
|
|
78
62
|
}
|
|
79
63
|
}
|
|
80
64
|
const guard = new InputGuard();
|
|
81
65
|
const transport = new SafeStdioTransport(guard, process.stdout, { maxBufferSize: LIMITS.frameBytes });
|
|
82
|
-
const handle = serveStdio(createServer, {
|
|
66
|
+
const handle = serveStdio(() => createServer(), {
|
|
83
67
|
transport,
|
|
84
68
|
onerror: () => {
|
|
85
69
|
process.stderr.write('NEXART_MCP_PROTOCOL_ERROR\n');
|
package/dist/write/attest.d.ts
CHANGED
|
@@ -10,5 +10,8 @@ export interface AttestDependencies {
|
|
|
10
10
|
policy?: TrustPolicy;
|
|
11
11
|
/** Trusted embedding only; never a tool argument or environment selector. */
|
|
12
12
|
disclosureProfile?: DisclosureProfile;
|
|
13
|
+
/** Trusted application exact-body single-use grant, NOT a boolean bypass.
|
|
14
|
+
* Omitted by stdio: its existing owner-file approval remains unchanged. */
|
|
15
|
+
consumePublicApproval?: (body: string, key: string) => boolean;
|
|
13
16
|
}
|
|
14
17
|
export declare function attest(args: unknown, config: WriteConfig, dependencies?: AttestDependencies, signal?: AbortSignal): Promise<AttestOutput>;
|
package/dist/write/attest.js
CHANGED
|
@@ -89,7 +89,8 @@ export async function attest(args, config, dependencies = {}, signal) {
|
|
|
89
89
|
output = await network.run(signal, async (active) => {
|
|
90
90
|
active.throwIfAborted();
|
|
91
91
|
if (input.visibility === 'public') {
|
|
92
|
-
if (!
|
|
92
|
+
if (!(dependencies.consumePublicApproval
|
|
93
|
+
? dependencies.consumePublicApproval(body, key) : consumeApproval(config, body, key)))
|
|
93
94
|
return { ...output, reasonCode: 'PUBLIC_OWNER_APPROVAL_REQUIRED' };
|
|
94
95
|
output.publicationAuthorization = 'approved';
|
|
95
96
|
}
|
|
@@ -198,16 +198,16 @@ export declare const attestOutput: z.ZodObject<{
|
|
|
198
198
|
mismatch: "mismatch";
|
|
199
199
|
}>;
|
|
200
200
|
keyStatus: z.ZodEnum<{
|
|
201
|
+
deprecated: "deprecated";
|
|
201
202
|
unknown: "unknown";
|
|
202
203
|
active: "active";
|
|
203
|
-
deprecated: "deprecated";
|
|
204
204
|
revoked: "revoked";
|
|
205
205
|
unavailable: "unavailable";
|
|
206
206
|
}>;
|
|
207
207
|
keyLifecycle: z.ZodEnum<{
|
|
208
|
+
unknown: "unknown";
|
|
208
209
|
valid: "valid";
|
|
209
210
|
invalid: "invalid";
|
|
210
|
-
unknown: "unknown";
|
|
211
211
|
}>;
|
|
212
212
|
lifecycleCode: z.ZodString;
|
|
213
213
|
signerTrust: z.ZodEnum<{
|
|
@@ -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.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexart/mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"mcpName": "io.github.artnames/nexart-mcp-server",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/",
|
|
@@ -23,15 +23,22 @@
|
|
|
23
23
|
"nexart-recover-confidential": "./dist/recover-confidential.js"
|
|
24
24
|
},
|
|
25
25
|
"files": [
|
|
26
|
-
"dist/**/*.js", "dist/**/*.d.ts",
|
|
27
|
-
"
|
|
28
|
-
"
|
|
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"
|
|
29
35
|
],
|
|
30
36
|
"scripts": {
|
|
31
37
|
"build": "tsc -p tsconfig.json",
|
|
32
38
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
33
39
|
"start": "node dist/stdio.js",
|
|
34
40
|
"test": "node --test --test-concurrency=1 tests/*.test.mjs tests/validation/*.test.mjs",
|
|
41
|
+
"test:hosted": "pnpm --filter @nexart/mcp-hosted test",
|
|
35
42
|
"benchmark": "node tests/benchmark.mjs",
|
|
36
43
|
"evidence": "node tests/transport-evidence.mjs",
|
|
37
44
|
"check:clean-install": "node tests/release-validation.mjs",
|
package/server.json
CHANGED
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
"url": "https://github.com/artnames/nexart-mcp-server",
|
|
8
8
|
"source": "github"
|
|
9
9
|
},
|
|
10
|
-
"version": "0.
|
|
10
|
+
"version": "0.2.0",
|
|
11
11
|
"packages": [
|
|
12
12
|
{
|
|
13
13
|
"registryType": "npm",
|
|
14
14
|
"registryBaseUrl": "https://registry.npmjs.org",
|
|
15
15
|
"identifier": "@nexart/mcp-server",
|
|
16
|
-
"version": "0.
|
|
16
|
+
"version": "0.2.0",
|
|
17
17
|
"transport": { "type": "stdio" }
|
|
18
18
|
}
|
|
19
19
|
]
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
# macOS age version compatibility
|
|
2
|
-
|
|
3
|
-
The owner confirmed that the 543-test package exposed all eight tools and the
|
|
4
|
-
corrected recording schema in Claude Desktop on macOS with Node 24. Local
|
|
5
|
-
recording then failed because Homebrew age reports `v1.3.2`, not `1.3.2`.
|
|
6
|
-
|
|
7
|
-
The version check now accepts either prefix form, parses numeric components,
|
|
8
|
-
and requires a stable release at least 1.2.1 and below 2.0.0. Malformed output,
|
|
9
|
-
prereleases, build suffixes, unsafe numeric components, executable failures and
|
|
10
|
-
timeouts fail closed. No raw process output is returned.
|
|
11
|
-
|
|
12
|
-
Safe recording diagnostics distinguish:
|
|
13
|
-
|
|
14
|
-
- `CUSTODY_CONFIG_MISSING`: no configured file or a missing file/ancestor.
|
|
15
|
-
- `CUSTODY_CONFIG_INVALID`: unreadable/invalid JSON, schema or file permissions.
|
|
16
|
-
- `ENCRYPTED_CUSTODY_CONFIGURATION_REQUIRED`: invalid runtime custody settings,
|
|
17
|
-
recipient, executable real path or directory permissions.
|
|
18
|
-
- `AGE_VERSION_UNSUPPORTED`: malformed or unsupported version output.
|
|
19
|
-
- `AGE_VERSION_CHECK_FAILED`: failed or timed-out version execution.
|
|
20
|
-
|
|
21
|
-
Configuration-loading classifications appear only as constant guidance alongside
|
|
22
|
-
the existing structured failure. They contain no paths or underlying exceptions.
|
|
23
|
-
The structured recording contract and certification defaults are unchanged.
|
|
24
|
-
|
|
25
|
-
Run isolated release validation with:
|
|
26
|
-
|
|
27
|
-
```sh
|
|
28
|
-
node tests/validation/run.mjs --age-version
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
Evidence and the new archive are written exclusively to
|
|
32
|
-
`generated-artifacts/age-version-validation/`. The 543-test recording-schema
|
|
33
|
-
archive is used as the frozen baseline and is not overwritten.
|
|
34
|
-
|
|
35
|
-
Regression tests use synthetic owner-only keys and a wrapper reporting `v1.3.2`
|
|
36
|
-
while delegating encryption/decryption to real age. No live Node submission or
|
|
37
|
-
production key is required. Both protocol revisions are checked through an
|
|
38
|
-
independent installation. These Linux tests do not replace the owner's macOS
|
|
39
|
-
local-only recording recheck.
|
|
40
|
-
|
|
41
|
-
On the Mac, install the new archive in the existing standalone installation
|
|
42
|
-
using the same package manager, restart Claude Desktop, and reconnect. Keep the
|
|
43
|
-
existing owner-only custody configuration and recipient. Use an explicit
|
|
44
|
-
`certification: {"mode":"local"}` synthetic recording first; expect confidential
|
|
45
|
-
creation, encrypted custody, valid local integrity and `submission: "not_sent"`.
|
|
46
|
-
Do not automatically retry Node submissions or change consent/policy controls.
|
package/docs/architecture.md
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
# Implementation boundaries
|
|
2
|
-
|
|
3
|
-
The original offline verification path remains:
|
|
4
|
-
|
|
5
|
-
```text
|
|
6
|
-
MCP host
|
|
7
|
-
→ byte/depth input guard
|
|
8
|
-
→ official MCP v2 serveStdio / StdioServerTransport
|
|
9
|
-
→ McpServer tool schemas
|
|
10
|
-
→ application size/complexity/step guards
|
|
11
|
-
→ explicit SDK adapter dispatch
|
|
12
|
-
→ pinned published NexArt verifier
|
|
13
|
-
→ allowlisted, redacted result projection
|
|
14
|
-
→ bounded structured output
|
|
15
|
-
→ SDK protocol encoding + safe protocol diagnostics
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
- `src/stdio.ts`: only the stdio entry point, pre-parse input guard, safe SDK
|
|
19
|
-
error output and process lifecycle.
|
|
20
|
-
- `src/server.ts`: MCP registration, including the separate network-tool registrations.
|
|
21
|
-
- `src/contracts.ts`: input/output contracts and public tool names.
|
|
22
|
-
- `src/limits.ts`: application policy limits and iterative JSON traversal.
|
|
23
|
-
- `src/adapters.ts`: direct published SDK calls and explicit family dispatch.
|
|
24
|
-
- `src/results.ts`: disclosure policy and separation of integrity/trust claims.
|
|
25
|
-
- `src/verify.ts`: shared orchestration invoked by MCP and unit tests.
|
|
26
|
-
- `tests/`: official vectors, positive fixtures, tampering/limits tests, real
|
|
27
|
-
MCP subprocess tests, reproducible benchmarks and clean-install check.
|
|
28
|
-
|
|
29
|
-
Milestone 2 adds a separate path, not a fallback in the offline adapters:
|
|
30
|
-
|
|
31
|
-
```text
|
|
32
|
-
three new strict MCP tool contracts
|
|
33
|
-
→ shared operation deadline / cancellation / semaphore
|
|
34
|
-
→ fixed-origin exact-hash resolver or public manifest GET
|
|
35
|
-
→ bounded decoded JSON + response contract + hash identity checks
|
|
36
|
-
→ returned-bundle verifier OR published CER receipt signature verifier
|
|
37
|
-
→ separate binding / identity / lifecycle / independently pinned trust
|
|
38
|
-
→ allowlisted summaries (no evidence, envelopes, full receipts or key material)
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
`src/network/` owns bounded fixed-origin reads and upstream contracts,
|
|
42
|
-
`src/lookup/` local public-projection verification, `src/receipts/` CER receipt
|
|
43
|
-
verification, and `src/trust/` server-controlled policy/lifecycle. No production
|
|
44
|
-
pins or historical exceptions are configured. See [Milestone 2](milestone-2.md).
|
|
45
|
-
|
|
46
|
-
Milestone 3 is additive: `src/write-tools.ts` registers zero, one or two tools
|
|
47
|
-
from owner configuration. `src/write/` contains strict inputs, SDK sealing,
|
|
48
|
-
confidential/public disclosure policies, a dedicated fixed-target bounded POST
|
|
49
|
-
adapter, safe attestation response checking and one-use local owner approvals.
|
|
50
|
-
`src/approve-public.ts` is a separate controlling-terminal command, never an MCP
|
|
51
|
-
tool. The original GET-only client is not expanded to POST. Its constructor
|
|
52
|
-
timeout type is widened to `number`; the original default remains 5 seconds.
|
|
53
|
-
See [Milestone 3](milestone-3.md) for approval/threat boundaries.
|
|
54
|
-
|
|
55
|
-
The public-default update resolves omitted visibility to public but leaves all
|
|
56
|
-
write/public capabilities off and retains every approval/disclosure check.
|
|
57
|
-
Confidential creation is a separate owner CLI (`src/create-confidential.ts` and
|
|
58
|
-
`src/owner/create.ts`), not an MCP tool. It uses published SDK commitments with
|
|
59
|
-
fresh salts and durably retains explicitly approved local recovery material
|
|
60
|
-
before exporting a CER. The owner C acceptance wrapper uses the existing MCP
|
|
61
|
-
attestation tool and requires administrator-provisioned Mac isolation for live
|
|
62
|
-
mode; preflight and synthetic approval validation remain offline. See
|
|
63
|
-
[public-default workflow and limitations](public-default.md).
|
|
64
|
-
|
|
65
|
-
The retired API and Canvas templates are archived locally, not dependencies.
|
|
66
|
-
No database,
|
|
67
|
-
backend route, web frontend or artifact preview is needed for a stdio service.
|
|
68
|
-
No NexArt SDK or Canonical Node source is modified.
|
|
69
|
-
|
|
70
|
-
Future milestones can add separately reviewed adapters and transport entry
|
|
71
|
-
points. They must not change the existing verification semantics or silently
|
|
72
|
-
expand this process's trust and disclosure boundaries.
|