agent-passport-system-mcp 3.0.0 → 3.1.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/README.md +4 -4
- package/build/index.js +106 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -12,13 +12,13 @@ Enforcement and accountability layer for AI agents. Bring your own identity. 20
|
|
|
12
12
|
APS_PROFILE=essential npx agent-passport-system-mcp
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
`essential` is the default profile — the 20 tools 90% of integrations need. Set `APS_PROFILE=full` for all
|
|
15
|
+
`essential` is the default profile — the 20 tools 90% of integrations need. Set `APS_PROFILE=full` for all 146 tools.
|
|
16
16
|
|
|
17
17
|
Available profiles: essential (default), identity, governance, coordination, commerce, data, gateway, comms, minimal, full.
|
|
18
18
|
|
|
19
19
|
> **For AI agents:** visit [aeoess.com/llms.txt](https://aeoess.com/llms.txt) for machine-readable documentation or [llms-full.txt](https://aeoess.com/llms-full.txt) for the complete technical reference. MCP discovery: [.well-known/mcp.json](https://aeoess.com/.well-known/mcp.json).
|
|
20
20
|
|
|
21
|
-
Works with any MCP client: Claude Desktop, Claude Code, Cursor, Windsurf, and more. Full surface area under `APS_PROFILE=full`:
|
|
21
|
+
Works with any MCP client: Claude Desktop, Claude Code, Cursor, Windsurf, and more. Full surface area under `APS_PROFILE=full`: 146 tools across 125 modules (84 core + 39 v2 constitutional governance). Independently cited by [PDR in Production (Nanook & Gerundium, UBC)](https://doi.org/10.5281/zenodo.19323172).
|
|
22
22
|
|
|
23
23
|
## Quick Start
|
|
24
24
|
|
|
@@ -216,8 +216,8 @@ Layer 1 — Agent Passport Protocol (Ed25519 identity)
|
|
|
216
216
|
|
|
217
217
|
## Links
|
|
218
218
|
|
|
219
|
-
- npm SDK: [agent-passport-system](https://www.npmjs.com/package/agent-passport-system) (v2.
|
|
220
|
-
- Python SDK: [agent-passport-system](https://pypi.org/project/agent-passport-system/) (
|
|
219
|
+
- npm SDK: [agent-passport-system](https://www.npmjs.com/package/agent-passport-system) (v2.2.0, 2395 tests)
|
|
220
|
+
- Python SDK: [agent-passport-system](https://pypi.org/project/agent-passport-system/) (v2.2.0)
|
|
221
221
|
- Paper (Protocol): [doi.org/10.5281/zenodo.18749779](https://doi.org/10.5281/zenodo.18749779)
|
|
222
222
|
- Paper (Faceted Narrowing): [doi.org/10.5281/zenodo.19260073](https://doi.org/10.5281/zenodo.19260073)
|
|
223
223
|
- Paper (Behavioral Derivation Rights): [doi.org/10.5281/zenodo.19476002](https://doi.org/10.5281/zenodo.19476002)
|
package/build/index.js
CHANGED
|
@@ -63,6 +63,10 @@ computeDataAxisWeights, computeComputeAxisWeights, DEFAULT_WEIGHT_PROFILE,
|
|
|
63
63
|
// Attribution Settlement (Build C — per-period signed settlement record)
|
|
64
64
|
aggregateAttributionPrimitives, buildContributorQueryResponse, signSettlementRecord, verifySettlementRecord, } from "agent-passport-system";
|
|
65
65
|
// ═══════════════════════════════════════
|
|
66
|
+
// Mutual Authentication v1 (SDK v2.2.0)
|
|
67
|
+
// ═══════════════════════════════════════
|
|
68
|
+
import { buildCertificate, signCertificate, certificateId, verifyBundle, verifyAttest, deriveSession, } from "agent-passport-system";
|
|
69
|
+
// ═══════════════════════════════════════
|
|
66
70
|
// State Management
|
|
67
71
|
// ═══════════════════════════════════════
|
|
68
72
|
const STORE_PATH = join(process.env.HOME || '.', '.agent-passport-tasks.json');
|
|
@@ -4353,6 +4357,108 @@ server.tool("aps_build_contributor_query", "Build a contributor-query response:
|
|
|
4353
4357
|
return { content: [{ type: "text", text: safeError("buildContributorQuery failed", e) }], isError: true };
|
|
4354
4358
|
}
|
|
4355
4359
|
});
|
|
4360
|
+
// ═══════════════════════════════════════
|
|
4361
|
+
// Mutual Authentication v1 tools (SDK v2.2.0)
|
|
4362
|
+
// ═══════════════════════════════════════
|
|
4363
|
+
server.tool("mutualAuthBuildCertificate", "Build and sign a mutual-auth certificate identifying an agent or information system. Returns the signed MutualAuthCertificate object ready to carry into a handshake. The issuer's Ed25519 private key (hex) signs over the canonical (JCS) form.", {
|
|
4364
|
+
role: z.enum(["agent", "information_system"]).describe("Role of the subject this cert identifies"),
|
|
4365
|
+
subject_id: z.string().describe("Stable subject identifier (e.g., agent DID, IS endpoint URL)"),
|
|
4366
|
+
subject_pubkey_hex: z.string().describe("Ed25519 public key (hex) of the subject"),
|
|
4367
|
+
issuer_id: z.string().describe("Issuer identifier"),
|
|
4368
|
+
issuer_role: z.enum(["agent", "information_system", "trust_anchor"]).describe("Role of the issuer"),
|
|
4369
|
+
issuer_pubkey_hex: z.string().describe("Ed25519 public key (hex) of the issuer"),
|
|
4370
|
+
issuer_privkey_hex: z.string().describe("Ed25519 private key (hex) of the issuer — used to sign"),
|
|
4371
|
+
binding: z.string().describe("For an agent: the APS agent_id. For an IS: the resource domain (e.g., mcp://api.bank.com)"),
|
|
4372
|
+
not_before: z.number().describe("Earliest valid time (unix ms)"),
|
|
4373
|
+
not_after: z.number().describe("Latest valid time (unix ms)"),
|
|
4374
|
+
supported_versions: z.array(z.string()).describe("Protocol versions supported, highest first (e.g., ['1.0'])"),
|
|
4375
|
+
attestation_grade: z.union([z.literal(0), z.literal(1), z.literal(2), z.literal(3)]).optional().describe("For agents: APS attestation grade 0-3"),
|
|
4376
|
+
capabilities: z.array(z.string()).optional().describe("Optional capability tags"),
|
|
4377
|
+
}, async (args) => {
|
|
4378
|
+
try {
|
|
4379
|
+
const unsigned = buildCertificate({
|
|
4380
|
+
role: args.role,
|
|
4381
|
+
subject_id: args.subject_id,
|
|
4382
|
+
subject_pubkey_hex: args.subject_pubkey_hex,
|
|
4383
|
+
issuer_id: args.issuer_id,
|
|
4384
|
+
issuer_role: args.issuer_role,
|
|
4385
|
+
binding: args.binding,
|
|
4386
|
+
not_before: args.not_before,
|
|
4387
|
+
not_after: args.not_after,
|
|
4388
|
+
supported_versions: args.supported_versions,
|
|
4389
|
+
attestation_grade: args.attestation_grade,
|
|
4390
|
+
capabilities: args.capabilities,
|
|
4391
|
+
}, args.issuer_pubkey_hex);
|
|
4392
|
+
const cert = signCertificate(unsigned, args.issuer_privkey_hex);
|
|
4393
|
+
return {
|
|
4394
|
+
content: [{ type: "text", text: JSON.stringify({
|
|
4395
|
+
certificate: cert,
|
|
4396
|
+
certificate_id: certificateId(cert),
|
|
4397
|
+
}, null, 2) }],
|
|
4398
|
+
};
|
|
4399
|
+
}
|
|
4400
|
+
catch (e) {
|
|
4401
|
+
return { content: [{ type: "text", text: safeError("mutualAuthBuildCertificate failed", e) }], isError: true };
|
|
4402
|
+
}
|
|
4403
|
+
});
|
|
4404
|
+
server.tool("mutualAuthVerifyAttest", "Verify a MutualAuthAttest against policy and trust anchors. Runs all 10 verification checks: signature, version negotiation, nonce match, timestamp freshness, certificate validity, issuer anchor check, binding constraints, downgrade detection, attestation grade policy, capability policy. Returns ok:true on success or a failure reason on rejection.", {
|
|
4405
|
+
attest: z.any().describe("MutualAuthAttest to verify"),
|
|
4406
|
+
expected_peer_nonce_b64: z.string().describe("The nonce the peer sent in their prior hello or attest"),
|
|
4407
|
+
expected_own_nonce_b64: z.string().describe("The nonce we sent in our own prior hello or attest"),
|
|
4408
|
+
policy: z.any().describe("MutualAuthPolicy (accepted_versions, min_agent_grade, required_capabilities, max_clock_skew_ms, max_session_ms)"),
|
|
4409
|
+
trust_anchors: z.array(z.any()).describe("TrustAnchor[] — local trusted roots"),
|
|
4410
|
+
revoked_anchor_ids: z.array(z.string()).optional().describe("IDs of anchors revoked since the bundle was issued"),
|
|
4411
|
+
now_ms: z.number().optional().describe("Current unix ms — defaults to Date.now()"),
|
|
4412
|
+
}, async (args) => {
|
|
4413
|
+
try {
|
|
4414
|
+
const res = verifyAttest({
|
|
4415
|
+
attest: args.attest,
|
|
4416
|
+
expected_peer_nonce_b64: args.expected_peer_nonce_b64,
|
|
4417
|
+
expected_own_nonce_b64: args.expected_own_nonce_b64,
|
|
4418
|
+
policy: args.policy,
|
|
4419
|
+
trust_anchors: args.trust_anchors,
|
|
4420
|
+
revoked_anchor_ids: args.revoked_anchor_ids,
|
|
4421
|
+
now_ms: args.now_ms ?? Date.now(),
|
|
4422
|
+
});
|
|
4423
|
+
return {
|
|
4424
|
+
content: [{ type: "text", text: JSON.stringify(res, null, 2) }],
|
|
4425
|
+
};
|
|
4426
|
+
}
|
|
4427
|
+
catch (e) {
|
|
4428
|
+
return { content: [{ type: "text", text: safeError("mutualAuthVerifyAttest failed", e) }], isError: true };
|
|
4429
|
+
}
|
|
4430
|
+
});
|
|
4431
|
+
server.tool("mutualAuthDeriveSession", "Derive the shared mutual-auth session record from both sides' Attests. Both parties MUST compute identical session_id given identical inputs (canonical JCS + sha256 of chosen_version, both cert ids, both nonces). Returns a MutualAuthSession with session_id + both certificates + expiry bounds, or failure reason.", {
|
|
4432
|
+
agent_attest: z.any().describe("The agent's MutualAuthAttest"),
|
|
4433
|
+
is_attest: z.any().describe("The information system's MutualAuthAttest"),
|
|
4434
|
+
policy: z.any().describe("MutualAuthPolicy"),
|
|
4435
|
+
now_ms: z.number().optional().describe("Current unix ms — defaults to Date.now()"),
|
|
4436
|
+
}, async (args) => {
|
|
4437
|
+
try {
|
|
4438
|
+
const res = deriveSession(args.agent_attest, args.is_attest, args.policy, args.now_ms ?? Date.now());
|
|
4439
|
+
return {
|
|
4440
|
+
content: [{ type: "text", text: JSON.stringify(res, null, 2) }],
|
|
4441
|
+
};
|
|
4442
|
+
}
|
|
4443
|
+
catch (e) {
|
|
4444
|
+
return { content: [{ type: "text", text: safeError("mutualAuthDeriveSession failed", e) }], isError: true };
|
|
4445
|
+
}
|
|
4446
|
+
});
|
|
4447
|
+
server.tool("mutualAuthVerifyTrustBundle", "Verify a TrustAnchorBundle signature and freshness. Caller supplies the list of trusted publisher public keys (root configuration). Returns ok:true on success or failure reason (untrusted_publisher, signature_invalid, bundle_expired, not_yet_valid).", {
|
|
4448
|
+
bundle: z.any().describe("TrustAnchorBundle to verify"),
|
|
4449
|
+
trusted_publisher_pubkeys_hex: z.array(z.string()).describe("List of Ed25519 pubkeys (hex) authorized to publish bundles"),
|
|
4450
|
+
now_ms: z.number().optional().describe("Current unix ms — defaults to Date.now()"),
|
|
4451
|
+
}, async (args) => {
|
|
4452
|
+
try {
|
|
4453
|
+
const res = verifyBundle(args.bundle, args.trusted_publisher_pubkeys_hex, args.now_ms ?? Date.now());
|
|
4454
|
+
return {
|
|
4455
|
+
content: [{ type: "text", text: JSON.stringify(res, null, 2) }],
|
|
4456
|
+
};
|
|
4457
|
+
}
|
|
4458
|
+
catch (e) {
|
|
4459
|
+
return { content: [{ type: "text", text: safeError("mutualAuthVerifyTrustBundle failed", e) }], isError: true };
|
|
4460
|
+
}
|
|
4461
|
+
});
|
|
4356
4462
|
server.prompt("coordination_role", "Get instructions for your assigned coordination role", {}, async () => {
|
|
4357
4463
|
const role = state.agentRole || 'default';
|
|
4358
4464
|
const instructions = ROLE_PROMPTS[role] || ROLE_PROMPTS['default'];
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-passport-system-mcp",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"mcpName": "io.github.aeoess/agent-passport-mcp",
|
|
5
|
-
"description": "MCP server for the Agent Passport System — protocol-layer tools only.
|
|
5
|
+
"description": "MCP server for the Agent Passport System — protocol-layer tools only. 146 tools (132 protocol + 10 gateway deprecation stubs). Identity, delegation, reputation, attestation, coordination, commerce, attribution primitive, attribution settlement. Tracks SDK v2.2.0. For gateway-runtime tools (ProxyGateway, AgentContext, DataEnforcementGate), use gateway.aeoess.com REST API or pin to v3.1.0.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
8
8
|
"agent-passport-system-mcp": "./build/bin.js",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"homepage": "https://github.com/aeoess/agent-passport-mcp",
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
53
|
-
"agent-passport-system": "^2.
|
|
53
|
+
"agent-passport-system": "^2.2.0",
|
|
54
54
|
"zod": "^3.25.76"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|