{
  "markdown": "# albyhub-admin-mcp\n\n**Node-admin operations on your Alby Hub, exposed to an LLM agent.** MCP server that wraps the Alby Hub HTTP API — read node info, balances, channels, NWC sub-wallets. Where NWC ([`nwc-mcp`](https://npmjs.com/package/nwc-mcp)) ends (it's wallet-scoped), this server picks up: hub-wide on-chain balance, channel state, sub-wallet inventory.\n\n> **v0.1 — defensive design.** Alby Hub's admin API has evolved across versions and isn't publicly versioned in a stable way. So v0.1 ships **one generic proxy tool** that hits any path (the escape hatch) plus typed wrappers around a few well-established endpoints. If a typed wrapper's endpoint-guess fails against your Hub version, the proxy lets you discover the right path without re-shipping. v0.2 hardens the typed wrappers once smoke-tested against real Hubs.\n\n---\n\n## The six tools\n\n| Tool | Method | Path | Purpose |\n|---|---|---|---|\n| `albyhub_proxy_request` | * | * | Generic HTTP proxy — escape hatch for any endpoint not yet wrapped. |\n| `albyhub_confirm_request` | * | * | Two-step confirm dispatcher for proxy_request. |\n| `albyhub_get_node_info` | GET | `/api/info` | Node identity, network, version. |\n| `albyhub_get_balances` | GET | `/api/balances` | On-chain + Lightning aggregate balances. |\n| `albyhub_list_apps` | GET | `/api/apps` | NWC connections (sub-wallets) provisioned on this hub. |\n| `albyhub_list_channels` | GET | `/api/channels` | Lightning channels with status + capacities. |\n\nAll typed wrappers are safe GETs. Non-GET behavior runs through `albyhub_proxy_request`, which is gated by `ALBYHUB_READ_ONLY` and `ALBYHUB_REQUIRE_CONFIRM`.\n\n---\n\n## Requirements\n\n- Node 20+\n- A running Alby Hub instance (desktop app on `http://localhost:8080`, or self-hosted exposed somewhere)\n- An Alby Hub API token (Settings → Developer / Apps in the Hub UI)\n\n## Install\n\n```bash\nnpx -y albyhub-admin-mcp\n```\n\n## Configure\n\n```bash\ncp .env.example .env\n# edit .env: set ALBYHUB_URL (default http://localhost:8080) + ALBYHUB_TOKEN\n```\n\n### Required\n\n| Var | Purpose |\n|---|---|\n| `ALBYHUB_URL` | Base URL of your Hub. Default `http://localhost:8080`. Use HTTPS if exposed remotely. |\n| `ALBYHUB_TOKEN` | API access token. **Full-scope tokens can drain the hub's on-chain balance — scope down or use ALBYHUB_READ_ONLY=true if your audience matters.** |\n\n### Optional safety knobs\n\n| Var | Default | Purpose |\n|---|---|---|\n| `ALBYHUB_READ_ONLY` | `false` | Refuse all non-GET requests via `proxy_request`. Strongly recommended for first-time setup. |\n| `ALBYHUB_REQUIRE_CONFIRM` | `false` | Two-step confirm for non-GET requests. |\n| `ALBYHUB_MAX_REQUESTS_PER_MINUTE` | `30` | Rolling 60s rate limit. |\n| `ALBYHUB_LOG_PATH` | `./albyhub-admin-mcp.log` | Server log. |\n| `ALBYHUB_AUDIT_PATH` | `./albyhub-admin-mcp-audit.log` | Append-only JSON-line audit log. |\n\n---\n\n## What if my Hub returns 404 on the typed wrappers?\n\nThe endpoint path probably differs in your Hub version. Use `albyhub_proxy_request` to probe — try `/api/node`, `/info`, `/api/v1/info`, etc. Once you find the right path, you can pin it in your usage (and ping the maintainer to fix the typed wrapper in v0.2).\n\n```\nagent: albyhub_proxy_request({ method: \"GET\", path: \"/api/v1/info\" })\n→ { status: 200, body: { ... } }   // found it\n```\n\n---\n\n## Safety model\n\nThe proxy tool's pipeline:\n\n1. **`ALBYHUB_READ_ONLY` gate** — non-GET requests blocked outright.\n2. **Rate limit** — rolling 60s window on the `requests` bucket.\n3. **`ALBYHUB_REQUIRE_CONFIRM` gate** — non-GET requests return a token; `albyhub_confirm_request` executes.\n4. **HTTP request** — Bearer auth, 15s timeout (override via `timeout_ms`).\n5. **Audit log** — every attempt (ok / blocked / error) as one structured JSON line.\n\nGET-only convenience wrappers skip steps 1 + 3 (they're safe by construction) but still go through rate limit + audit.\n\n---\n\n## Companion servers\n\n- [`nwc-mcp`](https://npmjs.com/package/nwc-mcp) — wallet ops via NIP-47. Use this for per-sub-wallet spend; use `albyhub-admin-mcp` for hub-wide / node-level operations.\n- [`nostr-ops-mcp`](https://npmjs.com/package/nostr-ops-mcp) — NOSTR identity + publishing.\n- [`marketplace-mcp`](https://npmjs.com/package/marketplace-mcp) — NIP-15 marketplace storefront.\n\n---\n\n## License\n\nMIT — see [`LICENSE`](./LICENSE).\n\n## Contact / Issues\n\nBuilt by **LLMOps.Pro**.\n\n- **NOSTR:** [`npub1hdg932jvwc3jdvkqywgqv0ue4nn60exrf92asy8mtazt3hjg7d2s2yw0nw`](https://njump.me/npub1hdg932jvwc3jdvkqywgqv0ue4nn60exrf92asy8mtazt3hjg7d2s2yw0nw) — follow, DM, zap.\n- **Lightning Address:** `sovereigncitizens@getalby.com` — for support zaps and \"this was useful\" tips.\n- **Bug reports / feature requests:** open a GitHub issue (link forthcoming).\n- **Security issues:** please disclose privately via NOSTR DM before opening a public issue.\n",
  "bytes": 4811,
  "sha": "065c5c8c58f7094d9c8d3ca63f4ca6fc460367e93849de7ab3aced229fbf5ac1",
  "repo_slug": "llmops-pro/albyhub-admin-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_llmops_pro_albyhub_admin_mcp_db6da712/readme"
}