{"_id":"@agentlair/mcp-server","name":"@agentlair/mcp-server","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@agentlair/mcp-server","version":"0.1.0","description":"MCP server for AgentLair — exposes agent trust verification, PoPA streaks, and audit lookup as native tools for Claude desktop, Cursor, Cline, and any MCP client.","type":"module","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","bin":{"agentlair-mcp-server":"dist/cli.js"},"exports":{".":{"import":"./dist/index.js","types":"./dist/index.d.ts"}},"scripts":{"build":"tsc && chmod +x dist/cli.js","check":"tsc --noEmit","test":"bun test","start":"node dist/cli.js","prepublishOnly":"tsc && chmod +x dist/cli.js"},"keywords":["agentlair","agent-trust","mcp","model-context-protocol","claude-desktop","cursor","cline","smithery","popa","trust-verification","agent-identity","did","x402"],"author":{"name":"AgentLair","url":"piiiico"},"license":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/piiiico/agentlair-primitives.git","directory":"packages/mcp-server"},"homepage":"https://agentlair.dev/specs/mcp-server","bugs":{"url":"https://github.com/piiiico/agentlair-primitives/issues"},"engines":{"node":">=18.0.0"},"dependencies":{"@modelcontextprotocol/sdk":"^1.29.0","zod":"^3.25.0"},"devDependencies":{"@types/node":"^22.0.0","typescript":"^5.9.3"},"_id":"@agentlair/mcp-server@0.1.0","_nodeVersion":"22.22.2","_npmVersion":"10.9.7","dist":{"integrity":"sha512-35wousm8G59t6Stx9ypi2mmQyEDlWchunEWg9+N8z8y6PkB5yhDOy4zzFpzhE62BYxkSl7XDZi3U004weSVZGA==","shasum":"a39bc20c642dab8dd817668ff8dec243291775a8","tarball":"https://registry.npmjs.org/@agentlair/mcp-server/-/mcp-server-0.1.0.tgz","fileCount":13,"unpackedSize":38159,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCFrRxpUjWjMZMcJ+NKTvdGPYgp1b3v0lG3LbzFjF14pQIgKjibvh+M0MP0DJARUIgqNKeCEMQLdUlJEb4arBPQsZ0="}]},"_npmUser":{"name":"piiiico","email":"pico@amdal.dev"},"directories":{},"maintainers":[{"name":"piiiico","email":"pico@amdal.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp-server_0.1.0_1777909143889_0.01800991606799074"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-04T15:39:03.788Z","0.1.0":"2026-05-04T15:39:04.077Z","modified":"2026-05-04T15:39:04.314Z"},"maintainers":[{"name":"piiiico","email":"pico@amdal.dev"}],"description":"MCP server for AgentLair — exposes agent trust verification, PoPA streaks, and audit lookup as native tools for Claude desktop, Cursor, Cline, and any MCP client.","homepage":"https://agentlair.dev/specs/mcp-server","keywords":["agentlair","agent-trust","mcp","model-context-protocol","claude-desktop","cursor","cline","smithery","popa","trust-verification","agent-identity","did","x402"],"repository":{"type":"git","url":"git+https://github.com/piiiico/agentlair-primitives.git","directory":"packages/mcp-server"},"author":{"name":"AgentLair","url":"piiiico"},"bugs":{"url":"https://github.com/piiiico/agentlair-primitives/issues"},"license":"Apache-2.0","readme":"# @agentlair/mcp-server\n\nMCP server for AgentLair. Lets any LLM client — Claude desktop, Cursor, Cline, Smithery — verify other agents, check PoPA streaks, and audit tokens through native tool calls.\n\nFive tools, one stdio binary, zero registration required.\n\n## What this is\n\nAgentLair publishes trust verification as HTTP endpoints. This wraps them as Model Context Protocol tools so the LLM doing the verifying can call them directly. No glue code. No API client to write.\n\nThe agent verifies the agent.\n\n## Install\n\nIn your `claude_desktop_config.json` (Claude desktop) or equivalent client config:\n\n```json\n{\n  \"mcpServers\": {\n    \"agentlair\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@agentlair/mcp-server\"]\n    }\n  }\n}\n```\n\nRestart your client. Five new tools show up: `verify_agent`, `check_trust_gate`, `get_popa`, `get_popa_leaderboard`, `lookup_audit_token`.\n\n### With an AAT (skips x402 payment)\n\n```json\n{\n  \"mcpServers\": {\n    \"agentlair\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@agentlair/mcp-server\"],\n      \"env\": {\n        \"AGENTLAIR_AAT\": \"your-agent-authentication-token\"\n      }\n    }\n  }\n}\n```\n\nGet an AAT at [agentlair.dev](https://agentlair.dev). Without one, paid endpoints (`verify_agent`, `check_trust_gate`) return the 402 payment requirements as structured output instead of failing — your agent can decide what to do.\n\n### Cursor / Cline / Smithery\n\nSame pattern. Set the command to `npx -y @agentlair/mcp-server`. Smithery picks up `smithery.yaml` automatically.\n\n## The tools\n\n### `verify_agent({ agent_id })`\n\nFull behavioral trust profile. Score 0–100, ATF level (intern → junior → senior → principal), per-dimension breakdown (consistency, restraint, transparency).\n\nUse before delegating, paying, or extending capability. The score is computed from the agent's audit trail — behavior, not declarations.\n\n```\n> verify_agent agent_id=\"acc_qgdxSULsXsmtHklZ\"\nAgent acc_qgdxSULsXsmtHklZ: trust score 78.4/100, ATF level junior (confidence 0.82), 142 observations.\n```\n\nx402-gated 0.01 USDC. Free with `AGENTLAIR_AAT`.\n\n### `check_trust_gate({ agent_id, min_level? })`\n\nFast-path enforcement. Does this agent meet a minimum ATF level? Cheaper than the full profile.\n\n```\n> check_trust_gate agent_id=\"acc_x\" min_level=\"senior\"\nFAIL — acc_x at junior (required: senior, score 78.4).\n```\n\nSame pricing as `verify_agent`.\n\n### `get_popa({ did })`\n\nProof of Persistent Activity. Daily attestation streak for any DID. Returns: streak days, longest streak, total attestations, last attestation timestamp, gap count, genesis date, latest SCITT entry.\n\n```\n> get_popa did=\"did:web:agentlair.dev\"\ndid:web:agentlair.dev: 1d streak (longest 1d), 1 total attestations, fresh. Latest SCITT entry: scitt:popa_5nJkiDL8Mu9Ph2Zy.\n```\n\nPublic. No auth required.\n\n### `get_popa_leaderboard({ limit? })`\n\nTop agents by attestation count.\n\n```\n> get_popa_leaderboard limit=5\nPoPA leaderboard (2 rows, sorted by attestations):\n  1. did:web:agentlair.dev — 1 attestation, last seen 2026-05-04T00:00:52.458Z\n  2. did:web:agentlair.dev:agents:acc_qgdxSULsXsmtHklZ — 1 attestation, last seen 2026-05-04T00:00:54.414Z\n```\n\nPublic.\n\n### `lookup_audit_token({ jti })`\n\nPer-token metadata for an AgentLair Agent Authentication Token. Status: active | expired | revoked. Useful for verifying a token presented by another agent.\n\n```\n> lookup_audit_token jti=\"aat_1234567890abcdef\"\nToken aat_1234567890abcdef: issued 2026-05-04T00:00:00Z, expires 2026-05-04T01:00:00Z, status=active.\n```\n\nx402-gated 0.001 USDC. Anonymous-only — payment IS authentication for token introspection.\n\n## Configuration\n\n| Env var | Default | Effect |\n|---------|---------|--------|\n| `AGENTLAIR_AAT` | unset | Bearer token. Skips x402 payment for `verify_agent` and `check_trust_gate`. |\n| `AGENTLAIR_BASE_URL` | `https://api.agentlair.dev` | Override API base URL — useful for local AgentLair worker dev. |\n\n## How 402 surfaces in clients\n\nWithout `AGENTLAIR_AAT`, paid endpoints return a structured 402 response, not an error string:\n\n```\nPayment required: 10000 of asset 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 on eip155:8453 → 0x90EE1EbcCFA2021711C595E1410e22401570B4AC.\n\nResource: https://agentlair.dev/v1/trust\nDescription: AgentLair trust score query — 0.01 USDC per lookup.\n\nTo skip payment, set AGENTLAIR_AAT (Agent Authentication Token) and restart the MCP server. To pay, use an x402-capable client and re-call this tool.\n```\n\nPlus the raw `accepts[]` block as JSON. The LLM can show the human, ask a wallet for permission, or fall back to free PoPA tools.\n\n## Programmatic use\n\n```ts\nimport { buildServer, runStdio } from '@agentlair/mcp-server';\n\n// Mount on a custom transport\nconst server = buildServer();\nawait server.connect(myTransport);\n\n// Or just run stdio\nawait runStdio();\n```\n\n## Reference\n\n- AgentLair: [agentlair.dev](https://agentlair.dev)\n- Spec: [agentlair.dev/specs/mcp-server](https://agentlair.dev/specs/mcp-server)\n- Source: [github.com/piiiico/agentlair-primitives](https://github.com/piiiico/agentlair-primitives)\n- Related: [`@agentlair/popa`](https://www.npmjs.com/package/@agentlair/popa), [`@agentlair/scitt`](https://www.npmjs.com/package/@agentlair/scitt)\n\n## License\n\nApache-2.0\n","readmeFilename":"README.md","_rev":"1-5af7403dcbd2328abe9ddf1aa00d004c"}