agent-passport-system-mcp 8.0.0 → 8.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 CHANGED
@@ -6,21 +6,21 @@
6
6
  <img width="380" height="200" src="https://glama.ai/mcp/servers/@aeoess/agent-passport-system-mcp/badge" />
7
7
  </a>
8
8
 
9
- Enforcement and accountability layer for AI agents. Bring your own identity. 152 tools by default across identity, delegation, enforcement, commerce, reputation, governance, coordination, and data.
9
+ Enforcement and accountability layer for AI agents. Bring your own identity. 154 tools by default across identity, delegation, enforcement, commerce, reputation, governance, coordination, and data.
10
10
 
11
11
  ```bash
12
12
  npx agent-passport-system-mcp
13
13
  ```
14
14
 
15
- agent-passport-system-mcp 8.0.0 and 7.0.0 target SDK 8.x. The 6.x line targets SDK 6.x, and 5.0.2 targets SDK 5.x.
15
+ agent-passport-system-mcp 8.1.0, 8.0.0 and 7.0.0 target SDK 8.x. The 6.x line targets SDK 6.x, and 5.0.2 targets SDK 5.x.
16
16
 
17
- The default profile is `full`, all 152 tools. Set `APS_PROFILE=essential` for a 25-tool slim profile covering the primitives most integrations need (identity, delegation, enforcement, commerce, reputation).
17
+ The default profile is `full`, all 154 tools. Set `APS_PROFILE=essential` for a 28-tool slim profile covering the primitives most integrations need (identity, delegation, enforcement, commerce, reputation). The count is what `tools/list` returns and includes `list_profiles`, which every profile exposes.
18
18
 
19
19
  Available profiles: full (default), essential, identity, governance, coordination, commerce, data, gateway, comms, minimal.
20
20
 
