agent-passport-system-mcp 2.10.0 → 2.12.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
- **82 tools** across 37 core modules + 30 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
+ **83 tools** across 37 core modules + 30 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. 82 tools ready.
32
+ Auto-configures Claude Desktop and Cursor. Restart your AI client. 83 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.21.1, 1165 tests)
209
+ - npm SDK: [agent-passport-system](https://www.npmjs.com/package/agent-passport-system) (v1.21.2, 1178 tests)
210
210
  - Python SDK: [agent-passport-system](https://pypi.org/project/agent-passport-system/) (v0.4.0, 86 tests)
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
@@ -275,6 +275,77 @@ const server = new McpServer({
275
275
  version: "2.0.0",
276
276
  });
277
277
  // ═══════════════════════════════════════
278
+ // Tool Profiles — expose only relevant tools
279
+ // ═══════════════════════════════════════
280
+ // Set APS_PROFILE env var to limit exposed tools.
281
+ // Default: 'full' (all tools). Options: identity, governance,
282
+ // coordination, commerce, data, gateway, comms, minimal.
283
+ const TOOL_PROFILES = {
284
+ identity: new Set([
285
+ 'identify', 'generate_keys', 'create_principal', 'endorse_agent',
286
+ 'verify_endorsement', 'create_disclosure', 'create_delegation',
287
+ 'verify_delegation', 'revoke_delegation', 'sub_delegate',
288
+ ]),
289
+ governance: new Set([
290
+ 'identify', 'generate_keys', 'create_principal',
291
+ 'load_values_floor', 'attest_to_floor', 'create_intent', 'evaluate_intent',
292
+ 'create_agent_context', 'execute_with_context', 'complete_action',
293
+ 'create_delegation', 'verify_delegation', 'revoke_delegation',
294
+ ]),
295
+ coordination: new Set([
296
+ 'identify', 'generate_keys',
297
+ 'create_task_brief', 'assign_agent', 'accept_assignment',
298
+ 'submit_evidence', 'review_evidence', 'handoff_evidence',
299
+ 'submit_deliverable', 'complete_task', 'list_tasks', 'get_task_detail',
300
+ 'get_evidence', 'get_my_role',
301
+ ]),
302
+ commerce: new Set([
303
+ 'identify', 'generate_keys', 'create_delegation',
304
+ 'commerce_preflight', 'get_commerce_spend', 'request_human_approval',
305
+ ]),
306
+ data: new Set([
307
+ 'identify', 'generate_keys', 'create_principal',
308
+ 'register_data_source', 'create_data_enforcement_gate', 'check_data_access',
309
+ 'query_contributions', 'get_source_metrics', 'get_agent_data_footprint',
310
+ 'generate_settlement', 'generate_compliance_report',
311
+ 'record_training_use', 'get_model_data_sources',
312
+ ]),
313
+ gateway: new Set([
314
+ 'identify', 'generate_keys', 'create_principal',
315
+ 'create_gateway', 'register_gateway_agent',
316
+ 'gateway_process_tool_call', 'gateway_approve', 'gateway_execute_approval',
317
+ 'gateway_stats', 'create_delegation', 'load_values_floor', 'attest_to_floor',
318
+ ]),
319
+ comms: new Set([
320
+ 'identify', 'generate_keys',
321
+ 'post_agora_message', 'get_agora_topics', 'get_agora_thread',
322
+ 'get_agora_by_topic', 'register_agora_agent',
323
+ 'send_message', 'check_messages', 'broadcast', 'list_agents',
324
+ ]),
325
+ minimal: new Set([
326
+ 'identify', 'generate_keys', 'create_delegation', 'verify_delegation',
327
+ 'create_intent', 'evaluate_intent', 'list_profiles',
328
+ ]),
329
+ };
330
+ const activeProfile = (process.env.APS_PROFILE || 'full').toLowerCase();
331
+ const profileFilter = TOOL_PROFILES[activeProfile];
332
+ // Wrap server.tool to respect profile filtering
333
+ const _origTool = server.tool.bind(server);
334
+ server.tool = function (name, ...rest) {
335
+ if (name === 'list_profiles')
336
+ return _origTool(name, ...rest);
337
+ if (activeProfile === 'full' || !profileFilter || profileFilter.has(name)) {
338
+ return _origTool(name, ...rest);
339
+ }
340
+ };
341
+ // ═══════════════════════════════════════
342
+ // TOOL: list_profiles
343
+ // ═══════════════════════════════════════
344
+ server.tool("list_profiles", "Show available tool profiles. Set APS_PROFILE env var to limit exposed tools (e.g. APS_PROFILE=data).", {}, async () => {
345
+ const lines = Object.entries(TOOL_PROFILES).map(([name, tools]) => `• ${name} (${tools.size} tools): ${Array.from(tools).slice(0, 6).join(', ')}${tools.size > 6 ? '...' : ''}`);
346
+ return { content: [{ type: "text", text: `šŸ“‹ Tool Profiles (set APS_PROFILE env var):\n\nActive: ${activeProfile} (${activeProfile === 'full' ? '82' : profileFilter?.size || '82'} tools)\n\n${lines.join('\n')}\n\n• full (82 tools): All tools exposed (default)` }] };
347
+ });
348
+ // ═══════════════════════════════════════
278
349
  // TOOL: identify
279
350
  // ═══════════════════════════════════════
280
351
  server.tool("identify", "Identify yourself to the coordination server. Sets your role and scopes tools accordingly.", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-passport-system-mcp",
3
- "version": "2.10.0",
3
+ "version": "2.12.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",