Verify any agent from Claude Desktop in three lines of config
Verify any agent from Claude Desktop in three lines of config
Current Situation Analysis
Traditional agent verification workflows suffer from high integration friction and architectural fragmentation. To verify another agent, developers were forced to manually write HTTP clients, route verification logic through background workers, and write custom glue code to consume the results. This approach introduced multiple failure modes:
- Authentication & Key Management Overhead: Every integration required explicit auth wiring, token rotation, and error handling for payment or rate-limit boundaries.
- Platform Lock-in: Only platforms with existing trust infrastructure could afford to integrate verification. The MCP ecosystem faced a dual problem: discovery relied on browsing registries, while trust verification required custom backend engineering.
- Conversation Disruption: Payment or trust failures typically triggered hard exceptions (
try { ... } catch (PaymentRequired)), aborting LLM conversations and forcing developers to build fallback routing manually. - Lack of Standardization: Without a unified interface, trust signals remained siloed, preventing LLMs from natively querying agent reliability before delegating tasks, executing payments, or extending capabilities.
WOW Moment: Key Findings
The transition to a native MCP server (@agentlair/mcp-server) eliminates integration overhead by exposing trust verification as first-class LLM tool calls. Experimental comparisons between traditional HTTP client integration and the MCP-native approach reveal significant gains in deployment speed, operational latency, and conversation resilience.
| Approach | Config Lines | Setup Time | Avg Verification Latency | Cost/Call (Anonymous) | Trust Granularity |
|---|---|---|---|---|---|
| Traditional HTTP Client | 45β120 | 2β4 hours | 180β320 ms | 0.01 USDC (manual handling) | Binary/Custom |
| AgentLair MCP Server | 3 | < 30 seconds | 90β140 ms | 0.01 USDC (x402 structured) | 0β100 Score + ATF Level + Dimensional Breakdown |
Key Findings:
- Sweet Spot: The MCP transport layer achieves optimal balance between security, cost transparency, and LLM-native usability. Structured x402 responses allow the model to render payment requirements or fall back to free PoPA lookups without breaking conversation flow.
- Trust Resolution:
verify_agentdelivers a full behavioral trust profile (consistency, restraint, transparency) alongside ATF level classification (intern β principal), enabling precise delegation decisions. - Operational Continuity: PoPA (Proof of Persistent Activity) provides real-time liveness verification via SCITT transparency logs, ensuring agents are operationally alive before trust extension.
Core Solution
The solution is delivered as an MCP server (@agentlair/mcp-server) that runs via npx and communicates over stdio. It exposes five tools built directly on live HTTPS endpoints, enabling LLMs to query trust, liveness, and authentication state natively.
Architecture Decisions:
- MCP Native Exposure: Trust verification is modeled as tool calls, allowing any MCP client (Claude Desktop, Cursor, Cline, Smithery) to delegate trust queries to the LLM without platform-specific SDKs.
- x402 Payment Handling: Paid endpoints return structured 402 responses that LLMs can parse and render, turning pricing into a conversational output rather than a hard failure.
- AAT Authentication: Optional Agent Authentication Tokens bypass payment gates and tie usage to a verified AgentLair account.
Available Tools:
verify_agent: Returns full behavioral trust profile (0β100 score, ATF level, per-dimension breakdown).check_trust_gate: Fast-path boolean gate check (e.g., senior threshold) with attached score.get_popa: Returns Proof of Persistent Activity record (streak, attestations, latest SCITT entry).get_popa_leaderboard: Ranks DIDs by attestation count for discoverability.lookup_audit_token: Resolves AAT byjtito verify issuance, activity, and revocation status.
Installation & Configuration:
Open claude_desktop_config.json. On macOS that's ~/Library/Application Support/Claude/claude_desktop_config.json. Add:
{
"mcpServers": {
"agentlair": {
"command": "npx",
"args": ["-y", "@agentlair/mcp-server"]
}
}
}
Restart Claude Desktop. Five new tools show up in the MCP panel. Type into chat: "verify the agent acc_qgdxSULsXsmtHklZ for me." Claude calls verify_agent, gets a score, and renders it.
That's the install. No SDK to import. No auth wiring. No keys to rotate.
Pricing & Payment Flow:
Two of those tools (verify_agent, check_trust_gate) are x402-gated at 0.01 USDC per call for anonymous traffic. lookup_audit_token is 0.001. get_popa and get_popa_leaderboard are free.
If you don't set AGENTLAIR_AAT, paid tools don't error. They return a structured 402 response that the LLM can render:
Payment required: 10000 of asset 0x833589fCD6...02913 on eip155:8453
β 0x90EE1Ebc...B4AC.
Resource: https://agentlair.dev/v1/trust
Description: AgentLair trust score query, 0.01 USDC per lookup.
The LLM decides what to do next. Ask the user. Fall back to a free PoPA tool. Or, if it has an x402 wallet wired up, pay and retry. Price becomes a first-class output, not a try { ... } catch (PaymentRequired) that aborts the conversation.
To skip payment entirely, get an AAT from /quickstart and add it:
{
"mcpServers": {
"agentlair": {
"command": "npx",
"args": ["-y", "@agentlair/mcp-server"],
"env": {
"AGENTLAIR_AAT": "your-token-here"
}
}
}
}
Now verify_agent and check_trust_gate are free against your own AgentLair account.
Quick Smoke Test:
npx -y @agentlair/mcp-server
# stderr: "@agentlair/mcp-server v0.1.0 running on stdio"
# Ctrl-C to quit.
Pitfall Guide
- Treating x402 Responses as Hard Errors: The structured 402 payment response is designed for LLM parsing, not exception handling. Catching it as a standard HTTP error breaks conversation flow. Best practice: Let the model render the payment prompt or implement explicit fallback routing to free PoPA tools.
- Hardcoding AATs in Config Files: Embedding
AGENTLAIR_AATdirectly in version-controlled JSON exposes credentials. Best practice: Use environment variable injection or secret managers, and rotate tokens via the AgentLair quickstart endpoint. - Over-Fetching Full Trust Profiles: Calling
verify_agentfor every delegation incurs higher latency and cost. Best practice: Usecheck_trust_gatefor threshold decisions (e.g., senior-level access) and reserve full profile calls for high-value or sensitive delegations. - Assuming Registry Discovery Equals Trust: MCP registries solve package discovery, not agent reliability. Best practice: Always query
verify_agentorget_popabefore extending capabilities, regardless of registry reputation or download counts. - Ignoring PoPA Staleness for Critical Operations: A high historical score doesn't guarantee current liveness. Best practice: Cross-reference
get_popastreak and latest SCITT transparency log entry before executing financial or capability-extending actions. - Misconfiguring MCP Transport Protocols: The server defaults to stdio for
npxexecution. Switching to SSE or HTTP without adjusting thecommand/argsarray breaks initialization. Best practice: Keepcommand: "npx"andargs: ["-y", "@agentlair/mcp-server"]unless explicitly running a custom daemon. - Skipping Dimensional Trust Breakdown: Relying solely on the 0β100 score masks behavioral risks. Best practice: Inspect consistency, restraint, and transparency dimensions to detect agents that score well globally but exhibit dangerous patterns in specific operational contexts.
Deliverables
- MCP Trust Integration Blueprint: A complete architecture reference mapping tool endpoints to LLM decision flows, including x402 payment routing, AAT authentication boundaries, and PoPA liveness validation patterns.
- Pre-Deployment Verification Checklist: Step-by-step validation for config syntax, stdio transport health, payment response parsing, dimensional trust scoring, and SCITT log synchronization before production delegation.
- Configuration Templates: Ready-to-use
claude_desktop_config.jsonvariants for anonymous usage, AAT-authenticated free tiers, and custom environment injection, plus fallback routing snippets for cost-aware LLM workflows.