21
21
  > **For AI agents:** visit [agent-passport.org/llms.txt](https://agent-passport.org/llms.txt) for machine-readable documentation or [llms-full.txt](https://agent-passport.org/llms-full.txt) for the complete technical reference. MCP discovery: [.well-known/mcp.json](https://agent-passport.org/.well-known/mcp.json).
22
22
 
23
- Works with any MCP client: Claude Desktop, Claude Code, Cursor, Windsurf, and more. Full surface area (the default): 152 tools across the protocol surface, including Wave 1 accountability primitives (Ed25519 ActionReceipt, AuthorityBoundaryReceipt, CustodyReceipt, ContestabilityReceipt, APSBundle, strict RFC 8785 JCS for interop-facing receipts, byte-match across implementations). Independently cited by [PDR in Production preprint (Nanook & Gerundium)](https://doi.org/10.5281/zenodo.19323172).
23
+ Works with any MCP client: Claude Desktop, Claude Code, Cursor, Windsurf, and more. Full surface area (the default): 154 tools across the protocol surface, including Wave 1 accountability primitives (Ed25519 ActionReceipt, AuthorityBoundaryReceipt, CustodyReceipt, ContestabilityReceipt, APSBundle, strict RFC 8785 JCS for interop-facing receipts, byte-match across implementations). Independently cited by [PDR in Production preprint (Nanook & Gerundium)](https://doi.org/10.5281/zenodo.19323172).
24
24
 
25
25
  ## Quick Start
26
26
 
@@ -73,7 +73,7 @@ Or for remote SSE:
73
73
 
74
74
  <!-- tools:start (generated by scripts/generate-readme-tools.mjs, do not hand-edit) -->
75
75
 
76
- ## Tools (152)
76
+ ## Tools (154)
77
77
 
78
78
  Every tool carries MCP annotations. **Read-only** means the tool writes no file, calls no mutating remote endpoint and changes no session state other tools read. **Destructive** means it deletes, revokes, supersedes, overwrites or irreversibly consumes something. **Network** means it can contact an external host (see [Network and local files](#network-and-local-files)). The hint values live in `src/toolAnnotations.ts`.
79
79
 
@@ -104,14 +104,16 @@ Every tool carries MCP annotations. **Read-only** means the tool writes no file,
104
104
  | `verify_issuer` | Verify Passport Issuer Signature | yes | | | Verify that a passport was officially issued by AEOESS. |
105
105
  | `verify_rotation_chain` | Verify Key Rotation Chain | yes | | | Verify all rotation signatures in a DID document's rotation log. |
106
106
 
107
- ### Delegation and escalation: 8 tools
107
+ ### Delegation and escalation: 10 tools
108
108
 
109
109
  | Tool | Title | Read-only | Destructive | Network | Description |
110
110
  |------|-------|-----------|-------------|---------|-------------|
111
111
  | `aps_check_escalation_required` | Check Escalation Required | yes | | | Escalation boundary: check whether an action on a v2 delegation requires owner confirmation before execution. |
112
112
  | `aps_record_owner_confirmation` | Record Owner Confirmation | yes | | | Escalation boundary: owner signs an OwnerConfirmation authorizing a flagged action. |
113
+ | `check_authority_delegation` | Check Authority Delegation | yes | | | Verify a root AuthorityDelegationV1 issued by this server's key, with the SDK chain verifier: shape, delegation_id, signature, time window and revocation status from this proces... |
113
114
  | `create_delegation` | Create Delegation | | | | [OPERATOR] Create a scoped delegation from one agent to another. |
114
115
  | `create_v2_delegation` | Create v2 Delegation | | | | Create a v2 delegation with versioning, mandatory sunset, and PolicyContext binding. |
116
+ | `issue_authority_delegation` | Issue Authority Delegation | | | | [OPERATOR] Issue a signed root AuthorityDelegationV1 (record_type aps:authority-delegation:v1, draft-03 section 3.1) from this server's key to a subject. |
115
117
  | `revoke_delegation` | Revoke Delegation | | yes | | [OPERATOR] Issue a signed revocation record (AuthorityRevocationV1, draft-03 section 3.5.1 direct revocation) for an AuthorityDelegationV1. |
116
118
  | `sub_delegate` | Sub-Delegate Authority | | | | Sub-delegate authority to another agent (must be within your delegation scope and depth). |
117
119
  | `supersede_v2_delegation` | Supersede v2 Delegation | | yes | | Supersede a v2 delegation. |
package/build/index.js CHANGED
@@ -26,7 +26,7 @@ createTaskBrief, assignTask, acceptTask, submitEvidence, reviewEvidence, handoff
26
26
  createDelegation, verifyDelegation, subDelegate,
27
27
  // revokeDelegation and cascadeRevoke are throw-only stubs in agent-passport-system 8.
28
28
  // revoke_delegation issues a draft-03 section 3.5.1 AuthorityRevocationV1 instead.
29
- issueAuthorityRevocation, recordAuthorityRevocation, InMemoryAuthorityRevocationStore, parseAuthorityDelegationJson, verifyAuthorityDelegationSignature,
29
+ issueAuthorityRevocation, recordAuthorityRevocation, InMemoryAuthorityRevocationStore, parseAuthorityDelegationJson, verifyAuthorityDelegationSignature, issueAuthorityDelegation, verifyAuthorityDelegation, createAuthorityRevocationResolver,
30
30
  // Agora (Layer 4)
31
31
  createAgoraMessage, createFeed, appendToFeed, getThread, getByTopic, getTopics, createRegistry, registerAgent,
32
32
  // Values/Policy (Layer 2 + 5)
@@ -430,6 +430,7 @@ const TOOL_PROFILES = {
430
430
  'create_principal', 'endorse_agent',
431
431
  'verify_endorsement', 'create_disclosure', 'create_delegation',
432
432
  'verify_delegation', 'revoke_delegation', 'sub_delegate',
433
+ 'issue_authority_delegation', 'check_authority_delegation',
433
434
  'revoke_endorsement', 'get_fleet_status', 'create_v2_delegation',
434
435
  'supersede_v2_delegation', 'resolve_authority', 'check_tier',
435
436
  'update_reputation', 'get_promotion_history', 'review_promotion',
@@ -500,6 +501,7 @@ const TOOL_PROFILES = {
500
501
  'identify',
501
502
  'generate_keys', 'issue_passport', 'get_passport_grade',
502
503
  'create_delegation', 'verify_delegation', 'revoke_delegation', 'sub_delegate',
504
+ 'issue_authority_delegation', 'check_authority_delegation',
503
505
  'load_values_floor', 'attest_to_floor',
504
506
  'create_intent', 'evaluate_intent', 'complete_action',
505
507
  'create_agent_context', 'execute_with_context',
@@ -597,6 +599,8 @@ export const TOOL_SCOPE_MAP = {
597
599
  'create_delegation': 'delegation',
598
600
  'verify_delegation': 'delegation',
599
601
  'revoke_delegation': 'delegation',
602
+ 'issue_authority_delegation': 'delegation',
603
+ 'check_authority_delegation': 'delegation',
600
604
  'sub_delegate': 'delegation',
601
605
  'create_v2_delegation': 'delegation',
602
606
  'supersede_v2_delegation': 'delegation',
@@ -1822,7 +1826,119 @@ const LEGACY_DELEGATION_REFUSAL = 'Refused: this is a legacy delegation (create_
1822
1826
  'agent-passport-system 8 has no revocation for that pre-draft record: revokeDelegation and cascadeRevoke ' +
1823
1827
  'are throw-only stubs, and an AuthorityRevocationV1 can only name an AuthorityDelegationV1 ' +
1824
1828
  '(record_type aps:authority-delegation:v1, delegation_id sha256:...). Pass the AuthorityDelegationV1 ' +
1825
- 'record as `delegation`.';
1829
+ 'record as `delegation`. To issue a delegation this server can revoke, use issue_authority_delegation.';
1830
+ const serverIssuer = () => `aps:ed25519:${state.agentKey}`;
1831
+ server.registerTool("issue_authority_delegation", { description: "[OPERATOR] Issue a signed root AuthorityDelegationV1 (record_type aps:authority-delegation:v1, draft-03 section 3.1) from this server's key to a subject. This is the record revoke_delegation can revoke and check_authority_delegation can verify. Legacy create_delegation records cannot be revoked under SDK 8. Scope grants use the aps-hierarchical-v1 profile (for example commerce:checkout or commerce:*). Spend is bounded by default: give spend_unit, spend_per_action and spend_cumulative, or set spend_unbounded true. The record is tracked in this process's in-memory revocation store, which is lost on restart. Returns the signed record as JSON for the caller to keep and present. The issuer is always aps:ed25519:<this server's public key>. Holding the server key is the only authorization checked, so the tool is refused on a remote server (MCP_TRANSPORT=sse or MCP_REMOTE=1).", inputSchema: z.object({
1832
+ subject: z.string().min(1).describe("Identifier of the agent receiving authority, for example a DID or an agent id."),
1833
+ grants: z.array(z.string().min(1)).min(1).describe("Scope grants, aps-hierarchical-v1 profile, for example ['commerce:checkout']."),
1834
+ spend_unit: z.string().optional().describe("Exact-match accounting unit, for example iso4217:USD:minor."),
1835
+ spend_per_action: z.number().int().nonnegative().optional().describe("Largest single action, as an integer in spend_unit."),
1836
+ spend_cumulative: z.number().int().nonnegative().optional().describe("Most the whole delegation subtree may spend, as an integer in spend_unit."),
1837
+ spend_unbounded: z.boolean().default(false).describe("Set true to issue with no spend limit. Refused together with spend fields."),
1838
+ depth_remaining: z.number().int().min(0).max(16).default(0).describe("How many further delegation hops the subject may create."),
1839
+ ttl_hours: z.number().positive().max(8760).default(1).describe("Validity length from now, in hours."),
1840
+ reputation_ceiling: z.number().int().min(0).max(100).default(100).describe("Reputation ceiling, aps-score-0-100-v1 profile."),
1841
+ values_required: z.array(z.string()).default([]).describe("Values floor identifiers the subject must hold, for example F-001."),
1842
+ reversibility_ceiling: z.enum(["tentative", "compensable", "irreversible"]).default("compensable").describe("Most irreversible action class the delegation permits."),
1843
+ }).strict() }, async (args) => {
1844
+ recordBehavior('issue_authority_delegation');
1845
+ // Holding the key is the only authorization this server checks. On a hosted server any
1846
+ // connected client would be minting root authority under the host's key, so issuance is
1847
+ // limited to a local (stdio) server until a remote authorization model exists.
1848
+ if (process.env.MCP_TRANSPORT === 'sse' || process.env.MCP_REMOTE === '1') {
1849
+ return { content: [{ type: "text", text: "Refused: issue_authority_delegation runs only on a local (stdio) server. On a remote server it would sign root authority with the host's key for any connected client." }], isError: true };
1850
+ }
1851
+ const keyErr = requireKey();
1852
+ if (keyErr)
1853
+ return { content: [{ type: "text", text: keyErr }], isError: true };
1854
+ const fail = (text) => ({ content: [{ type: "text", text }], isError: true });
1855
+ const spendGiven = [args.spend_unit, args.spend_per_action, args.spend_cumulative].filter((v) => v !== undefined).length;
1856
+ if (spendGiven !== 0 && spendGiven !== 3)
1857
+ return fail("Refused: give all three of spend_unit, spend_per_action and spend_cumulative, or none of them.");
1858
+ if (spendGiven === 3 && args.spend_unbounded)
1859
+ return fail("Refused: spend_unbounded is set together with spend fields. Give one or the other.");
1860
+ if (spendGiven === 0 && !args.spend_unbounded)
1861
+ return fail("Refused: no spend limit given. Give spend_unit, spend_per_action and spend_cumulative, or set spend_unbounded true to issue without a limit.");
1862
+ if (spendGiven === 3 && args.spend_per_action > args.spend_cumulative)
1863
+ return fail("Refused: spend_per_action is larger than spend_cumulative.");
1864
+ // The issuer is always this server's own key identifier, so a record cannot claim a
1865
+ // name (a DID, another organisation) whose key material this server does not hold.
1866
+ const issuer = serverIssuer();
1867
+ const now = Date.now();
1868
+ const iso = (t) => new Date(t).toISOString();
1869
+ let delegation;
1870
+ try {
1871
+ delegation = issueAuthorityDelegation({
1872
+ record_type: 'aps:authority-delegation:v1',
1873
+ version: '1.0',
1874
+ parent_delegation_id: null,
1875
+ issuer,
1876
+ subject: args.subject,
1877
+ verification_method: `${issuer}#key-1`,
1878
+ issued_at: iso(now),
1879
+ nonce: randomBytes(16).toString('hex'),
1880
+ authority: {
1881
+ scope: { profile: 'aps-hierarchical-v1', grants: [...new Set(args.grants)].sort() },
1882
+ spend: spendGiven === 3
1883
+ ? { mode: 'bounded', unit: args.spend_unit, per_action: String(args.spend_per_action), cumulative: String(args.spend_cumulative) }
1884
+ : { mode: 'unbounded' },
1885
+ depth: { remaining: args.depth_remaining },
1886
+ time: { not_before: iso(now), not_after: iso(now + Math.round(args.ttl_hours * 3_600_000)) },
1887
+ reputation: { profile: 'aps-score-0-100-v1', ceiling: args.reputation_ceiling },
1888
+ values: { profile: 'aps-values-identifiers-v1', required: [...new Set(args.values_required)].sort() },
1889
+ reversibility: { profile: 'aps-tci-v1', ceiling: args.reversibility_ceiling },
1890
+ },
1891
+ }, state.privateKey);
1892
+ }
1893
+ catch (err) {
1894
+ return fail(safeError('Issuance refused', err));
1895
+ }
1896
+ // identify accepts any key pair. A pair that does not match would sign a record that
1897
+ // does not verify under the key it names, so it is refused rather than returned.
1898
+ let selfCheck = false;
1899
+ try {
1900
+ selfCheck = verifyAuthorityDelegationSignature(delegation, state.agentKey);
1901
+ }
1902
+ catch {
1903
+ selfCheck = false;
1904
+ }
1905
+ if (!selfCheck)
1906
+ return fail("Refused: the issued record does not verify under this server's public key. The public and private key given to identify (or AGENT_KEY and AGENT_PRIVATE_KEY) do not belong together.");
1907
+ authorityRevocationStore.track(delegation.delegation_id);
1908
+ return { content: [{ type: "text", text: JSON.stringify({ delegation, note: "Revocable with revoke_delegation while this server process runs. Keep this record: the server stores only its revocation status, in memory." }, null, 2) }] };
1909
+ });
1910
+ server.registerTool("check_authority_delegation", { description: "Verify a root AuthorityDelegationV1 issued by this server's key, with the SDK chain verifier: shape, delegation_id, signature, time window and revocation status from this process's in-memory revocation store. Returns the verifier's state (valid, invalid, indeterminate or unsupported) and its failure codes, for example REVOKED or EXPIRED. A delegation this server did not issue, including one signed by this key under another issuer name, resolves no key and is not valid here. A delegation issued before a restart has revocation status unknown, because the store is in memory.", inputSchema: z.object({
1911
+ delegation: z.union([z.string(), z.record(z.string(), z.unknown())]).describe("The AuthorityDelegationV1 to check, as a JSON string or object."),
1912
+ }) }, async (args) => {
1913
+ recordBehavior('check_authority_delegation');
1914
+ const keyErr = requireKey();
1915
+ if (keyErr)
1916
+ return { content: [{ type: "text", text: keyErr }], isError: true };
1917
+ let target;
1918
+ try {
1919
+ target = typeof args.delegation === 'string' ? parseAuthorityDelegationJson(args.delegation) : args.delegation;
1920
+ }
1921
+ catch (err) {
1922
+ return { content: [{ type: "text", text: safeError('Refused: delegation is not a parseable AuthorityDelegationV1', err) }], isError: true };
1923
+ }
1924
+ // Issued by this server means both: the record names this server's own issuer
1925
+ // identifier, and its signature verifies under this server's key.
1926
+ let ours = false;
1927
+ try {
1928
+ ours = target?.issuer === serverIssuer() && target?.verification_method === `${serverIssuer()}#key-1` && verifyAuthorityDelegationSignature(target, state.agentKey);
1929
+ }
1930
+ catch {
1931
+ ours = false;
1932
+ }
1933
+ const resolveVerificationKey = (issuer, method) => ours && issuer === target.issuer && method === target.verification_method ? state.agentKey : { outcome: 'not_found' };
1934
+ const result = verifyAuthorityDelegation(target, {
1935
+ now: new Date().toISOString(),
1936
+ resolveVerificationKey,
1937
+ trustRoot: () => ours,
1938
+ resolveRevocation: createAuthorityRevocationResolver(authorityRevocationStore, { resolveVerificationKey }),
1939
+ });
1940
+ return { content: [{ type: "text", text: JSON.stringify({ delegation_id: target?.delegation_id ?? null, issued_by_this_server: ours, ...result }, null, 2) }] };
1941
+ });
1826
1942
  server.registerTool("revoke_delegation", { description: "[OPERATOR] Issue a signed revocation record (AuthorityRevocationV1, draft-03 section 3.5.1 direct revocation) for an AuthorityDelegationV1. Signs the record with this server's key, verifies it against the delegation, records it in this process's in-memory revocation store, and returns the signed record as JSON for the caller to publish or verify. Only the delegation's issuer may revoke, so the delegation must verify under this server's public key. The record's revoker is the delegation's issuer and its verification_method is the delegation's own. Descendants are not given separate records: a chain verifier that holds this record rejects every chain containing the delegation as an ancestor. The store is in-memory for this process only, is lost on restart, and is not consulted by verify_delegation, which checks legacy delegations. Legacy delegation records from create_delegation and sub_delegate (del_...) are refused, because SDK 8 has no revocation for them. A repeat call for an already revoked delegation returns the earlier record unchanged.", inputSchema: z.object({
1827
1943
  delegation: z.union([z.string(), z.record(z.string(), z.unknown())]).optional().describe("The AuthorityDelegationV1 to revoke (record_type aps:authority-delegation:v1), as a JSON string or object. Required for a revocation to be issued."),
1828
1944
  delegation_id: z.string().optional().describe("Optional. Checked against delegation.delegation_id when both are given. A legacy session id (del_...) is refused with an explanation."),
@@ -90,6 +90,8 @@ export const TOOL_ANNOTATIONS = {
90
90
  create_delegation: rw("Create Delegation", ADD),
91
91
  verify_delegation: ro("Verify Delegation"),
92
92
  revoke_delegation: rw("Revoke Delegation", { destructive: true, idempotent: true, openWorld: false }),
93
+ issue_authority_delegation: rw("Issue Authority Delegation", ADD),
94
+ check_authority_delegation: ro("Check Authority Delegation"),
93
95
  sub_delegate: rw("Sub-Delegate Authority", ADD),
94
96
  // ── Agora ──
95
97
  post_agora_message: rw("Post Agora Message", ADD), // appends to the agora feed files on disk
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-passport-system-mcp",
3
- "version": "8.0.0",
3
+ "version": "8.1.0",
4
4
  "mcpName": "io.github.agent-passport-system/agent-passport-mcp",
5
5
  "description": "MCP server for the Agent Passport System, protocol-layer tools only. Identity, delegation, reputation, attestation, coordination, commerce, charter amendment lifecycle, attribution. Counts and the SDK version it tracks live in the README.",
6
6
  "type": "module",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "generated_by": "scripts/generate-manifest.mjs from src/index.ts REGISTERED_TOOL_NAMES. Generated file, do not hand-edit.",
3
- "count": 152,
3
+ "count": 154,
4
4
  "tools": [
5
5
  "accept_assignment",
6
6
  "activate_emergency",
@@ -37,6 +37,7 @@
37
37
  "attest_to_floor",
38
38
  "broadcast",
39
39
  "check_aggregate_constraints",
40
+ "check_authority_delegation",
40
41
  "check_combination_permitted",
41
42
  "check_jurisdiction_transfer",
42
43
  "check_messages",
@@ -104,6 +105,7 @@
104
105
  "identify",
105
106
  "is_evidence_fresh",
106
107
  "is_key_active",
108
+ "issue_authority_delegation",
107
109
  "issue_passport",
108
110
  "list_agents",
109
111
  "list_issuance_records",