{"_id":"@aroha-sdk/mcp-server","name":"@aroha-sdk/mcp-server","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@aroha-sdk/mcp-server","version":"1.0.0","description":"MCP server for Aroha Hub — lets Claude and any MCP agent discover and call Aroha vendor agents","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"import":"./dist/index.js","types":"./dist/index.d.ts"}},"bin":{"aroha-mcp-server":"dist/index.js"},"scripts":{"build":"tsc","dev":"tsc --watch"},"dependencies":{"@aroha-sdk/core":"*","@aroha-sdk/registry":"*","@modelcontextprotocol/sdk":"^1.10.2"},"devDependencies":{"typescript":"^5.8.3"},"engines":{"node":">=22.0.0"},"keywords":["aroha","mcp","agent","ai"],"license":"MIT","gitHead":"8fc993e7202bf4856883d3f7bd8daf1ae8e73c8a","_id":"@aroha-sdk/mcp-server@1.0.0","_nodeVersion":"24.18.0","_npmVersion":"11.16.0","dist":{"integrity":"sha512-t1bPShscNvJZrX4zWGNB97Se5P+ZVALMLC1yYrhnoXZbjxjCA4ofAhcKSQrVM/YwstCm4VNrG1hVRaa7F8RFbA==","shasum":"857ee88b1ea09bbf29615eab819cc4775b65e467","tarball":"https://registry.npmjs.org/@aroha-sdk/mcp-server/-/mcp-server-1.0.0.tgz","fileCount":4,"unpackedSize":26897,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGX+trgL8F0armr69rSmGo5FTE8Cim7ah6WQLEla2ykNAiBims8aOZDWtNQhQ/PVa02MLE005nE3lNDPCXNdhu6YtA=="}]},"_npmUser":{"name":"aroha-labs","email":"projectmed99@gmail.com"},"directories":{},"maintainers":[{"name":"aroha-labs","email":"projectmed99@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp-server_1.0.0_1786619420282_0.956194345132314"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-13T11:10:20.056Z","1.0.0":"2026-08-13T11:10:20.446Z","modified":"2026-08-13T11:10:20.734Z"},"maintainers":[{"name":"aroha-labs","email":"projectmed99@gmail.com"}],"description":"MCP server for Aroha Hub — lets Claude and any MCP agent discover and call Aroha vendor agents","keywords":["aroha","mcp","agent","ai"],"license":"MIT","readme":"# @aroha-sdk/mcp-server\n\nMCP stdio server that exposes the Aroha Hub to Claude Desktop and any other MCP-compatible personal agent. Once configured, Claude can search the Hub for registered vendor agents, issue task and spending mandates, call those agents directly, and retrieve the full audit receipt — all through natural conversation, without any corporate agreement or bespoke integration.\n\n---\n\n## Installation — Claude Desktop\n\nAdd the following block to your `claude_desktop_config.json` (on macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"aroha\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@aroha-sdk/mcp-server\"],\n      \"env\": {\n        \"AROHA_API_KEY\": \"sk-aroha-...\"\n      }\n    }\n  }\n}\n```\n\nRestart Claude Desktop. The five `aroha_*` tools will appear in the tool list automatically.\n\n**Optional environment variables**\n\n| Variable | Default | Purpose |\n|---|---|---|\n| `AROHA_API_KEY` | `\"\"` | Bearer token for authenticated Hub calls |\n| `AROHA_REGISTRY_URL` | `https://aroha-registry.aroha-labs.workers.dev` | Override the Hub registry endpoint |\n\n---\n\n## Tools\n\n### `aroha_discover`\nSearch the Aroha Hub registry for agents by capability ID or free-text query. Returns up to 10 matching agents with their DIDs, names, capabilities, reputation scores, and endpoints.\n\n```\naroha_discover(capability?: string, query?: string)\n```\n\n### `aroha_call`\nCall a vendor agent. Automatically packages a spending mandate intent in the request so the agent knows its authorised budget. Returns a `receiptId` for later audit retrieval.\n\n```\naroha_call(agentDid, capability, params, spendLimitUsd?, purpose?, taskDescription?)\n```\n\n### `aroha_issue_task_mandate`\nIssue a fine-grained task mandate specifying exactly which capabilities the agent may invoke, how many times, whether they must be reversible, and which require a human gate before execution.\n\n```\naroha_issue_task_mandate(agentDid, allowed[], blocked[]?, actionLimits?, reversibleOnly?, humanGates[]?, maxLlmTokens?, maxWebRequests?, ttlMinutes?)\n```\n\n### `aroha_issue_spending_mandate`\nIssue a monetary spending mandate capping the agent at a specified USD amount for a single capability. Optionally restrict to a list of approved merchant DIDs.\n\n```\naroha_issue_spending_mandate(agentDid, capability, spendLimitUsd, allowedMerchants[]?, ttlMinutes?)\n```\n\n### `aroha_get_receipt`\nRetrieve the task receipt for a completed `aroha_call`. Shows the full audit trail: actions taken, resources consumed, mandate bounds check, and agent outputs.\n\n```\naroha_get_receipt(receiptId)\n```\n\n---\n\n## Worked example — Book a flight via Air NZ agent\n\n> **User:** Find an Air New Zealand agent that can book flights, then book me on the cheapest Auckland to Wellington flight tomorrow.\n\n**Step 1 — Claude calls `aroha_discover`**\n\n```json\n{ \"capability\": \"book-flight\", \"query\": \"Air New Zealand\" }\n```\n\nResult (truncated):\n```json\n[{\n  \"did\": \"did:aroha:airnz-booking-agent\",\n  \"name\": \"Air NZ Booking Agent\",\n  \"capabilities\": [\"book-flight\", \"check-flight-status\", \"cancel-booking\"],\n  \"reputation\": 4.9,\n  \"endpoint\": \"https://agents.airnz.co.nz/aroha\"\n}]\n```\n\n**Step 2 — Claude calls `aroha_issue_spending_mandate`**\n\n```json\n{\n  \"agentDid\": \"did:aroha:airnz-booking-agent\",\n  \"capability\": \"book-flight\",\n  \"spendLimitUsd\": 150,\n  \"ttlMinutes\": 10\n}\n```\n\nResult:\n```json\n{\n  \"mandateId\": \"spend-mandate-1749123456-abc123\",\n  \"summary\": \"Spending mandate: up to $150 USD for book-flight with did:aroha:airnz-booking-agent\",\n  \"validUntil\": \"2026-07-13T09:30:00.000Z\"\n}\n```\n\n**Step 3 — Claude calls `aroha_call`**\n\n```json\n{\n  \"agentDid\": \"did:aroha:airnz-booking-agent\",\n  \"capability\": \"book-flight\",\n  \"params\": {\n    \"origin\": \"AKL\",\n    \"destination\": \"WLG\",\n    \"date\": \"2026-07-14\",\n    \"cabin\": \"economy\",\n    \"passengers\": 1,\n    \"preferCheapest\": true\n  },\n  \"spendLimitUsd\": 150,\n  \"purpose\": \"Book cheapest AKL-WLG flight for user\"\n}\n```\n\nResult:\n```json\n{\n  \"success\": true,\n  \"result\": {\n    \"bookingRef\": \"NZ-X9K3M\",\n    \"flight\": \"NZ409\",\n    \"departure\": \"07:00\",\n    \"arrival\": \"08:05\",\n    \"fareUsd\": 89.00,\n    \"confirmationEmail\": \"sent\"\n  },\n  \"receiptId\": \"rcpt-aroha-mcp-1749123456-xyz789\",\n  \"durationMs\": 1243\n}\n```\n\n**Step 4 — Retrieve audit receipt**\n\n```json\n{ \"receiptId\": \"rcpt-aroha-mcp-1749123456-xyz789\" }\n```\n\nThe receipt confirms the agent stayed within the $150 mandate, made 1 web request, and produced a confirmed booking reference.\n\n---\n\n## License\n\nMIT — Copyright (c) 2026 Aroha Labs\n","readmeFilename":"README.md","_rev":"1-4d09f9efda87d880111a37bac7f85baa"}