agent-passport-system-mcp 2.13.0 → 2.15.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 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. This README is designed for humans.
12
12
 
13
- **102 tools** across 42 core modules + 32 v2 constitutional governance modules (separation of powers, circuit breakers, approval fatigue detection, and more). Works with any MCP client: Claude Desktop, Cursor, Windsurf, and more.
13
+ **108 tools** across 42 core modules + 32 v2 constitutional governance modules (separation of powers, circuit breakers, approval fatigue detection, and more). 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. 102 tools ready.
32
+ Auto-configures Claude Desktop and Cursor. Restart your AI client. 108 tools ready.
33
33
 
34
34
  <details>
35
35
  <summary>Manual config (if setup doesn't detect your client)</summary>
@@ -206,7 +206,7 @@ Layer 1 — Agent Passport Protocol (Ed25959 identity)
206
206
 
207
207
  ## Links
208
208
 
209
- - npm SDK: [agent-passport-system](https://www.npmjs.com/package/agent-passport-system) (v1.22.0, 1421 tests)
209
+ - npm SDK: [agent-passport-system](https://www.npmjs.com/package/agent-passport-system) (v1.24.0, 1445 tests)
210
210
  - Python SDK: [agent-passport-system](https://pypi.org/project/agent-passport-system/) (v0.5.1)
211
211
  - Paper: [doi.org/10.5281/zenodo.18749779](https://doi.org/10.5281/zenodo.18749779)
212
212
  - Docs: [aeoess.com/llms-full.txt](https://aeoess.com/llms-full.txt)
package/build/index.js CHANGED
@@ -54,7 +54,7 @@ createV2Attestation, assessV2AttestationQuality, } from "agent-passport-system";
54
54
  // Data Governance (Modules 36A, 38, 39 + Enforcement Gate + Training Attribution)
55
55
  import { registerSelfAttestedSource, createContributionLedger, queryContributions, getSourceMetrics, getAgentDataFootprint, generateSettlement, verifySettlement, generateDataComplianceReport, DataEnforcementGate, createTrainingAttribution, verifyTrainingAttribution, createTrainingLedger, recordTrainingAttribution, getModelDataSources, } from "agent-passport-system";
56
56
  // Data Lifecycle Governance (Modules 43+)
57
- import { createDerivationReceipt, resolveExtendedLineage, evaluateRevocationImpact, createDecisionLineageReceipt, isPurposePermitted, purposeCategory, isRetentionExpired, checkAggregateConstraints, isTransferPermitted, computeGovernanceTaint, fileDispute, checkCombinationPermitted, createAccessSnapshot, resolveRightsPropagation, DEFAULT_RIGHTS_PROPAGATION, detectPurposeDrift, declareReidentificationRisk, verifyGovernanceBlock, parseGovernanceBlockFromHTML, isUsagePermitted, embedGovernance, } from "agent-passport-system";
57
+ import { createDerivationReceipt, resolveExtendedLineage, evaluateRevocationImpact, createDecisionLineageReceipt, isPurposePermitted, purposeCategory, isRetentionExpired, checkAggregateConstraints, isTransferPermitted, computeGovernanceTaint, fileDispute, checkCombinationPermitted, createAccessSnapshot, resolveRightsPropagation, DEFAULT_RIGHTS_PROPAGATION, detectPurposeDrift, declareReidentificationRisk, verifyGovernanceBlock, parseGovernanceBlockFromHTML, isUsagePermitted, embedGovernance, generateApsTxt, verifyApsTxt, resolveTermsForPath, createChainedGovernanceBlock, createAccessReceipt, governanceLoop360, } from "agent-passport-system";
58
58
  // ═══════════════════════════════════════
59
59
  // State Management
60
60
  // ═══════════════════════════════════════
@@ -3548,6 +3548,97 @@ server.tool("check_usage_permitted", "Check if a specific usage type is permitte
3548
3548
  return { content: [{ type: "text", text: `${result.permitted ? '✅' : '❌'} Usage "${p.usage}": ${result.condition}` }] };
3549
3549
  });
3550
3550
  // ═══════════════════════════════════════
3551
+ // aps.txt + HTTP Headers + Chained Blocks
3552
+ // ═══════════════════════════════════════
3553
+ server.tool("generate_aps_txt", "Generate a signed aps.txt file for site-wide governance. Like robots.txt but cryptographically signed with terms, revocation endpoint, and MCP upgrade path.", {
3554
+ domain: z.string().describe("Domain this declaration covers (e.g. theagenttimes.com)"),
3555
+ publisherName: z.string().describe("Human-readable publisher name"),
3556
+ publicKey: z.string().describe("Publisher's Ed25519 public key (hex)"),
3557
+ privateKey: z.string().describe("Publisher's Ed25519 private key (hex)"),
3558
+ inference: z.enum(["permitted", "prohibited", "compensation_required", "attribution_required"]).optional(),
3559
+ training: z.enum(["permitted", "prohibited", "compensation_required", "attribution_required"]).optional(),
3560
+ redistribution: z.enum(["permitted", "prohibited", "compensation_required", "attribution_required"]).optional(),
3561
+ mcpEndpoint: z.string().optional(),
3562
+ revocationEndpoint: z.string().optional(),
3563
+ }, async (p) => {
3564
+ const doc = generateApsTxt({
3565
+ domain: p.domain, publisherName: p.publisherName,
3566
+ publicKey: p.publicKey, privateKey: p.privateKey,
3567
+ defaultTerms: { inference: p.inference, training: p.training, redistribution: p.redistribution },
3568
+ mcpEndpoint: p.mcpEndpoint, revocationEndpoint: p.revocationEndpoint,
3569
+ });
3570
+ const serialized = JSON.stringify(doc, null, 2);
3571
+ return { content: [{ type: "text", text: `📄 aps.txt Generated\n\nDomain: ${doc.domain}\nDID: ${doc.publisher_did}\nMCP: ${doc.mcp_endpoint || 'none'}\n\nServe at: ${p.domain}/.well-known/aps.txt\n\n${serialized}` }] };
3572
+ });
3573
+ server.tool("verify_aps_txt", "Verify a signed aps.txt file — checks signature and DID consistency.", {
3574
+ content: z.string().describe("aps.txt JSON content"),
3575
+ publicKey: z.string().describe("Publisher's Ed25519 public key (hex)"),
3576
+ }, async (p) => {
3577
+ const doc = JSON.parse(p.content);
3578
+ const result = verifyApsTxt(doc, p.publicKey);
3579
+ return { content: [{ type: "text", text: `${result.valid ? '✅' : '❌'} aps.txt Verification: ${result.valid ? 'VALID' : 'INVALID'}${result.errors.length ? '\nErrors: ' + result.errors.join('; ') : ''}` }] };
3580
+ });
3581
+ server.tool("resolve_path_terms", "Resolve governance terms for a specific URL path using aps.txt path overrides.", {
3582
+ apsTxt: z.string().describe("aps.txt JSON content"),
3583
+ path: z.string().describe("URL path to resolve (e.g. /blog/my-article)"),
3584
+ }, async (p) => {
3585
+ const doc = JSON.parse(p.apsTxt);
3586
+ const terms = resolveTermsForPath(doc, p.path);
3587
+ return { content: [{ type: "text", text: `📋 Terms for "${p.path}":\n${JSON.stringify(terms, null, 2)}` }] };
3588
+ });
3589
+ server.tool("create_chained_governance_block", "Create a governance block for derivative content that references the original publisher's block. Preserves the chain of provenance.", {
3590
+ content: z.string().describe("Derivative content"),
3591
+ publicKey: z.string().describe("Derivative agent's Ed25519 public key (hex)"),
3592
+ privateKey: z.string().describe("Derivative agent's Ed25519 private key (hex)"),
3593
+ parentBlock: z.string().describe("Original governance block JSON string"),
3594
+ derivationType: z.string().describe("Type: summary, embedding, rag_chunk, translation, etc."),
3595
+ inference: z.enum(["permitted", "prohibited", "compensation_required", "attribution_required"]).optional(),
3596
+ training: z.enum(["permitted", "prohibited", "compensation_required", "attribution_required"]).optional(),
3597
+ }, async (p) => {
3598
+ const parent = JSON.parse(p.parentBlock);
3599
+ const chained = createChainedGovernanceBlock({
3600
+ content: p.content, publicKey: p.publicKey, privateKey: p.privateKey,
3601
+ terms: { inference: p.inference, training: p.training },
3602
+ parentBlock: parent, derivationType: p.derivationType,
3603
+ });
3604
+ return { content: [{ type: "text", text: `🔗 Chained Block Created\n\nOriginal publisher: ${chained.source_did}\nDerivative agent: ${chained.derivative_agent_did}\nDerivation: ${chained.derivation_type}\nParent hash: ${chained.parent_block_hash}\nContent hash: ${chained.content_hash}` }] };
3605
+ });
3606
+ // ═══════════════════════════════════════
3607
+ // Governance Consumer (agent-side 360 loop)
3608
+ // ═══════════════════════════════════════
3609
+ server.tool("governance_360", "Execute the full governance 360 loop on HTML content: extract governance block → verify signature + content hash → check usage terms → create signed access receipt. This is what an agent calls on every page it reads.", {
3610
+ html: z.string().describe("Full HTML of the page"),
3611
+ contentBody: z.string().describe("Article text content (for hash verification)"),
3612
+ publisherPublicKey: z.string().describe("Publisher's Ed25519 public key (hex)"),
3613
+ agentPublicKey: z.string().describe("Your agent's Ed25519 public key (hex)"),
3614
+ agentPrivateKey: z.string().describe("Your agent's Ed25519 private key (hex)"),
3615
+ intendedUsage: z.enum(["inference", "training", "redistribution", "derivative", "caching"]),
3616
+ sourceUrl: z.string().describe("URL of the page"),
3617
+ }, async (p) => {
3618
+ const result = governanceLoop360({
3619
+ html: p.html, contentBody: p.contentBody,
3620
+ publisherPublicKey: p.publisherPublicKey,
3621
+ agentPublicKey: p.agentPublicKey, agentPrivateKey: p.agentPrivateKey,
3622
+ intendedUsage: p.intendedUsage, sourceUrl: p.sourceUrl,
3623
+ });
3624
+ return { content: [{ type: "text", text: `🔄 Governance 360 Loop\n\n${result.summary}\n\n${result.receipt ? `Receipt ID: ${result.receipt.receiptId}\nAccessed: ${result.receipt.accessed_at}` : 'No receipt (ungoverned content)'}` }] };
3625
+ });
3626
+ server.tool("create_access_receipt", "Create a signed access receipt — cryptographic proof that your agent consumed content under specific terms. The receipt captures terms and revocation policy at access time.", {
3627
+ agentPublicKey: z.string().describe("Your agent's Ed25519 public key (hex)"),
3628
+ agentPrivateKey: z.string().describe("Your agent's Ed25519 private key (hex)"),
3629
+ block: z.string().describe("Governance block JSON string"),
3630
+ sourceUrl: z.string().describe("URL where content was accessed"),
3631
+ intendedUsage: z.string().describe("How you intend to use this content"),
3632
+ }, async (p) => {
3633
+ const parsed = JSON.parse(p.block);
3634
+ const receipt = createAccessReceipt({
3635
+ agentPublicKey: p.agentPublicKey, agentPrivateKey: p.agentPrivateKey,
3636
+ block: parsed, sourceUrl: p.sourceUrl, intendedUsage: p.intendedUsage,
3637
+ governanceVerified: true,
3638
+ });
3639
+ return { content: [{ type: "text", text: `📝 Access Receipt Created\n\nID: ${receipt.receiptId}\nAgent: ${receipt.agent_did}\nPublisher: ${receipt.publisher_did}\nUsage: ${receipt.intended_usage}\nTerms: training=${receipt.terms_at_access.training || 'N/A'}\nRevocation: cached=${receipt.revocation_policy_at_access.cached_copy}` }] };
3640
+ });
3641
+ // ═══════════════════════════════════════
3551
3642
  // MCP Prompts — Role-Specific
3552
3643
  // ═══════════════════════════════════════
3553
3644
  server.prompt("coordination_role", "Get instructions for your assigned coordination role", {}, async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-passport-system-mcp",
3
- "version": "2.13.0",
3
+ "version": "2.15.0",
4
4
  "mcpName": "io.github.aeoess/agent-passport-mcp",
5
5
  "description": "MCP server for Agent Passport System — cryptographic identity, delegation, governance, and deliberation for AI agents",
6
6
  "type": "module",
@@ -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.22.0",
52
+ "agent-passport-system": "^1.24.0",
53
53
  "zod": "^3.25.76"
54
54
  },
55
55
  "devDependencies": {