agentfolio_verify_operator
Verify an AI agent's operator identity using OATR attestation, returning off-chain operator status and on-chain SATP reputation to assess trustworthiness.
Instructions
Verify an agent's operator identity via OATR (Open Agent Trust Registry). Returns off-chain operator verification status alongside on-chain SATP reputation. Two-layer identity: who RUNS the agent (OATR) + how TRUSTED the agent is (SATP).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agent_id | Yes | Agent ID to check operator identity for | |
| token | No | OATR attestation token to verify (optional — if not provided, checks AgentFolio profile for linked OATR identity) |
Implementation Reference
- src/index.js:176-194 (schema)Input schema for agentfolio_verify_operator: requires agent_id (string), optional token (string) for OATR attestation verification.
{ name: "agentfolio_verify_operator", description: "Verify an agent's operator identity via OATR (Open Agent Trust Registry). Returns off-chain operator verification status alongside on-chain SATP reputation. Two-layer identity: who RUNS the agent (OATR) + how TRUSTED the agent is (SATP).", inputSchema: { type: "object", properties: { agent_id: { type: "string", description: "Agent ID to check operator identity for", }, token: { type: "string", description: "OATR attestation token to verify (optional — if not provided, checks AgentFolio profile for linked OATR identity)", }, }, required: ["agent_id"], }, }, - src/index.js:346-400 (handler)Handler for agentfolio_verify_operator: fetches profile from AgentFolio API, extracts SATP on-chain reputation (trust score, verifications), and performs OATR operator identity verification via optional attestation token or wallet cross-reference.
case "agentfolio_verify_operator": { const profile = await api(`/profile/${args.agent_id}`); const satpTrust = profile.trustScore ?? 0; const verifs = profile.verifications || {}; const verifsArr = Array.isArray(verifs) ? verifs : Object.keys(verifs).filter(k => verifs[k]); const satpOnChain = verifsArr.includes("solana") || !!verifs.solana; let oatrResult = null; if (oatrAvailable) { try { if (args.token && verifyAttestation) { // Verify a specific OATR attestation token oatrResult = await verifyAttestation(args.token); } else { // Check if agent has OATR-linked identity via wallet key const wallets = profile.wallets || {}; const solanaAddr = wallets.solana || wallets.sol; oatrResult = { checked: true, linked: false, note: solanaAddr ? `Agent has Solana wallet ${solanaAddr}. OATR operator lookup requires attestation token or DID.` : "No Solana wallet linked. Cannot cross-reference with OATR operator registry.", }; } } catch (err) { oatrResult = { checked: true, error: err.message }; } } else { oatrResult = { checked: false, note: "OATR integration not available. Install @open-agent-trust/registry for two-layer identity verification.", }; } return JSON.stringify({ agent_id: args.agent_id, name: profile.name, two_layer_identity: { layer1_oatr: { description: "Off-chain operator identity (who runs this agent)", ...oatrResult, }, layer2_satp: { description: "On-chain agent reputation (how trusted is this agent)", trust_score: satpTrust, on_chain: satpOnChain, verifications: verifsArr, }, }, combined_assessment: satpOnChain ? `Agent has on-chain SATP identity (trust: ${satpTrust}). ${oatrResult?.linked ? "OATR operator verified." : "OATR operator not yet linked."}` : `Agent registered but no on-chain identity yet. Trust score: ${satpTrust}.`, }, null, 2); } - src/index.js:14-28 (helper)OATR integration setup: dynamically imports @open-agent-trust/registry to provide verifyAttestation function. Sets oatrAvailable flag used by the verify_operator handler.
// ── OATR Integration (Open Agent Trust Registry) ───────────────────────────── // Two-layer identity: OATR (off-chain operator) + SATP (on-chain reputation) let oatrAvailable = false; let verifyAttestation, OpenAgentTrustRegistry; try { const oatr = await import("@open-agent-trust/registry"); verifyAttestation = oatr.verifyAttestation; OpenAgentTrustRegistry = oatr.OpenAgentTrustRegistry || oatr.default; if (verifyAttestation || OpenAgentTrustRegistry) { oatrAvailable = true; console.error("[agentfolio-mcp] OATR integration enabled"); } } catch { console.error("[agentfolio-mcp] OATR not available (optional dependency)"); } - src/index.js:31-50 (helper)HTTP helper used by the handler to fetch profile data from the AgentFolio API (https://agentfolio.bot/api).
async function api(path, opts = {}) { const url = `${API_BASE}${path}`; const res = await fetch(url, { headers: { "Content-Type": "application/json", ...opts.headers }, ...opts, }); if (!res.ok) { const body = await res.text().catch(() => ""); throw new Error(`AgentFolio API ${res.status}: ${body}`); } // Guard against HTML error pages returned with 200 const ct = res.headers.get("content-type") || ""; if (!ct.includes("application/json")) { const body = await res.text().catch(() => ""); if (body.includes("<!DOCTYPE") || body.includes("<html")) { throw new Error(`AgentFolio API returned HTML instead of JSON for ${path}`); } } return res.json(); } - src/index.js:437-440 (registration)Registration: tools are exposed via the MCP ListToolsRequestSchema handler, returning the TOOLS array which includes agentfolio_verify_operator at index [9].
// List tools server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS, }));