Bitrefill — Claude Code MCP server: what it does, how to install
A sample MCP server over the Bitrefill v2 API: the agent can search gift cards and eSIMs, raise invoices, pay them and check orders.
no license updated 2026-10-29
Open on GitHubWhat Bitrefill does
The repo is a worked example of an MCP server sitting on top of Bitrefill's v2 HTTP API. It hands the agent 18 tools: product search and details, invoice creation and payment, order lookup, account balance, a phone-number check, plus a group of eSIM calls. Zod schemas cover the tool inputs only — whatever Bitrefill sends back reaches the model as plain JSON, untouched.
It runs locally over stdio. Your client config points at npx -y bitrefill-mcp-server and passes BITREFILL_API_KEY in the env block; the key comes from the developers page of a Bitrefill account. Skip the key and nothing is registered at all, not even ping, since v2 always wants auth. Four resources (bitrefill://payment-methods, bitrefill://category-slugs, bitrefill://product-types) feed the agent the allowed strings so it stops guessing them.
Treat the code as a starting point rather than a service. Bitrefill runs its own endpoint at https://api.bitrefill.com/mcp with OAuth and a trimmed set of 7 tools, and that is the one to use in production. Upgrading from 0.x breaks things too: the old snake_case tool names are gone, unseal_order no longer exists, and redemption details now come back in the order response.
What it helps with
- find a gift card for a given store and amount
- create a crypto invoice and pay it from the agent
- check an order and pull the redemption code
- pick an eSIM and issue its invoice
- read the account balance before buying
Example prompts for the agent
- Find a gift card for Steam and list the payment methods I can use.
- Create the invoice, pay it, then tell me the order status.
- Pick an eSIM for a trip and create the invoice for it.
How to install Bitrefill
Install
The MCP registry has no launch command for it: see the repository README
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Bitrefill
How do I install Bitrefill in Claude Code?
Create a key on the developers page of your Bitrefill account, then add an MCP entry whose command is npx -y bitrefill-mcp-server with BITREFILL_API_KEY inside the env block. Restart the client and the tools show up.
What does the Bitrefill MCP server do?
It exposes Bitrefill to the agent: product search, invoices and payments, order status, balance, phone-number checks and eSIM calls. This build ships 18 tools.
Do I need an API key for it?
Yes. With BITREFILL_API_KEY unset the server registers no tools at all, because v2 rejects even ping without auth.