@carrierllc/mcp 0.2.16 → 0.2.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/README.md +21 -1
  2. package/dist/cli.js +1445 -0
  3. package/dist/cli.js.map +1 -0
  4. package/dist/index.js +1437 -252
  5. package/dist/index.js.map +1 -1
  6. package/package.json +23 -15
  7. package/plugin/.claude-plugin/marketplace.json +31 -0
  8. package/plugin/carrier/.claude-plugin/plugin.json +19 -0
  9. package/plugin/carrier/.mcp.json +8 -0
  10. package/plugin/carrier/README.md +75 -0
  11. package/plugin/carrier/agents/carrier-billing-auditor.md +16 -0
  12. package/plugin/carrier/agents/carrier-fleet-ops.md +15 -0
  13. package/plugin/carrier/agents/carrier-storefront-builder.md +17 -0
  14. package/plugin/carrier/commands/billing.md +23 -0
  15. package/plugin/carrier/commands/churn.md +15 -0
  16. package/plugin/carrier/commands/credits.md +15 -0
  17. package/plugin/carrier/commands/esim-status.md +15 -0
  18. package/plugin/carrier/commands/fleet.md +17 -0
  19. package/plugin/carrier/commands/greenzone.md +16 -0
  20. package/plugin/carrier/commands/onboard.md +17 -0
  21. package/plugin/carrier/commands/packages.md +18 -0
  22. package/plugin/carrier/commands/provision.md +30 -0
  23. package/plugin/carrier/commands/sms.md +18 -0
  24. package/plugin/carrier/commands/status.md +15 -0
  25. package/plugin/carrier/commands/storefront.md +21 -0
  26. package/plugin/carrier/commands/subscribers.md +18 -0
  27. package/plugin/carrier/commands/usage.md +16 -0
  28. package/plugin/carrier/commands/wallet.md +31 -0
  29. package/plugin/carrier/skills/carrier-operations/SKILL.md +43 -0
  30. package/templates/storefront/eslint.config.mjs +15 -0
  31. package/templates/storefront/next.config.ts +22 -0
  32. package/templates/storefront/open-next.config.ts +3 -0
  33. package/templates/storefront/package.json +38 -0
  34. package/templates/storefront/pnpm-lock.yaml +4020 -0
  35. package/templates/storefront/postcss.config.mjs +7 -0
  36. package/templates/storefront/src/app/activate/[orderId]/ActivateClient.tsx +125 -0
  37. package/templates/storefront/src/app/activate/[orderId]/page.tsx +32 -0
  38. package/templates/storefront/src/app/api/checkout/claim/route.ts +30 -0
  39. package/templates/storefront/src/app/api/checkout/guest/route.ts +91 -0
  40. package/templates/storefront/src/app/api/profile/phone/route.ts +40 -0
  41. package/templates/storefront/src/app/apple-icon.tsx +29 -0
  42. package/templates/storefront/src/app/checkout/[templateId]/CheckoutClient.tsx +110 -0
  43. package/templates/storefront/src/app/checkout/[templateId]/page.tsx +24 -0
  44. package/templates/storefront/src/app/checkout/success/CheckoutSuccessClient.tsx +415 -0
  45. package/templates/storefront/src/app/checkout/success/page.tsx +59 -0
  46. package/templates/storefront/src/app/contact/page.tsx +35 -0
  47. package/templates/storefront/src/app/dashboard/page.tsx +26 -0
  48. package/templates/storefront/src/app/globals.css +99 -0
  49. package/templates/storefront/src/app/help/page.tsx +25 -0
  50. package/templates/storefront/src/app/icon.tsx +29 -0
  51. package/templates/storefront/src/app/layout.tsx +56 -0
  52. package/templates/storefront/src/app/legal/acceptable-use/page.tsx +21 -0
  53. package/templates/storefront/src/app/legal/privacy/page.tsx +27 -0
  54. package/templates/storefront/src/app/legal/terms/page.tsx +25 -0
  55. package/templates/storefront/src/app/manifest.ts +18 -0
  56. package/templates/storefront/src/app/page.tsx +31 -0
  57. package/templates/storefront/src/app/robots.ts +9 -0
  58. package/templates/storefront/src/app/shop/ShopClient.tsx +27 -0
  59. package/templates/storefront/src/app/shop/page.tsx +9 -0
  60. package/templates/storefront/src/app/sign-in/[[...sign-in]]/page.tsx +24 -0
  61. package/templates/storefront/src/app/sign-up/[[...sign-up]]/StorefrontSignUpClient.tsx +199 -0
  62. package/templates/storefront/src/app/sign-up/[[...sign-up]]/page.tsx +28 -0
  63. package/templates/storefront/src/app/sitemap.ts +14 -0
  64. package/templates/storefront/src/brand.config.ts +28 -0
  65. package/templates/storefront/src/components/Providers.tsx +16 -0
  66. package/templates/storefront/src/components/faq/FaqSection.tsx +80 -0
  67. package/templates/storefront/src/components/footer/StorefrontFooter.tsx +61 -0
  68. package/templates/storefront/src/components/landing/HeroSection.tsx +52 -0
  69. package/templates/storefront/src/components/landing/PlanCard.tsx +61 -0
  70. package/templates/storefront/src/components/nav/StorefrontNav.tsx +69 -0
  71. package/templates/storefront/src/components/theme/clerk-appearance.ts +51 -0
  72. package/templates/storefront/src/components/theme/theme-provider.tsx +87 -0
  73. package/templates/storefront/src/components/theme/theme-script.tsx +24 -0
  74. package/templates/storefront/src/lib/checkout-order-claim.ts +127 -0
  75. package/templates/storefront/src/lib/complete-email-sign-up.ts +50 -0
  76. package/templates/storefront/src/lib/conversion-events.ts +36 -0
  77. package/templates/storefront/src/lib/sanitize-auth-redirect.ts +16 -0
  78. package/templates/storefront/src/lib/verify-checkout-session.ts +53 -0
  79. package/templates/storefront/src/middleware.ts +31 -0
  80. package/templates/storefront/src/vendor/carrier/client.ts +95 -0
  81. package/templates/storefront/src/vendor/carrier/index.ts +2 -0
  82. package/templates/storefront/src/vendor/carrier/types.ts +21 -0
  83. package/templates/storefront/src/vendor/config/index.ts +2 -0
  84. package/templates/storefront/src/vendor/geo/index.ts +32 -0
  85. package/templates/storefront/src/vendor/ui/brand.ts +68 -0
  86. package/templates/storefront/src/vendor/ui/cn.ts +7 -0
  87. package/templates/storefront/src/vendor/ui/countryImagery.ts +46 -0
  88. package/templates/storefront/src/vendor/ui/index.ts +3 -0
  89. package/templates/storefront/tsconfig.json +23 -0
  90. package/templates/storefront/wrangler.jsonc +11 -0
  91. package/dist/.metadata_never_index +0 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@carrierllc/mcp",
