Skip to content

v1.0.0

Latest

Choose a tag to compare

@marcopesani marcopesani released this 23 Apr 13:09
v1.0.0: rewrite for Bitrefill API v2 (Bearer auth) + eSIMs

Full rewrite of the server against the Bitrefill API v2
(https://api.bitrefill.com/v2) using a single Bearer API key. Drops the
legacy v0.x HMAC-style dual-credential setup
(BITREFILL_API_SECRET + BITREFILL_API_ID) in favor of BITREFILL_API_KEY.

Highlights:

- Auth: replaced AuthenticatedApiClient HMAC logic with Authorization:
  Bearer ${BITREFILL_API_KEY}. Removed the unauthenticated
  src/utils/api/public.ts client entirely (v2 has no anonymous access,
  not even for ping).
- Tools: 18 kebab-case tools wired in src/handlers/tools.ts covering
  products, invoices, orders, account balance, phone lookup, ping, and
  the full eSIM flow (list/get product, create/get/pay invoice,
  list/get user eSIMs). Old snake_case names (search, create_invoice,
  unseal_order, ...) are gone.
- Schemas: Zod 4, input-only validation. Response shapes moved to
  src/types/api.ts as TS hints; API JSON is returned to clients
  unchanged.
- Services: split per domain (search, products, invoices, orders,
  esims, misc) over the new authenticated client.
- Resources: added bitrefill://category-slugs alongside payment-methods
  and product-types/{productType}.
- Startup: src/index.ts logs a clear error and registers no tools when
  BITREFILL_API_KEY is missing instead of failing later per-call.
- Config: .env.example, .cursor/mcp.example.json, and Docker examples
  switched to BITREFILL_API_KEY. Engines relaxed to node >=20 /
  pnpm >=9; engine-strict turned off in .npmrc.
- Docs: README rewritten to position this repo as a sample / reference
  implementation and steer production users to the hosted Bitrefill
  eCommerce MCP at https://api.bitrefill.com/mcp (OAuth or
  /YOUR_API_KEY), with links to the per-client setup guides. Added
  AGENTS.md with a short orientation for coding agents.
- Version bumped to 1.0.0; package description updated.

Made-with: Cursor