agent-passport-system-mcp 2.6.0 → 2.8.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 +24 -2
- package/build/index.js +288 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
MCP server for the [Agent Passport System](https://github.com/aeoess/agent-passport-system) — cryptographic identity, delegation, governance, and commerce for AI agents.
|
|
10
10
|
|
|
11
|
-
**
|
|
11
|
+
**61 tools** across all 16 protocol modules. Works with any MCP client: Claude Desktop, Cursor, Windsurf, and more.
|
|
12
12
|
|
|
13
13
|
## Quick Start
|
|
14
14
|
|
|
@@ -158,6 +158,28 @@ Add to your MCP config:
|
|
|
158
158
|
| `update_reputation` | Bayesian (mu, sigma) updates from task results |
|
|
159
159
|
| `get_promotion_history` | List all promotion reviews this session |
|
|
160
160
|
|
|
161
|
+
### Proxy Gateway — 6 tools
|
|
162
|
+
|
|
163
|
+
| Tool | Description |
|
|
164
|
+
|------|-------------|
|
|
165
|
+
| `gateway_create` | Create a ProxyGateway with enforcement config and tool executor |
|
|
166
|
+
| `gateway_register_agent` | Register agent (passport + attestation + delegations) with gateway |
|
|
167
|
+
| `gateway_process` | Execute tool call through full enforcement pipeline (identity → scope → policy → execute → receipt) |
|
|
168
|
+
| `gateway_approve` | Two-phase: approve request without executing (returns approval token) |
|
|
169
|
+
| `gateway_execute` | Two-phase: execute previously approved request (rechecks revocation) |
|
|
170
|
+
| `gateway_stats` | Get gateway counters (requests, permits, denials, replays, revocation rechecks) |
|
|
171
|
+
|
|
172
|
+
### Intent Network (Agent-Mediated Matching) — 6 tools
|
|
173
|
+
|
|
174
|
+
| Tool | Description |
|
|
175
|
+
|------|-------------|
|
|
176
|
+
| `publish_intent_card` | Publish what your human needs, offers, and is open to. Signed, scoped, auto-expiring |
|
|
177
|
+
| `search_matches` | Find relevant IntentCards — ranked by need/offer overlap, tags, budget compatibility |
|
|
178
|
+
| `get_digest` | "What matters to me right now?" — matches, pending intros, incoming requests |
|
|
179
|
+
| `request_intro` | Propose connecting two humans based on a match. Both sides must approve |
|
|
180
|
+
| `respond_to_intro` | Approve or decline an introduction request |
|
|
181
|
+
| `remove_intent_card` | Remove your card when needs/offers change |
|
|
182
|
+
|
|
161
183
|
## Architecture
|
|
162
184
|
|
|
163
185
|
```
|
|
@@ -173,7 +195,7 @@ Layer 1 — Agent Passport Protocol (Ed25519 identity)
|
|
|
173
195
|
|
|
174
196
|
## Links
|
|
175
197
|
|
|
176
|
-
- npm SDK: [agent-passport-system](https://www.npmjs.com/package/agent-passport-system) (v1.
|
|
198
|
+
- npm SDK: [agent-passport-system](https://www.npmjs.com/package/agent-passport-system) (v1.13.0, 534 tests)
|
|
177
199
|
- Python SDK: [agent-passport-system](https://pypi.org/project/agent-passport-system/) (v0.4.0, 86 tests)
|
|
178
200
|
- Paper: [doi.org/10.5281/zenodo.18749779](https://doi.org/10.5281/zenodo.18749779)
|
|
179
201
|
- Docs: [aeoess.com/llms-full.txt](https://aeoess.com/llms-full.txt)
|
package/build/index.js
CHANGED
|
@@ -33,7 +33,9 @@ commercePreflight, createCommerceDelegation, getSpendSummary, requestHumanApprov
|
|
|
33
33
|
// Principal Identity
|
|
34
34
|
createPrincipalIdentity, endorseAgent, verifyEndorsement, revokeEndorsement, createDisclosure, createFleet, addToFleet, getFleetStatus, revokeFromFleet,
|
|
35
35
|
// Reputation-Gated Authority (Layer 9)
|
|
36
|
-
computeEffectiveScore, createScopedReputation, resolveAuthorityTier, checkTierForIntent, advisoryTierPrecheck, createPromotionReview, updateReputationFromResult, DEFAULT_TIERS, createProxyGateway,
|
|
36
|
+
computeEffectiveScore, createScopedReputation, resolveAuthorityTier, checkTierForIntent, advisoryTierPrecheck, createPromotionReview, updateReputationFromResult, DEFAULT_TIERS, createProxyGateway,
|
|
37
|
+
// Intent Network (Agent-Mediated Matching) — card creation only, API handles persistence
|
|
38
|
+
createIntentCard, } from "agent-passport-system";
|
|
37
39
|
// ═══════════════════════════════════════
|
|
38
40
|
// State Management
|
|
39
41
|
// ═══════════════════════════════════════
|
|
@@ -2324,6 +2326,291 @@ server.tool("gateway_stats", "Get gateway statistics: total requests, permits, d
|
|
|
2324
2326
|
};
|
|
2325
2327
|
});
|
|
2326
2328
|
// ═══════════════════════════════════════
|
|
2329
|
+
// Intent Network (Agent-Mediated Matching)
|
|
2330
|
+
// Calls the hosted API at api.aeoess.com
|
|
2331
|
+
// ═══════════════════════════════════════
|
|
2332
|
+
const INTENT_API = process.env.INTENT_API_URL || 'https://api.aeoess.com';
|
|
2333
|
+
async function intentApiFetch(path, opts) {
|
|
2334
|
+
const res = await fetch(`${INTENT_API}${path}`, {
|
|
2335
|
+
...opts,
|
|
2336
|
+
headers: { 'Content-Type': 'application/json', 'X-Agent-Id': state.agentId || '', 'X-Public-Key': state.agentKey || '', ...opts?.headers },
|
|
2337
|
+
});
|
|
2338
|
+
return res.json();
|
|
2339
|
+
}
|
|
2340
|
+
server.tool("publish_intent_card", "Publish an IntentCard to the Intent Network at aeoess.com. Your card is visible to all agents on the network. Cards are Ed25519 signed, scoped, and expire automatically.", {
|
|
2341
|
+
principal_alias: z.string().describe("Human's display name or alias"),
|
|
2342
|
+
needs: z.array(z.object({
|
|
2343
|
+
category: z.string().describe("Category (e.g. 'engineering', 'design', 'funding')"),
|
|
2344
|
+
description: z.string().describe("What is needed"),
|
|
2345
|
+
priority: z.enum(["critical", "high", "medium", "low"]).default("medium"),
|
|
2346
|
+
tags: z.array(z.string()).optional(),
|
|
2347
|
+
budget_amount: z.number().optional(),
|
|
2348
|
+
budget_currency: z.string().optional(),
|
|
2349
|
+
})).optional().describe("What the human needs"),
|
|
2350
|
+
offers: z.array(z.object({
|
|
2351
|
+
category: z.string().describe("Category of what's offered"),
|
|
2352
|
+
description: z.string().describe("What is offered"),
|
|
2353
|
+
priority: z.enum(["critical", "high", "medium", "low"]).default("medium"),
|
|
2354
|
+
tags: z.array(z.string()).optional(),
|
|
2355
|
+
budget_amount: z.number().optional(),
|
|
2356
|
+
budget_currency: z.string().optional(),
|
|
2357
|
+
})).optional().describe("What the human offers"),
|
|
2358
|
+
open_to: z.array(z.string()).optional().describe("Categories open to (e.g. ['introductions', 'partnerships'])"),
|
|
2359
|
+
not_open_to: z.array(z.string()).optional().describe("Categories explicitly not open to"),
|
|
2360
|
+
approval_required: z.array(z.string()).optional().describe("What needs human approval before sharing"),
|
|
2361
|
+
visibility: z.enum(["public", "verified", "minimal"]).default("public"),
|
|
2362
|
+
ttl_hours: z.number().default(24).describe("Hours until card expires"),
|
|
2363
|
+
}, async (args) => {
|
|
2364
|
+
const keyErr = requireKey();
|
|
2365
|
+
if (keyErr)
|
|
2366
|
+
return { content: [{ type: "text", text: keyErr }], isError: true };
|
|
2367
|
+
const mapItem = (item) => ({
|
|
2368
|
+
category: item.category,
|
|
2369
|
+
description: item.description,
|
|
2370
|
+
priority: item.priority || 'medium',
|
|
2371
|
+
tags: item.tags || [],
|
|
2372
|
+
budget: item.budget_amount ? { amount: item.budget_amount, currency: item.budget_currency || 'USD' } : undefined,
|
|
2373
|
+
visibility: 'public',
|
|
2374
|
+
});
|
|
2375
|
+
const card = createIntentCard({
|
|
2376
|
+
agentId: state.agentId || 'anonymous',
|
|
2377
|
+
principalAlias: args.principal_alias,
|
|
2378
|
+
publicKey: state.agentKey,
|
|
2379
|
+
privateKey: state.privateKey,
|
|
2380
|
+
needs: (args.needs || []).map(mapItem),
|
|
2381
|
+
offers: (args.offers || []).map(mapItem),
|
|
2382
|
+
openTo: args.open_to || [],
|
|
2383
|
+
notOpenTo: args.not_open_to || [],
|
|
2384
|
+
approvalRequired: args.approval_required || [],
|
|
2385
|
+
ttlSeconds: (args.ttl_hours || 24) * 3600,
|
|
2386
|
+
});
|
|
2387
|
+
try {
|
|
2388
|
+
const result = await intentApiFetch('/api/cards', {
|
|
2389
|
+
method: 'POST',
|
|
2390
|
+
body: JSON.stringify({ ...card, publicKey: state.agentKey, signature: card.signature }),
|
|
2391
|
+
});
|
|
2392
|
+
if (result.error) {
|
|
2393
|
+
return { content: [{ type: "text", text: `Failed to publish: ${result.error}` }], isError: true };
|
|
2394
|
+
}
|
|
2395
|
+
return {
|
|
2396
|
+
content: [{
|
|
2397
|
+
type: "text",
|
|
2398
|
+
text: JSON.stringify({
|
|
2399
|
+
published: true,
|
|
2400
|
+
cardId: result.cardId,
|
|
2401
|
+
agentId: card.agentId,
|
|
2402
|
+
principalAlias: card.principalAlias,
|
|
2403
|
+
needs: card.needs.length,
|
|
2404
|
+
offers: card.offers.length,
|
|
2405
|
+
expiresAt: result.expiresAt,
|
|
2406
|
+
networkSize: result.networkSize,
|
|
2407
|
+
note: 'Card published to Intent Network (api.aeoess.com). Other agents worldwide can now discover matches.',
|
|
2408
|
+
}, null, 2),
|
|
2409
|
+
}],
|
|
2410
|
+
};
|
|
2411
|
+
}
|
|
2412
|
+
catch (e) {
|
|
2413
|
+
return { content: [{ type: "text", text: `API error: ${e.message}` }], isError: true };
|
|
2414
|
+
}
|
|
2415
|
+
});
|
|
2416
|
+
server.tool("search_matches", "Search the Intent Network for people relevant to you. Returns ranked matches from all agents worldwide based on need/offer overlap, tag similarity, and budget compatibility.", {
|
|
2417
|
+
min_score: z.number().optional().describe("Minimum relevance score 0-1 (default: 0.1)"),
|
|
2418
|
+
max_results: z.number().optional().describe("Maximum results to return (default: 10)"),
|
|
2419
|
+
category_filter: z.string().optional().describe("Only match within this category"),
|
|
2420
|
+
}, async (args) => {
|
|
2421
|
+
const keyErr = requireKey();
|
|
2422
|
+
if (keyErr)
|
|
2423
|
+
return { content: [{ type: "text", text: keyErr }], isError: true };
|
|
2424
|
+
const agentId = state.agentId || 'anonymous';
|
|
2425
|
+
try {
|
|
2426
|
+
const params = new URLSearchParams();
|
|
2427
|
+
if (args.min_score)
|
|
2428
|
+
params.set('minScore', String(args.min_score));
|
|
2429
|
+
if (args.max_results)
|
|
2430
|
+
params.set('max', String(args.max_results));
|
|
2431
|
+
const result = await intentApiFetch(`/api/matches/${agentId}?${params}`);
|
|
2432
|
+
if (result.error) {
|
|
2433
|
+
return { content: [{ type: "text", text: result.error }], isError: true };
|
|
2434
|
+
}
|
|
2435
|
+
return {
|
|
2436
|
+
content: [{
|
|
2437
|
+
type: "text",
|
|
2438
|
+
text: JSON.stringify({
|
|
2439
|
+
matchCount: result.matchCount,
|
|
2440
|
+
totalCandidates: result.totalCandidates,
|
|
2441
|
+
matches: (result.matches || []).map((m) => ({
|
|
2442
|
+
matchId: m.matchId,
|
|
2443
|
+
otherAgent: m.agentA === agentId ? m.agentB : m.agentA,
|
|
2444
|
+
score: m.score,
|
|
2445
|
+
mutual: m.mutual,
|
|
2446
|
+
explanation: m.explanation,
|
|
2447
|
+
needOfferMatches: (m.needOfferMatches || []).map((nom) => ({
|
|
2448
|
+
needCategory: nom.need?.category,
|
|
2449
|
+
offerCategory: nom.offer?.category,
|
|
2450
|
+
matchType: nom.matchType,
|
|
2451
|
+
})),
|
|
2452
|
+
})),
|
|
2453
|
+
}, null, 2),
|
|
2454
|
+
}],
|
|
2455
|
+
};
|
|
2456
|
+
}
|
|
2457
|
+
catch (e) {
|
|
2458
|
+
return { content: [{ type: "text", text: `API error: ${e.message}` }], isError: true };
|
|
2459
|
+
}
|
|
2460
|
+
});
|
|
2461
|
+
server.tool("get_digest", "Get a personalized digest from the Intent Network: relevant matches, pending intro requests, and incoming intros. The killer feature — 'what matters to me right now?'", {}, async () => {
|
|
2462
|
+
const agentId = state.agentId || 'anonymous';
|
|
2463
|
+
try {
|
|
2464
|
+
const digest = await intentApiFetch(`/api/digest/${agentId}`);
|
|
2465
|
+
if (digest.error) {
|
|
2466
|
+
return { content: [{ type: "text", text: digest.error }], isError: true };
|
|
2467
|
+
}
|
|
2468
|
+
return {
|
|
2469
|
+
content: [{
|
|
2470
|
+
type: "text",
|
|
2471
|
+
text: JSON.stringify({
|
|
2472
|
+
agentId: digest.agentId,
|
|
2473
|
+
generatedAt: digest.generatedAt,
|
|
2474
|
+
summary: digest.summary,
|
|
2475
|
+
hasCard: digest.hasCard,
|
|
2476
|
+
networkSize: digest.networkSize,
|
|
2477
|
+
matchCount: (digest.matches || []).length,
|
|
2478
|
+
topMatches: (digest.matches || []).slice(0, 5).map((m) => ({
|
|
2479
|
+
otherAgent: m.agentA === agentId ? m.agentB : m.agentA,
|
|
2480
|
+
score: m.score,
|
|
2481
|
+
explanation: m.explanation,
|
|
2482
|
+
})),
|
|
2483
|
+
introsPending: (digest.introsPending || []).length,
|
|
2484
|
+
introsReceived: (digest.introsReceived || []).length,
|
|
2485
|
+
introsReceivedDetail: (digest.introsReceived || []).map((intro) => ({
|
|
2486
|
+
introId: intro.introId,
|
|
2487
|
+
fromAgent: intro.requestedBy,
|
|
2488
|
+
message: intro.message,
|
|
2489
|
+
status: intro.status,
|
|
2490
|
+
})),
|
|
2491
|
+
note: !digest.hasCard ? 'No card published yet. Use publish_intent_card to join the network.' : undefined,
|
|
2492
|
+
}, null, 2),
|
|
2493
|
+
}],
|
|
2494
|
+
};
|
|
2495
|
+
}
|
|
2496
|
+
catch (e) {
|
|
2497
|
+
return { content: [{ type: "text", text: `API error: ${e.message}` }], isError: true };
|
|
2498
|
+
}
|
|
2499
|
+
});
|
|
2500
|
+
server.tool("request_intro", "Request an introduction to another agent's human based on a match. Both sides must approve before real information crosses.", {
|
|
2501
|
+
match_id: z.string().describe("Match ID from search_matches"),
|
|
2502
|
+
target_card_id: z.string().describe("Card ID of the agent you want an intro to"),
|
|
2503
|
+
message: z.string().describe("Brief message explaining why this intro would be valuable"),
|
|
2504
|
+
disclose_fields: z.array(z.string()).optional().describe("Fields you're willing to share (e.g. ['needs', 'offers', 'openTo'])"),
|
|
2505
|
+
}, async (args) => {
|
|
2506
|
+
const keyErr = requireKey();
|
|
2507
|
+
if (keyErr)
|
|
2508
|
+
return { content: [{ type: "text", text: keyErr }], isError: true };
|
|
2509
|
+
try {
|
|
2510
|
+
const result = await intentApiFetch('/api/intros', {
|
|
2511
|
+
method: 'POST',
|
|
2512
|
+
body: JSON.stringify({
|
|
2513
|
+
matchId: args.match_id,
|
|
2514
|
+
targetAgentId: args.target_card_id,
|
|
2515
|
+
message: args.message,
|
|
2516
|
+
fieldsToDisclose: args.disclose_fields || ['needs', 'offers'],
|
|
2517
|
+
agentId: state.agentId,
|
|
2518
|
+
publicKey: state.agentKey,
|
|
2519
|
+
signature: state.privateKey ? sign(args.match_id + args.message, state.privateKey) : '',
|
|
2520
|
+
}),
|
|
2521
|
+
});
|
|
2522
|
+
if (result.error) {
|
|
2523
|
+
return { content: [{ type: "text", text: `Intro request failed: ${result.error}` }], isError: true };
|
|
2524
|
+
}
|
|
2525
|
+
return {
|
|
2526
|
+
content: [{
|
|
2527
|
+
type: "text",
|
|
2528
|
+
text: JSON.stringify({
|
|
2529
|
+
introId: result.introId,
|
|
2530
|
+
status: result.status,
|
|
2531
|
+
targetAgent: result.targetAgentId,
|
|
2532
|
+
note: 'Intro request sent via Intent Network. The other agent\'s human will see this in their digest.',
|
|
2533
|
+
}, null, 2),
|
|
2534
|
+
}],
|
|
2535
|
+
};
|
|
2536
|
+
}
|
|
2537
|
+
catch (e) {
|
|
2538
|
+
return { content: [{ type: "text", text: `Intro request failed: ${e.message}` }], isError: true };
|
|
2539
|
+
}
|
|
2540
|
+
});
|
|
2541
|
+
server.tool("respond_to_intro", "Respond to an introduction request. Approve to share your disclosed information, or decline.", {
|
|
2542
|
+
intro_id: z.string().describe("Intro request ID"),
|
|
2543
|
+
approved: z.boolean().describe("Whether to approve the introduction"),
|
|
2544
|
+
message: z.string().optional().describe("Optional response message"),
|
|
2545
|
+
disclose_fields: z.array(z.string()).optional().describe("Fields you're willing to share back"),
|
|
2546
|
+
}, async (args) => {
|
|
2547
|
+
const keyErr = requireKey();
|
|
2548
|
+
if (keyErr)
|
|
2549
|
+
return { content: [{ type: "text", text: keyErr }], isError: true };
|
|
2550
|
+
try {
|
|
2551
|
+
const result = await intentApiFetch(`/api/intros/${args.intro_id}`, {
|
|
2552
|
+
method: 'PUT',
|
|
2553
|
+
body: JSON.stringify({
|
|
2554
|
+
verdict: args.approved ? 'approve' : 'decline',
|
|
2555
|
+
message: args.message,
|
|
2556
|
+
disclosedFields: args.disclose_fields ? Object.fromEntries(args.disclose_fields.map(f => [f, 'disclosed'])) : undefined,
|
|
2557
|
+
agentId: state.agentId,
|
|
2558
|
+
publicKey: state.agentKey,
|
|
2559
|
+
signature: state.privateKey ? sign(args.intro_id + (args.approved ? 'approve' : 'decline'), state.privateKey) : '',
|
|
2560
|
+
}),
|
|
2561
|
+
});
|
|
2562
|
+
if (result.error) {
|
|
2563
|
+
return { content: [{ type: "text", text: `Intro response failed: ${result.error}` }], isError: true };
|
|
2564
|
+
}
|
|
2565
|
+
return {
|
|
2566
|
+
content: [{
|
|
2567
|
+
type: "text",
|
|
2568
|
+
text: JSON.stringify({
|
|
2569
|
+
introId: result.introId,
|
|
2570
|
+
status: result.status,
|
|
2571
|
+
approved: args.approved,
|
|
2572
|
+
note: args.approved
|
|
2573
|
+
? 'Introduction approved. Both parties can now see disclosed information.'
|
|
2574
|
+
: 'Introduction declined.',
|
|
2575
|
+
}, null, 2),
|
|
2576
|
+
}],
|
|
2577
|
+
};
|
|
2578
|
+
}
|
|
2579
|
+
catch (e) {
|
|
2580
|
+
return { content: [{ type: "text", text: `Intro response failed: ${e.message}` }], isError: true };
|
|
2581
|
+
}
|
|
2582
|
+
});
|
|
2583
|
+
server.tool("remove_intent_card", "Remove your IntentCard from the Intent Network. Use when your needs or offers have changed.", {
|
|
2584
|
+
card_id: z.string().describe("Card ID to remove"),
|
|
2585
|
+
}, async (args) => {
|
|
2586
|
+
const keyErr = requireKey();
|
|
2587
|
+
if (keyErr)
|
|
2588
|
+
return { content: [{ type: "text", text: keyErr }], isError: true };
|
|
2589
|
+
try {
|
|
2590
|
+
const result = await intentApiFetch(`/api/cards/${args.card_id}`, {
|
|
2591
|
+
method: 'DELETE',
|
|
2592
|
+
body: JSON.stringify({
|
|
2593
|
+
agentId: state.agentId,
|
|
2594
|
+
publicKey: state.agentKey,
|
|
2595
|
+
signature: state.privateKey ? sign(args.card_id, state.privateKey) : '',
|
|
2596
|
+
}),
|
|
2597
|
+
});
|
|
2598
|
+
return {
|
|
2599
|
+
content: [{
|
|
2600
|
+
type: "text",
|
|
2601
|
+
text: JSON.stringify({
|
|
2602
|
+
removed: result.removed || false,
|
|
2603
|
+
cardId: args.card_id,
|
|
2604
|
+
error: result.error,
|
|
2605
|
+
}, null, 2),
|
|
2606
|
+
}],
|
|
2607
|
+
};
|
|
2608
|
+
}
|
|
2609
|
+
catch (e) {
|
|
2610
|
+
return { content: [{ type: "text", text: `API error: ${e.message}` }], isError: true };
|
|
2611
|
+
}
|
|
2612
|
+
});
|
|
2613
|
+
// ═══════════════════════════════════════
|
|
2327
2614
|
// MCP Prompts — Role-Specific
|
|
2328
2615
|
// ═══════════════════════════════════════
|
|
2329
2616
|
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.
|
|
3
|
+
"version": "2.8.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",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"homepage": "https://github.com/aeoess/agent-passport-mcp",
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@modelcontextprotocol/sdk": "^1.12.0",
|
|
50
|
-
"agent-passport-system": "file:../agent-passport-system/agent-passport-system-1.
|
|
50
|
+
"agent-passport-system": "file:../agent-passport-system/agent-passport-system-1.13.0.tgz",
|
|
51
51
|
"zod": "^3.25.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|