3
- "version": "0.2.16",
4
- "description": "Carrier MCP natural-language control of MVNO/eSIM fleets via eSIMVault OCS. Stdio mode for direct integration with Claude Desktop, Cursor, Windsurf, and MCP-compatible clients.",
3
+ "version": "0.2.18",
4
+ "description": "Carrier MCP \u2014 natural-language control of MVNO/eSIM fleets via eSIMVault OCS. Stdio mode for direct integration with Claude Desktop, Cursor, Windsurf, and MCP-compatible clients. Ships the `carrier` CLI (plugin install + white-label eSIM storefront scaffold).",
5
5
  "license": "MIT",
6
6
  "author": "Carrier (Lifecycle Innovations Limited)",
7
7
  "homepage": "https://mcp.carrier.llc",
@@ -13,32 +13,39 @@
13
13
  "main": "./dist/index.js",
14
14
  "files": [
15
15
  "dist",
16
+ "plugin",
17
+ "templates",
16
18
  "README.md"
17
19
  ],
18
20
  "scripts": {
19
21
  "build": "tsup",
20
22
  "type-check": "tsc --noEmit",
21
23
  "lint": "eslint src",
22
- "prepublishOnly": "pnpm run build"
24
+ "prepublishOnly": "pnpm run build",
25
+ "test": "pnpm run build && node --test test/*.test.js"
23
26
  },
24
27
  "dependencies": {
25
- "@clerk/backend": "^3.4.7",
26
- "@modelcontextprotocol/ext-apps": "^1.7.1",
28
+ "@clack/prompts": "^0.7.0",
29
+ "@clerk/backend": "^3.11.3",
30
+ "@modelcontextprotocol/ext-apps": "^1.7.4",
27
31
  "@modelcontextprotocol/sdk": "^1.29.0",
28
32
  "@noble/hashes": "^1.8.0",
29
- "@sentry/cloudflare": "^10.52.0",
33
+ "@sentry/cloudflare": "^10.65.0",
30
34
  "aws4fetch": "^1.0.20",
31
- "zod": "^4.0.0"
35
+ "commander": "^12.1.0",
36
+ "picocolors": "^1.1.1",
37
+ "zod": "^4.4.3"
32
38
  },
33
39
  "devDependencies": {
34
- "@carrier/ocs-spec": "workspace:*",
35
- "@cloudflare/workers-types": "^4",
36
- "@types/node": "^22",
37
- "@typescript-eslint/eslint-plugin": "^8.0.0",
38
- "@typescript-eslint/parser": "^8.0.0",
39
- "eslint": "^9",
40
+ "@cloudflare/workers-types": "^4.20260521.1",
41
+ "@types/node": "^22.19.19",
42
+ "@typescript-eslint/eslint-plugin": "^8.59.4",
43
+ "@typescript-eslint/parser": "^8.59.4",
44
+ "eslint": "^9.39.4",
40
45
  "tsup": "^8.5.1",
41
- "typescript": "^5.5.0"
46
+ "typescript": "^5.9.3",
47
+ "@carrier/ocs-client": "workspace:*",
48
+ "@carrier/ocs-spec": "workspace:*"
42
49
  },
43
50
  "keywords": [
44
51
  "mcp",
@@ -56,6 +63,7 @@
56
63
  "access": "public"
57
64
  },
58
65
  "bin": {
59
- "carrier-mcp": "./dist/index.js"
66
+ "carrier-mcp": "dist/index.js",
67
+ "carrier": "dist/cli.js"
60
68
  }
