agent-passport-system-mcp 2.18.0 → 2.19.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 +3 -3
- package/build/index.js +125 -12
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ MCP server for the [Agent Passport System](https://github.com/aeoess/agent-passp
|
|
|
10
10
|
|
|
11
11
|
> **🤖 For AI agents:** If you are an agent reading this, 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). This README is designed for humans.
|
|
12
12
|
|
|
13
|
-
**
|
|
13
|
+
**124 tools** across 63 core modules + 32 v2 constitutional governance modules (separation of powers, circuit breakers, approval fatigue detection, and more). Independently cited by [PDR in Production (Nanook & Gerundium, UBC)](https://doi.org/10.5281/zenodo.19323172). Works with any MCP client: Claude Desktop, Cursor, Windsurf, and more.
|
|
14
14
|
|
|
15
15
|
## Quick Start
|
|
16
16
|
|
|
@@ -29,7 +29,7 @@ npm install -g agent-passport-system-mcp
|
|
|
29
29
|
npx agent-passport-system-mcp setup
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
Auto-configures Claude Desktop and Cursor. Restart your AI client.
|
|
32
|
+
Auto-configures Claude Desktop and Cursor. Restart your AI client. 124 tools ready.
|
|
33
33
|
|
|
34
34
|
<details>
|
|
35
35
|
<summary>Manual config (if setup doesn't detect your client)</summary>
|
|
@@ -208,7 +208,7 @@ Layer 1 — Agent Passport Protocol (Ed25519 identity)
|
|
|
208
208
|
|
|
209
209
|
## Links
|
|
210
210
|
|
|
211
|
-
- npm SDK: [agent-passport-system](https://www.npmjs.com/package/agent-passport-system) (v1.29.
|
|
211
|
+
- npm SDK: [agent-passport-system](https://www.npmjs.com/package/agent-passport-system) (v1.29.1, 1919 tests)
|
|
212
212
|
- Python SDK: [agent-passport-system](https://pypi.org/project/agent-passport-system/) (v0.5.1)
|
|
213
213
|
- Paper (Protocol): [doi.org/10.5281/zenodo.18749779](https://doi.org/10.5281/zenodo.18749779)
|
|
214
214
|
- Paper (Faceted Narrowing): [doi.org/10.5281/zenodo.19260073](https://doi.org/10.5281/zenodo.19260073)
|
package/build/index.js
CHANGED
|
@@ -51,6 +51,8 @@ defineV2EmergencyPathway, activateV2Emergency,
|
|
|
51
51
|
requestV2Migration,
|
|
52
52
|
// v2: Attestation
|
|
53
53
|
createV2Attestation, assessV2AttestationQuality, } from "agent-passport-system";
|
|
54
|
+
// Agent Attestation Architecture (Phase 1 — Consilium Build)
|
|
55
|
+
import { createIssuanceContext, bindAttestation, createEmptyEvidenceRecord, PASSPORT_GRADE_LABELS, } from "agent-passport-system";
|
|
54
56
|
// Data Governance (Modules 36A, 38, 39 + Enforcement Gate + Training Attribution)
|
|
55
57
|
import { registerSelfAttestedSource, createContributionLedger, queryContributions, getSourceMetrics, getAgentDataFootprint, generateSettlement, verifySettlement, generateDataComplianceReport, DataEnforcementGate, createTrainingAttribution, verifyTrainingAttribution, createTrainingLedger, recordTrainingAttribution, getModelDataSources, } from "agent-passport-system";
|
|
56
58
|
// Data Lifecycle Governance (Modules 43+)
|
|
@@ -149,6 +151,10 @@ const state = {
|
|
|
149
151
|
sessionAgent: null,
|
|
150
152
|
charters: new Map(),
|
|
151
153
|
approvalRequests: new Map(),
|
|
154
|
+
// Agent Attestation Architecture (Phase 1)
|
|
155
|
+
issuanceContexts: new Map(),
|
|
156
|
+
issuanceChallenges: new Map(),
|
|
157
|
+
issuanceCount: 0,
|
|
152
158
|
};
|
|
153
159
|
// Load persisted task state
|
|
154
160
|
function loadTasks() {
|
|
@@ -335,6 +341,8 @@ const server = new McpServer({
|
|
|
335
341
|
name: "agent-passport-mcp",
|
|
336
342
|
version: "2.0.0",
|
|
337
343
|
});
|
|
344
|
+
// Track server start time for Tier 0 connection timing
|
|
345
|
+
globalThis.__mcpStartTime = Date.now();
|
|
338
346
|
// ═══════════════════════════════════════
|
|
339
347
|
// Tool Profiles — expose only relevant tools
|
|
340
348
|
// ═══════════════════════════════════════
|
|
@@ -343,7 +351,8 @@ const server = new McpServer({
|
|
|
343
351
|
// coordination, commerce, data, gateway, comms, minimal.
|
|
344
352
|
const TOOL_PROFILES = {
|
|
345
353
|
identity: new Set([
|
|
346
|
-
'identify', 'generate_keys', 'issue_passport', 'verify_issuer', '
|
|
354
|
+
'identify', 'generate_keys', 'issue_passport', 'verify_issuer', 'get_passport_grade', 'list_issuance_records',
|
|
355
|
+
'create_principal', 'endorse_agent',
|
|
347
356
|
'verify_endorsement', 'create_disclosure', 'create_delegation',
|
|
348
357
|
'verify_delegation', 'revoke_delegation', 'sub_delegate',
|
|
349
358
|
'revoke_endorsement', 'get_fleet_status', 'create_v2_delegation',
|
|
@@ -410,7 +419,8 @@ const TOOL_PROFILES = {
|
|
|
410
419
|
'register_agora_public',
|
|
411
420
|
]),
|
|
412
421
|
minimal: new Set([
|
|
413
|
-
'identify', 'generate_keys', 'issue_passport', 'verify_issuer', '
|
|
422
|
+
'identify', 'generate_keys', 'issue_passport', 'verify_issuer', 'get_passport_grade', 'list_issuance_records',
|
|
423
|
+
'create_delegation', 'verify_delegation',
|
|
414
424
|
'create_intent', 'evaluate_intent', 'list_profiles',
|
|
415
425
|
]),
|
|
416
426
|
};
|
|
@@ -496,13 +506,29 @@ server.tool("generate_keys", "Generate an Ed25519 keypair for agent identity.",
|
|
|
496
506
|
// ═══════════════════════════════════════
|
|
497
507
|
// TOOL: issue_passport
|
|
498
508
|
// ═══════════════════════════════════════
|
|
499
|
-
server.tool("issue_passport", "Issue a complete agent passport with keys, signed passport, and optional values floor
|
|
509
|
+
server.tool("issue_passport", "Issue a complete agent passport with keys, signed passport, attestation summary, and optional values floor in a single call. The server silently captures Tier 0 observed signals and computes a passport grade (0-3). Use this to onboard any agent — no npm install required.", {
|
|
500
510
|
name: z.string().describe("Agent name (human-readable)"),
|
|
501
511
|
owner: z.string().describe("Owner/principal identifier"),
|
|
502
512
|
mission: z.string().optional().describe("Agent mission description"),
|
|
503
513
|
capabilities: z.array(z.string()).optional().describe("Agent capabilities (e.g., ['research', 'writing'])"),
|
|
504
514
|
attest_to_floor: z.boolean().optional().describe("If true, attests to the default values floor (F-001 through F-008)"),
|
|
505
515
|
}, async (args) => {
|
|
516
|
+
const issuanceStart = Date.now();
|
|
517
|
+
// Phase 0: Silent Observation — capture Tier 0 signals before processing
|
|
518
|
+
state.issuanceCount++;
|
|
519
|
+
const { createHash } = await import('crypto');
|
|
520
|
+
const sha256 = (s) => createHash('sha256').update(s).digest('hex');
|
|
521
|
+
const observed = {
|
|
522
|
+
transportType: process.env.MCP_TRANSPORT || 'stdio',
|
|
523
|
+
issuanceVelocity: state.issuanceCount,
|
|
524
|
+
requestPayloadFingerprint: sha256(JSON.stringify({
|
|
525
|
+
name: args.name, owner: args.owner,
|
|
526
|
+
mission: args.mission, capabilities: args.capabilities,
|
|
527
|
+
})),
|
|
528
|
+
mcpClientId: state.agentId || undefined,
|
|
529
|
+
connectionTimingMs: issuanceStart - globalThis.__mcpStartTime || 0,
|
|
530
|
+
};
|
|
531
|
+
// Create the passport (same as before)
|
|
506
532
|
const agent = joinSocialContract({
|
|
507
533
|
name: args.name,
|
|
508
534
|
mission: args.mission || 'General purpose agent',
|
|
@@ -513,24 +539,38 @@ server.tool("issue_passport", "Issue a complete agent passport with keys, signed
|
|
|
513
539
|
floor: args.attest_to_floor ? (state.floorYaml || DEFAULT_FLOOR_YAML) : undefined,
|
|
514
540
|
});
|
|
515
541
|
// Countersign with AEOESS issuer key if available (CA model)
|
|
516
|
-
const
|
|
542
|
+
const hasIssuer = !!AEOESS_ISSUER_PRIVATE_KEY;
|
|
543
|
+
const passport = hasIssuer
|
|
517
544
|
? countersignPassport(agent.passport, AEOESS_ISSUER_PRIVATE_KEY, 'aeoess')
|
|
518
545
|
: agent.passport;
|
|
546
|
+
// Phase 4: Derive issuance context
|
|
547
|
+
const evidence = createEmptyEvidenceRecord(observed);
|
|
548
|
+
const context = createIssuanceContext(evidence, {
|
|
549
|
+
hasIssuerSignature: hasIssuer,
|
|
550
|
+
});
|
|
551
|
+
// Phase 5: Bind attestation to passport
|
|
552
|
+
const attestedPassport = bindAttestation(passport, context);
|
|
553
|
+
// Store the issuance context (server-side memory)
|
|
554
|
+
const passportId = passport.passport.agentId;
|
|
555
|
+
state.issuanceContexts.set(passportId, context);
|
|
519
556
|
return {
|
|
520
557
|
content: [{
|
|
521
558
|
type: "text",
|
|
522
559
|
text: JSON.stringify({
|
|
523
|
-
passport:
|
|
524
|
-
publicKey:
|
|
560
|
+
passport: attestedPassport,
|
|
561
|
+
publicKey: attestedPassport.passport.publicKey,
|
|
525
562
|
privateKey: agent.keyPair.privateKey,
|
|
526
|
-
agentId:
|
|
563
|
+
agentId: attestedPassport.passport.agentId,
|
|
527
564
|
attestation: agent.attestation || null,
|
|
528
|
-
|
|
529
|
-
|
|
565
|
+
passportAttestation: attestedPassport.attestation,
|
|
566
|
+
passportGrade: context.assessment.passportGrade,
|
|
567
|
+
passportGradeLabel: PASSPORT_GRADE_LABELS[context.assessment.passportGrade],
|
|
568
|
+
did: `did:aps:${attestedPassport.passport.publicKey}`,
|
|
569
|
+
issuerVerified: !!attestedPassport.issuerSignature,
|
|
530
570
|
issuerPublicKey: AEOESS_ISSUER_PUBLIC_KEY,
|
|
531
|
-
note:
|
|
532
|
-
?
|
|
533
|
-
:
|
|
571
|
+
note: attestedPassport.issuerSignature
|
|
572
|
+
? `Grade ${context.assessment.passportGrade} passport (${PASSPORT_GRADE_LABELS[context.assessment.passportGrade]}). Countersigned by AEOESS.`
|
|
573
|
+
: `Grade ${context.assessment.passportGrade} passport (${PASSPORT_GRADE_LABELS[context.assessment.passportGrade]}). Self-signed (issuer key not configured).`,
|
|
534
574
|
}, null, 2),
|
|
535
575
|
}],
|
|
536
576
|
};
|
|
@@ -573,6 +613,79 @@ server.tool("verify_issuer", "Verify that a passport was officially issued by AE
|
|
|
573
613
|
};
|
|
574
614
|
});
|
|
575
615
|
// ═══════════════════════════════════════
|
|
616
|
+
// TOOL: get_passport_grade
|
|
617
|
+
// ═══════════════════════════════════════
|
|
618
|
+
server.tool("get_passport_grade", "Query the attestation grade and issuance context for a passport. Returns the passport grade (0-3), flags, and evidence summary. Grade 0 = self-signed, 1 = issuer countersigned, 2 = runtime-bound, 3 = principal-bound. This is the partner-facing trust query.", {
|
|
619
|
+
agent_id: z.string().describe("The agent ID of the passport to query"),
|
|
620
|
+
}, async (args) => {
|
|
621
|
+
const context = state.issuanceContexts.get(args.agent_id);
|
|
622
|
+
if (!context) {
|
|
623
|
+
return {
|
|
624
|
+
content: [{
|
|
625
|
+
type: "text",
|
|
626
|
+
text: JSON.stringify({
|
|
627
|
+
found: false,
|
|
628
|
+
agent_id: args.agent_id,
|
|
629
|
+
note: "No issuance record found for this agent. The passport may have been issued before attestation tracking was enabled, or on a different server instance.",
|
|
630
|
+
}, null, 2),
|
|
631
|
+
}],
|
|
632
|
+
};
|
|
633
|
+
}
|
|
634
|
+
return {
|
|
635
|
+
content: [{
|
|
636
|
+
type: "text",
|
|
637
|
+
text: JSON.stringify({
|
|
638
|
+
found: true,
|
|
639
|
+
agent_id: args.agent_id,
|
|
640
|
+
passportGrade: context.assessment.passportGrade,
|
|
641
|
+
passportGradeLabel: PASSPORT_GRADE_LABELS[context.assessment.passportGrade],
|
|
642
|
+
flags: context.assessment.flags,
|
|
643
|
+
attestationBundleHash: context.assessment.attestationBundleHash,
|
|
644
|
+
assessedAt: context.assessment.assessedAt,
|
|
645
|
+
evidenceSummary: {
|
|
646
|
+
hasRuntimeAttestation: context.evidence.runtimeAttestations.length > 0,
|
|
647
|
+
hasProviderAttestation: context.evidence.providerAttestations.length > 0,
|
|
648
|
+
selfDeclaredSignalCount: context.evidence.selfDeclaredSignals.length,
|
|
649
|
+
hasPriorPassport: !!context.evidence.priorPassportRef,
|
|
650
|
+
hasContinuityProof: !!context.evidence.priorContinuityProof,
|
|
651
|
+
observedTransport: context.evidence.observed.transportType || null,
|
|
652
|
+
issuanceVelocity: context.evidence.observed.issuanceVelocity || null,
|
|
653
|
+
},
|
|
654
|
+
derivedSignals: context.assessment.derivedSignals || [],
|
|
655
|
+
gradeHistory: context.assessment.gradeHistory || [],
|
|
656
|
+
}, null, 2),
|
|
657
|
+
}],
|
|
658
|
+
};
|
|
659
|
+
});
|
|
660
|
+
// ═══════════════════════════════════════
|
|
661
|
+
// TOOL: list_issuance_records
|
|
662
|
+
// ═══════════════════════════════════════
|
|
663
|
+
server.tool("list_issuance_records", "List all stored issuance records with their passport grades. Shows how many passports have been issued in this session and their trust posture. Useful for monitoring issuance patterns.", {}, async () => {
|
|
664
|
+
const records = Array.from(state.issuanceContexts.entries()).map(([agentId, ctx]) => ({
|
|
665
|
+
agentId,
|
|
666
|
+
grade: ctx.assessment.passportGrade,
|
|
667
|
+
gradeLabel: PASSPORT_GRADE_LABELS[ctx.assessment.passportGrade],
|
|
668
|
+
flags: ctx.assessment.flags,
|
|
669
|
+
issuedAt: ctx.evidence.requestedAt,
|
|
670
|
+
}));
|
|
671
|
+
return {
|
|
672
|
+
content: [{
|
|
673
|
+
type: "text",
|
|
674
|
+
text: JSON.stringify({
|
|
675
|
+
totalIssued: records.length,
|
|
676
|
+
sessionVelocity: state.issuanceCount,
|
|
677
|
+
records,
|
|
678
|
+
gradeDistribution: {
|
|
679
|
+
grade0: records.filter(r => r.grade === 0).length,
|
|
680
|
+
grade1: records.filter(r => r.grade === 1).length,
|
|
681
|
+
grade2: records.filter(r => r.grade === 2).length,
|
|
682
|
+
grade3: records.filter(r => r.grade === 3).length,
|
|
683
|
+
},
|
|
684
|
+
}, null, 2),
|
|
685
|
+
}],
|
|
686
|
+
};
|
|
687
|
+
});
|
|
688
|
+
// ═══════════════════════════════════════
|
|
576
689
|
// TOOL: get_my_role
|
|
577
690
|
// ═══════════════════════════════════════
|
|
578
691
|
server.tool("get_my_role", "Get your current role, assigned tasks, and role-specific instructions.", {}, async () => {
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-passport-system-mcp",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.19.0",
|
|
4
4
|
"mcpName": "io.github.aeoess/agent-passport-mcp",
|
|
5
|
-
"description": "MCP server for the Agent Passport System — enforcement infrastructure for the agent economy.
|
|
5
|
+
"description": "MCP server for the Agent Passport System — enforcement infrastructure for the agent economy. 124 tools across 95 modules. Policy eval <2ms. Identity, delegation, reputation, enforcement, attestation, feeless Nano wallet, commerce.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
8
8
|
"agent-passport-system-mcp": "./build/bin.js",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"homepage": "https://github.com/aeoess/agent-passport-mcp",
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
52
|
-
"agent-passport-system": "^1.29.
|
|
52
|
+
"agent-passport-system": "^1.29.1",
|
|
53
53
|
"zod": "^3.25.76"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|