61
69
  }
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "carrier",
3
+ "owner": {
4
+ "name": "Lifecycle Innovations Limited",
5
+ "url": "https://carrier.llc"
6
+ },
7
+ "metadata": {
8
+ "description": "Carrier — natural-language MVNO/eSIM fleet control + white-label storefront for Claude Code.",
9
+ "version": "0.1.1"
10
+ },
11
+ "plugins": [
12
+ {
13
+ "name": "carrier",
14
+ "source": "./carrier",
15
+ "description": "Provision eSIMs, manage subscribers/packages/billing/usage/SMS/churn/fleet, and roll out a white-labeled storefront — all in natural language via the Carrier MCP.",
16
+ "version": "0.1.1",
17
+ "author": {
18
+ "name": "Lifecycle Innovations Limited",
19
+ "url": "https://carrier.llc"
20
+ },
21
+ "keywords": [
22
+ "carrier",
23
+ "esim",
24
+ "mvno",
25
+ "telecom",
26
+ "mcp",
27
+ "storefront"
28
+ ]
29
+ }
30
+ ]
31
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "carrier",
3
+ "version": "0.1.1",
4
+ "description": "Natural-language control of your MVNO/eSIM fleet — the Stripe of telecom. Provision eSIMs, manage subscribers, packages, billing, usage, SMS, churn, and fleet health, and roll out a white-labeled storefront. Wraps the Carrier MCP (113 tools over OAuth 2.1).",
5
+ "author": {
6
+ "name": "Lifecycle Innovations Limited",
7
+ "url": "https://carrier.llc"
8
+ },
9
+ "homepage": "https://carrier.llc",
10
+ "repository": "https://github.com/Lifecycle-Innovations-Limited/carrier.llc",
11
+ "license": "MIT",
12
+ "keywords": ["carrier", "esim", "mvno", "telecom", "mcp", "fleet", "billing", "storefront"],
13
+ "mcpServers": {
14
+ "carrier": {
15
+ "type": "http",
16
+ "url": "https://mcp.carrier.llc/mcp"
17
+ }
18
+ }
19
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "mcpServers": {
3
+ "carrier": {
4
+ "type": "http",
5
+ "url": "https://mcp.carrier.llc/mcp"
6
+ }
7
+ }
8
+ }
@@ -0,0 +1,75 @@
1
+ # Carrier — Claude Code plugin
2
+
3
+ Natural-language control of your MVNO/eSIM fleet, plus a white-labeled storefront — the Stripe of telecom, inside Claude Code.
4
+
5
+ ## Install (recommended)
6
+
7
+ ```bash
8
+ npx @carrierllc/mcp
9
+ # or, after global install:
10
+ carrier
11
+ carrier init
12
+ ```
13
+
14
+ The CLI opens a clear TUI: status (plugin / MCP / auth), sign-up & sign-in links, storefront scaffold, and “talk to fleet” examples.
15
+
16
+ ```bash
17
+ carrier plugin install
18
+ ```
19
+
20
+ ### Zero credentials · OAuth on first use (Entry A)
21
+
22
+ The MCP server is registered as a plain HTTPS URL — **no API token in config**:
23
+
24
+ ```text
25
+ https://mcp.carrier.llc/mcp
26
+ ```
27
+
28
+ When Claude first calls a Carrier tool, your browser opens Clerk sign-in / sign-up
29
+ (Google, GitHub, or email). Authorize once; tokens stay in the client.
30
+
31
+ Headless / CI only: create an org API key (`ak_…`) in the console
32
+ (https://app.carrier.llc → Settings → API Keys) and pass it as a Bearer token
33
+ or `CARRIER_API_KEY` for `carrier ask "…"`.
34
+
35
+ …or wire Claude Code manually:
36
+
37
+ ```bash
38
+ claude plugin marketplace add <path-to-bundled-plugin>
39
+ claude plugin install carrier@carrier
40
+ claude mcp add --transport http carrier https://mcp.carrier.llc/mcp
41
+ # stuck on auth?
42
+ claude mcp auth carrier
43
+ ```
44
+
45
+ ## Commands
46
+
47
+ | Command | Does |
48
+ |---|---|
49
+ | `/carrier:provision` | Provision eSIMs + assign a starter package |
50
+ | `/carrier:subscribers` | List / inspect / suspend / resume / terminate subscribers |
51
+ | `/carrier:packages` | Create, assign, optimize data packages |
52
+ | `/carrier:usage` | Usage, projections, depletion, anomalies |
53
+ | `/carrier:billing` | Balances, thresholds, Stripe Connect payouts |
54
+ | `/carrier:credits` | Platform credit, top-ups, credential health |
55
+ | `/carrier:wallet` | Managed prepaid wallet balance / bulk top-up / auto-top-up |
56
+ | `/carrier:sms` | Send an SMS to a subscriber |
57
+ | `/carrier:esim-status` | eSIM activation / SIM state / provider health |
58
+ | `/carrier:churn` | Churn risk + marketing intelligence |
59
+ | `/carrier:greenzone` | Fair-use whitelist + steering policy |
60
+ | `/carrier:fleet` | One-screen fleet health dashboard |
61
+ | `/carrier:status` | Fast control-plane + auth ping |
62
+ | `/carrier:storefront` | Scaffold / rebrand / deploy your storefront |
63
+ | `/carrier:onboard` | Zero-to-live: stand up a connectivity business |
64
+
65
+ ## Agents
66
+
67
+ - **carrier-fleet-ops** — autonomous provisioning + lifecycle + remediation
68
+ - **carrier-billing-auditor** — read-only revenue/cost audit, proposes adjustments
69
+ - **carrier-storefront-builder** — scaffold, white-label, deploy the storefront
70
+
71
+ ## Skill
72
+
73
+ - **carrier-operations** — the full MCP tool map + safety rules
74
+
75
+ All operations run through the Carrier MCP (`https://mcp.carrier.llc/mcp`, OAuth 2.1 + PKCE). Money- and service-affecting actions always confirm first.
@@ -0,0 +1,16 @@
1
+ ---
2
+ name: carrier-billing-auditor
3
+ description: Audits fleet billing, balances, cost outliers, and Stripe Connect payouts via the Carrier MCP. Read-only by default; proposes adjustments for approval. Use for revenue/cost reviews and reconciliation.
4
+ ---
5
+
6
+ You are a Carrier billing & revenue auditor working through the **Carrier MCP**.
7
+
8
+ Default to **read-only**. You investigate and recommend; you do not move money without explicit approval.
9
+
10
+ Audit playbook:
11
+ - **Revenue & events** — `billing_events`, `stripe_connect_status`, `stripe_connect_balance`, `stripe_connect_payouts`, `stripe_connect_dispute_list`.
12
+ - **Cost outliers** — `high_cost_subscribers`, `detect_usage_anomalies`, `subscriber_depletion_events`. Flag SIMs whose cost exceeds their plan price.
13
+ - **Balances & runway** — `credit_balance` (platform), `wallet_balance` (managed prepaid Atlas wallet), per-reseller `get_reseller_info`. Project when credit or wallet blocks provisioning. Do not conflate wallet with Connect payouts.
14
+ - **Leakage** — packages still billing on suspended subscribers, recurring packages that should have stopped (`list_subscriber_packages`, `stop_resume_recurring_package`).
15
+
16
+ Deliver a findings report: top cost drivers, anomalies, reconciliation gaps, and a prioritized list of corrective actions with the exact tool call for each. Only execute a `modify_*_balance` / billing change after the user approves that specific line.
@@ -0,0 +1,15 @@
1
+ ---
2
+ name: carrier-fleet-ops
3
+ description: Autonomous MVNO/eSIM fleet operator. Use for multi-step provisioning, subscriber lifecycle, package assignment, and fleet remediation via the Carrier MCP. Confirms money/service-affecting actions before executing.
4
+ ---
5
+
6
+ You are a Carrier fleet operations specialist. You manage a live MVNO/eSIM fleet through the **Carrier MCP** (HTTP, OAuth-gated). The MCP exposes 100+ tools across provisioning, subscribers, packages, usage, billing, intelligence, and fleet health.
7
+
8
+ Operating rules:
9
+ - **Read before write.** Establish current state (`get_subscriber`, `fleet_health`, `list_subscriber_packages`, `esim_status_per_account`) before any mutation.
10
+ - **Confirm anything that moves money or changes live service** — `modify_subscriber_status`, `change_sim_status`, balance/package mutations, `clean_all_packages`, `rotate_credentials`. State the exact target and effect, then act.
11
+ - **Right quantity only.** Never over-provision. Check `credit_balance` before batches.
12
+ - **Diagnose, don't guess.** When a SIM misbehaves, run `diagnose_subscriber` + `subscriber_network_events` and propose the specific fix.
13
+ - Surface activation QR / LPA strings for newly provisioned eSIMs.
14
+
15
+ Common flows: provision (`provision_esim_wizard` → `assign_package` → verify), lifecycle (`modify_subscriber_status`), package tuning (`optimize_package`, `modify_package_limits`), and remediation. Report concise before/after state. End with what's done and any human gate still open.
@@ -0,0 +1,17 @@
1
+ ---
2
+ name: carrier-storefront-builder
3
+ description: Scaffolds, white-labels, and deploys the customer-facing eSIM storefront (Mango template) via @carrierllc/cli, and keeps its plans in sync with the Carrier fleet. Use to launch or rebrand a storefront.
4
+ ---
5
+
6
+ You build and ship white-labeled eSIM storefronts on top of a Carrier fleet.
7
+
8
+ The storefront is a Next.js app (Mango-derived template) scaffolded by `@carrierllc/cli`. Its single white-label surface is `src/brand.config.ts` (name, tagline, colors, domain, support, social).
9
+
10
+ Workflow:
11
+ 1. **Scaffold** — `npx @carrierllc/cli site create <dir>` with the operator's brand (name, domain, accent hex, support email).
12
+ 2. **Brand** — verify `src/brand.config.ts` and `globals.css` reflect the brand; the default accent is Carrier Flame `#FF6B35` on dark `#080C16` — replace with the operator's palette. Check there are no leftover "Mango" strings.
13
+ 3. **Wire** — set `NEXT_PUBLIC_CARRIER_API_URL` in `.env.local`; ensure the plans shown match `pricing_plans` / `list_package_templates` from the fleet.
14
+ 4. **Build & deploy** — `npx @carrierllc/cli site deploy <dir>` → Cloudflare Pages (`wrangler login` first).
15
+ 5. **Verify** — load the live URL, confirm it renders, plans are correct, and checkout reaches the control plane.
16
+
17
+ Report the live URL, the brand applied, and any plan mismatch between the storefront and the fleet. Never deploy with placeholder/test Clerk or Stripe keys to a production domain — flag missing secrets instead.
@@ -0,0 +1,23 @@
1
+ ---
2
+ description: Billing, balances, thresholds, and Stripe Connect payouts
3
+ argument-hint: "[events|balance|topup|payouts|configure] [subscriber/account]"
4
+ ---
5
+
6
+ # Billing
7
+
8
+ Manage money movement across the fleet. Keep the three money domains distinct:
9
+
10
+ | Domain | Tools / command | Purpose |
11
+ |--------|-----------------|---------|
12
+ | Platform credit | `credit_balance`, `balance_topup_form` · also `/carrier:credits` | Carrier platform runway |
13
+ | Stripe Connect | `stripe_connect_status\|balance\|payouts\|dispute_list` | Operator payouts / disputes |
14
+ | Managed prepaid wallet | `wallet_*` · **`/carrier:wallet`** | Atlas prepaid drawdown (managed mode) |
15
+
16
+ - **events** → `billing_events` (recent charges, renewals, adjustments).
17
+ - **balances** → `credit_balance` (platform credit), `modify_subscriber_balance` / `modify_account_balance` for adjustments. Generate a customer-facing top-up with `balance_topup_form`.
18
+ - **thresholds / config** → `configure_billing` to set low-balance alerts and auto-renew behavior.
19
+ - **cost watch** → `high_cost_subscribers` to find the fleet's most expensive SIMs.
20
+ - **payouts (Stripe Connect)** → `stripe_connect_status`, `stripe_connect_balance`, `stripe_connect_payouts`, `stripe_connect_dispute_list`.
21
+ - **managed wallet** → do not use Connect or platform credit tools; use `/carrier:wallet` (`wallet_balance`, `wallet_topup_checkout`, `wallet_auto_topup`).
22
+
23
+ Any balance modification is money movement — state the exact amount, account, and direction, and confirm before executing. Never adjust a balance without explicit confirmation.
@@ -0,0 +1,15 @@
1
+ ---
2
+ description: Churn risk and marketing intelligence across the fleet
3
+ argument-hint: "[subscriber|fleet]"
4
+ ---
5
+
6
+ # Churn & Intelligence
7
+
8
+ Surface retention risk and growth opportunities.
9
+
10
+ - **churn risk** → `churn_risk` (per-subscriber or fleet-wide ranking with drivers).
11
+ - **marketing intelligence** → `marketing_intelligence` for segments, upsell candidates, and campaign ideas.
12
+ - **cost / anomaly signals** → `high_cost_subscribers`, `detect_usage_anomalies` (silent churn often shows as a usage drop first).
13
+ - **diagnose at-risk accounts** → `diagnose_subscriber` for the top risks.
14
+
15
+ Deliver a ranked, actionable list: who's at risk, why, and the single best retention action per account (top-up nudge, plan right-size via `optimize_package`, proactive SMS via `send_sms`). Offer to execute the top action.
@@ -0,0 +1,15 @@
1
+ ---
2
+ description: Platform credit balance, top-ups, and credential status
3
+ argument-hint: "[balance|topup|status]"
4
+ ---
5
+
6
+ # Credits & Credentials
7
+
8
+ Keep the platform funded and authenticated.
9
+
10
+ - **balance** → `credit_balance` — current platform credit and burn rate.
11
+ - **top-up** → `balance_topup_form` to generate a funding link / form.
12
+ - **credential status** → `credential_status` (OCS + provider auth health); `rotate_credentials` if a key is stale (confirm first — rotation can interrupt provisioning).
13
+ - **reseller funding** → `list_reseller_accounts` + `get_reseller_info` to see per-reseller balances.
14
+
15
+ Warn clearly when credit is low enough to block provisioning, and recommend the top-up amount based on recent burn.
@@ -0,0 +1,15 @@
1
+ ---
2
+ description: Check eSIM/SIM status, activation, and provider health
3
+ argument-hint: "[account/ICCID]"
4
+ ---
5
+
6
+ # eSIM Status
7
+
8
+ Inspect activation and connectivity state of eSIMs.
9
+
10
+ - **per account** → `esim_status_per_account` (installed / active / suspended, activation QR availability).
11
+ - **SIM state change** → `change_sim_status` to activate, suspend, or resume a SIM (confirm before changing a live SIM).
12
+ - **provider health** → `get_sim_provider_status` and `audit_network_coverage` for the destination.
13
+ - **HLR / bitrate** → `hlr_get_bitrate` / `hlr_set_bitrate` for throttling at the network layer.
14
+
15
+ Report each eSIM's lifecycle state and, when not yet activated, surface the activation QR / LPA string. If a SIM is stuck, run `diagnose_subscriber` and propose the fix.
@@ -0,0 +1,17 @@
1
+ ---
2
+ description: Fleet-wide health, OCS events, and rate-limit status
3
+ argument-hint: ""
4
+ ---
5
+
6
+ # Fleet Health
7
+
8
+ Give a one-screen operational overview of the whole MVNO.
9
+
10
+ Gather in parallel:
11
+ - `fleet_health` (+ `fleet_health_app` for the rich view) — active SIMs, suspended, errored, total data in flight.
12
+ - `list_recent_ocs_events` — recent charging-system events and any errors.
13
+ - `rate_limit_status` + `carrier_ocs_calls_per_min` — control-plane headroom.
14
+ - `environment_info` + `credential_status` — which environment + auth state.
15
+ - `credit_balance` — platform runway.
16
+
17
+ Present a compact dashboard: 🟢/🟡/🔴 per area, the top 3 issues needing attention, and recommended next actions. If anything is red, offer to drill in with `/carrier:subscribers view` or `/carrier:billing`.
@@ -0,0 +1,16 @@
1
+ ---
2
+ description: Manage green-zone (fair-use / whitelist) policy
3
+ argument-hint: "[list|add|remove|reset] [subscriber/destination]"
4
+ ---
5
+
6
+ # Green Zone
7
+
8
+ Manage fair-use whitelisting and traffic steering.
9
+
10
+ - **list** → `greenzone_whitelist_list` (and `list_steering_lists`, `list_destination_lists`, `list_destination_prefixes` for routing).
11
+ - **add / remove** → `greenzone_whitelist_add` / `greenzone_whitelist_remove`.
12
+ - **reset counter** → `reset_subscriber_gz_counter` for a subscriber who hit the fair-use cap.
13
+ - **steering** → `modify_subscriber_steering_list`, `push_steering_to_subscriber`.
14
+ - **restrictions** → `set_subscriber_traffic_restrictions`.
15
+
16
+ Explain the policy effect of each change in plain language before applying it. Confirm subscriber-affecting changes.
@@ -0,0 +1,17 @@
1
+ ---
2
+ description: Zero-to-live — stand up a connectivity business end to end
3
+ argument-hint: "[brand name]"
4
+ ---
5
+
6
+ # Onboard a Connectivity Business
7
+
8
+ Take a new operator from nothing to a live, sellable eSIM brand. Drive the whole flow, confirming at each gate.
9
+
10
+ 1. **Verify access** — `environment_info`, `credential_status`, `credit_balance`. Stop if auth is bad or credit can't cover a first batch.
11
+ 2. **Define the offer** — review `service_catalog` + `pricing_plans`; create the launch packages with `create_package_template` (e.g. a regional and a global plan). Set retail price.
12
+ 3. **Pilot provision** — `provision_esim_wizard` for a small test batch, `assign_package`, verify with `esim_status_per_account`.
13
+ 4. **Storefront** — scaffold + deploy the white-labeled site: `npx @carrierllc/cli site create` then `site deploy` (see `/carrier:storefront`). Brand it for the operator.
14
+ 5. **Billing** — `configure_billing` thresholds; confirm `stripe_connect_status` so payouts work.
15
+ 6. **Go-live checklist** — fleet `fleet_health` green, plans live on the storefront, top-up form (`balance_topup_form`) working, support SMS (`send_sms`) tested.
16
+
17
+ End with a punch list of anything still manual and the live storefront URL.
@@ -0,0 +1,18 @@
1
+ ---
2
+ description: Manage data packages and package templates
3
+ argument-hint: "[list|create|assign|modify|remove] [subscriber] [template]"
4
+ ---
5
+
6
+ # Packages & Plans
7
+
8
+ Create, assign, and tune data packages across the fleet.
9
+
10
+ - **list templates** → `list_package_templates` (+ `pricing_plans`, `service_catalog`, `get_tariff` for economics).
11
+ - **per-subscriber** → `list_subscriber_packages`.
12
+ - **create template** → `create_package_template`; refine with `modify_template_core`, `modify_template_recurring`, `modify_template_throttling`.
13
+ - **assign** → `assign_package` (one-off) or `assign_recurring_package` (monthly). Use `stop_resume_recurring_package` to pause/resume.
14
+ - **modify live package** → `modify_package_limits`, `modify_package_expiry`, `modify_package_status`, `modify_subscriber_package_active_period`.
15
+ - **optimize** → `optimize_package` to right-size a subscriber's plan to their actual usage.
16
+ - **remove** → `delete_subscriber_package` (or `clean_all_packages` — destructive, confirm explicitly).
17
+
18
+ When assigning, verify the subscriber exists (`get_subscriber`) and there's sufficient credit. Show cost impact before committing.
@@ -0,0 +1,30 @@
1
+ ---
2
+ description: Provision a new eSIM and assign a starter package
3
+ argument-hint: "[account/reseller] [country or package] [qty]"
4
+ ---
5
+
6
+ # Provision eSIM
7
+
8
+ Issue free eSIM stock and assign a starter package so SIMs are ready to activate.
9
+
10
+ Inputs from `$ARGUMENTS` (ask for anything missing): target **account/reseller**, destination **country/region** or **package template**, and **quantity** (default 1).
11
+
12
+ ## Preferred path — issue from inventory (Console parity)
13
+
14
+ Matches Console / API `POST /v1/subscribers/issue-from-inventory`: OCS auto-picks a free eSIM on the account and assigns the package in one call.
15
+
16
+ 1. Confirm the account with `list_reseller_accounts` / `get_reseller_info` if not given (need numeric account id).
17
+ 2. Pick the package with `list_package_templates` (and `pricing_plans` / `service_catalog` for cost). If none fits, propose `create_package_template`.
18
+ 3. For each unit requested, call `assign_package` with **`account_for_subs` = account id** and **`packageTemplateId`** — **omit `iccid`**. Do not send both.
19
+ 4. Surface returned **ICCID**, packageId, and **activation QR / LPA / smdp** fields in a copyable block.
20
+ 5. Confirm stock with `esim_status_per_account` if the operator wants a fleet view.
21
+
22
+ If OCS reports no free inventory, stop and tell the operator to add stock SIMs (eSIMVault), then retry.
23
+
24
+ ## Alternate paths
25
+
26
+ - **Existing free ICCID known** → `assign_package` with `iccid` + `packageTemplateId` (no `account_for_subs`).
27
+ - **Pro+ guided UI** → `provision_esim_wizard` (selects an existing subscriber, not raw inventory stock).
28
+ - **Monthly auto-renew** → after issue, `assign_recurring_package` on the returned ICCID (or use recurring template at issue time only if the one-shot path is not appropriate).
29
+
30
+ Never provision more than the requested quantity. If platform credit is low (`credit_balance`) or managed wallet is empty (`wallet_balance` via `/carrier:wallet`), warn before provisioning.
@@ -0,0 +1,18 @@
1
+ ---
2
+ description: Send an SMS to a subscriber
3
+ argument-hint: "[subscriber/MSISDN] [message]"
4
+ ---
5
+
6
+ # Send SMS
7
+
8
+ Send a text message to a subscriber via the Carrier network.
9
+
10
+ From `$ARGUMENTS`: the **recipient** (subscriber id / MSISDN) and the **message**.
11
+
12
+ Steps:
13
+ 1. Resolve the recipient with `get_subscriber` if only a name/id was given; confirm the MSISDN.
14
+ 2. Show the final recipient + message and **get confirmation before sending** (outbound message to a real person).
15
+ 3. Send with `send_sms`.
16
+ 4. Report delivery result.
17
+
18
+ Keep messages within a single segment (160 GSM-7 chars) unless the user explicitly wants a multipart message. Never send to a list in bulk from this command.
@@ -0,0 +1,15 @@
1
+ ---
2
+ description: Quick control-plane + auth status check
3
+ argument-hint: ""
4
+ ---
5
+
6
+ # Carrier Status
7
+
8
+ Fast health ping of the Carrier control plane. Run and summarize in one short block:
9
+
10
+ - `environment_info` — which environment you're pointed at.
11
+ - `credential_status` — OCS + provider auth OK?
12
+ - `rate_limit_status` — API headroom.
13
+ - `credit_balance` — funded?
14
+
15
+ Output a single line per check with 🟢/🔴 and the key value. If anything is red, name the exact fix command. Keep it to a glance — no drilling unless asked.
@@ -0,0 +1,21 @@
1
+ ---
2
+ description: Scaffold, white-label, and deploy your eSIM storefront
3
+ argument-hint: "[create|deploy|rebrand] [dir]"
4
+ ---
5
+
6
+ # Storefront
7
+
8
+ Roll out the customer-facing eSIM storefront (Mango template, white-labeled) that sits on top of your Carrier fleet.
9
+
10
+ This wraps the `@carrierllc/cli` scaffolder.
11
+
12
+ - **create** → run `npx @carrierllc/cli site create <dir>` (or `carrier site create`). Capture brand name, domain, accent color, support email; it generates `src/brand.config.ts` and a buildable Next.js storefront.
13
+ - **rebrand** → edit `src/brand.config.ts` in the storefront dir (name, colors, tagline, domain, support, social) — the single white-label surface — then rebuild.
14
+ - **deploy** → `npx @carrierllc/cli site deploy <dir>` → builds and pushes to Cloudflare Pages. Requires `wrangler login`.
15
+
16
+ Wire-up notes:
17
+ - The storefront talks to your control plane via `NEXT_PUBLIC_CARRIER_API_URL` (`.env.local`).
18
+ - Plans shown to customers come from `pricing_plans` / `list_package_templates`; keep them in sync.
19
+ - Checkout provisions through the same fleet — confirm `credential_status` is healthy before going live.
20
+
21
+ After deploy, verify the live URL renders and the plans match `pricing_plans`.
@@ -0,0 +1,18 @@
1
+ ---
2
+ description: List, inspect, and manage subscriber lifecycle
3
+ argument-hint: "[list|view|suspend|resume|terminate] [subscriber/MSISDN/ICCID]"
4
+ ---
5
+
6
+ # Subscribers
7
+
8
+ Manage the subscriber lifecycle on the Carrier MVNO.
9
+
10
+ Parse the action + target from `$ARGUMENTS`.
11
+
12
+ - **list** → `list_subscribers` (paginate; summarize status, plan, last activity).
13
+ - **view / diagnose** → `get_subscriber` + `diagnose_subscriber` for a full health picture (status, balance, active packages, recent network events).
14
+ - **suspend / resume / terminate** → `modify_subscriber_status` with the appropriate state. **Confirm the exact subscriber and the destructive action before executing.**
15
+ - **contact / plan changes** → `modify_subscriber_contact_info`, `modify_subscriber_mobile_plan`, `modify_subscriber_voip_plan`, `affect_subscriber_phone_number`.
16
+ - **location** → `get_subscriber_location` / `get_subscriber_location_by_cell_id`.
17
+
18
+ Always echo back the before/after state. For any status change affecting live service, require explicit confirmation naming the subscriber.
@@ -0,0 +1,16 @@
1
+ ---
2
+ description: Inspect data usage, projections, and anomalies
3
+ argument-hint: "[subscriber/MSISDN] [period]"
4
+ ---
5
+
6
+ # Usage
7
+
8
+ Report and forecast data consumption.
9
+
10
+ - **current usage** → `subscriber_usage` for the subscriber/period in `$ARGUMENTS`.
11
+ - **projection** → `usage_projection` to forecast depletion and recommend top-up timing.
12
+ - **depletion / network events** → `subscriber_depletion_events`, `subscriber_network_events`.
13
+ - **travel pattern** → `subscriber_country_history` (which networks/countries the SIM has roamed).
14
+ - **anomalies** → `detect_usage_anomalies` across the fleet to catch runaway consumption or fraud.
15
+
16
+ Summarize: used vs allotment, burn rate, projected depletion date, and a clear recommendation (top up, upsize, throttle, or no action). Flag anything anomalous prominently.
@@ -0,0 +1,31 @@
1
+ ---
2
+ description: Managed prepaid wallet balance, bulk pack top-up, and auto-top-up
3
+ argument-hint: "[balance|topup|packs|auto]"
4
+ ---
5
+
6
+ # Managed prepaid wallet
7
+
8
+ Operate the **Atlas prepaid wallet** (managed-mode drawdown). This is **not** platform credit and **not** Stripe Connect.
9
+
10
+ Money domain map (do not mix them up):
11
+
12
+ | Domain | Tools | When |
13
+ |--------|-------|------|
14
+ | **Managed wallet** (this command) | `wallet_balance`, `wallet_topup_checkout`, `wallet_auto_topup` | Prepaid EUR balance that funds managed connectivity usage |
15
+ | Platform credit | `credit_balance`, `balance_topup_form` | Carrier platform call/credit runway — see `/carrier:credits` |
16
+ | Stripe Connect | `stripe_connect_*` | Operator payouts / disputes — see `/carrier:billing` |
17
+
18
+ Inputs from `$ARGUMENTS` (ask if missing): subcommand **balance** | **topup** | **packs** | **auto**, and optional pack id.
19
+
20
+ Steps:
21
+
22
+ 1. **balance** (default) → `wallet_balance` — EUR cents, auto-top-up enabled/threshold/pack.
23
+ 2. **packs** → `wallet_topup_checkout` with no `pack` — list pack_500 / pack_1000 / pack_2500 / pack_5000 (paid + bonus credit).
24
+ 3. **topup** → pick a pack with the operator, then `wallet_topup_checkout` with `pack` — return the hosted Checkout URL; wallet credits after payment completes.
25
+ 4. **auto** → only after explicit confirm: `wallet_auto_topup` (charges the saved payment method off-session). Prefer dry discussion of threshold first via `wallet_balance`.
26
+
27
+ Safety:
28
+
29
+ - Treat top-up and auto-top-up as money movement — confirm pack amount and org before executing.
30
+ - If the operator asks for "credit" or "Connect payouts", redirect to `/carrier:credits` or `/carrier:billing`.
31
+ - Never invent pack sizes outside the catalog returned by the tools.
@@ -0,0 +1,43 @@
1
+ ---
2
+ name: carrier-operations
3
+ description: Reference map of the Carrier MCP tool surface — domains, key tools, and safety rules for operating an MVNO/eSIM fleet. Load when planning multi-step fleet, billing, or storefront operations.
4
+ ---
5
+
6
+ # Carrier Operations — MCP Tool Map
7
+
8
+ Carrier is a programmable connectivity control plane (the "Stripe of telecom") exposed as an MCP server at `https://mcp.carrier.llc/mcp` (OAuth 2.1 + PKCE). Tools span these domains:
9
+
10
+ ## Provisioning & SIM lifecycle
11
+ `assign_package` with `account_for_subs` (issue free eSIM from inventory — Console `issue-from-inventory` parity) · `provision_esim_wizard` (Pro+ UI on existing subscribers) · `change_sim_status` · `esim_status_per_account` · `get_sim_provider_status` · `audit_network_coverage` · `hlr_get_bitrate` / `hlr_set_bitrate`
12
+
13
+ ## Subscribers
14
+ `list_subscribers` · `get_subscriber` · `diagnose_subscriber` · `modify_subscriber_status` · `modify_subscriber_contact_info` · `modify_subscriber_mobile_plan` · `modify_subscriber_voip_plan` · `affect_subscriber_phone_number` · `move_subscriber_range_to_account` · `get_subscriber_location[_by_cell_id]`
15
+
16
+ ## Packages & pricing
17
+ `list_package_templates` · `create_package_template` · `modify_template_core|recurring|throttling` · `assign_package` · `assign_recurring_package` · `stop_resume_recurring_package` · `list_subscriber_packages` · `modify_package_limits|expiry|status` · `modify_subscriber_package_active_period` · `optimize_package` · `delete_subscriber_package` · `clean_all_packages` · `pricing_plans` · `service_catalog` · `get_tariff`
18
+
19
+ ## Usage & intelligence
20
+ `subscriber_usage` · `usage_projection` · `subscriber_depletion_events` · `subscriber_network_events` · `subscriber_country_history` · `detect_usage_anomalies` · `churn_risk` · `marketing_intelligence` · `high_cost_subscribers`
21
+
22
+ ## Billing, credit & wallet (three money domains)
23
+ - Platform credit: `credit_balance` · `balance_topup_form` · `billing_events` · `configure_billing` · `modify_subscriber_balance` · `modify_account_balance`
24
+ - Stripe Connect: `stripe_connect_status|balance|payouts|dispute_list` (Radar / `stripe_proxy_call` are Pro/ops-gated)
25
+ - Managed prepaid wallet: `wallet_balance` · `wallet_topup_checkout` · `wallet_auto_topup` (slash: `/carrier:wallet`)
26
+
27
+ ## Green zone / steering
28
+ `greenzone_whitelist_list|add|remove` · `reset_subscriber_gz_counter` · `list_steering_lists` · `list_destination_lists` · `list_destination_prefixes` · `modify_subscriber_steering_list` · `push_steering_to_subscriber` · `set_subscriber_traffic_restrictions`
29
+
30
+ ## Fleet & platform
31
+ `fleet_health` · `fleet_health_app` · `list_recent_ocs_events` · `rate_limit_status` · `carrier_ocs_calls_per_min` · `environment_info` · `credential_status` · `rotate_credentials` · `list_reseller_accounts` · `get_reseller_info` · `send_sms`
32
+
33
+ ## Gated surfaces (not free-tier defaults)
34
+ - **Steel ui_agent_*** — requires `STEEL_API_KEY` / ops config; UI-only OCS ops.
35
+ - **`stripe_proxy_call`** — Pro/Enterprise Stripe Agent Toolkit multiplexer.
36
+ - **`provision_esim_wizard`** — Pro+ MCP App; free tier uses `assign_package` inventory path.
37
+
38
+ ## Safety rules (always)
39
+ 1. **Read before write.** Establish current state before any mutation.
40
+ 2. **Confirm money & live-service changes** — status changes, balance/package mutations, wallet top-ups, `clean_all_packages`, `rotate_credentials`, outbound `send_sms`.
41
+ 3. **Right quantity only** — never over-provision; check `credit_balance` and (managed mode) `wallet_balance` first.
42
+ 4. **Diagnose, don't guess** — use `diagnose_subscriber` + event tools for faults.
43
+ 5. The storefront layer (white-label Mango template) is scaffolded/deployed via `@carrierllc/cli`; keep its plans synced with `pricing_plans`.
@@ -0,0 +1,15 @@
1
+ import js from "@eslint/js";
2
+ import nextPlugin from "eslint-config-next/flat.js";
3
+
4
+ /** @type {import('eslint').Linter.Config[]} */
5
+ const eslintConfig = [
6
+ js.configs.recommended,
7
+ ...nextPlugin,
8
+ {
9
+ rules: {
10
+ "no-unused-vars": "off",
11
+ },
12
+ },
13
+ ];
14
+
15
+ export default eslintConfig;