Bitrefill MCP Server
Allows searching for and purchasing Amazon gift cards through Bitrefill.
Enables search and purchase of AT&T mobile topups and gift cards.
Provides Bitcoin as a payment method for purchasing products via invoices.
Offers Lightning Network payments for instant invoice settlement.
Supports searching for and buying Netflix gift cards via Bitrefill.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Bitrefill MCP Server search for Netflix gift cards"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Bitrefill MCP Server
A TypeScript-based MCP server that provides access to Bitrefill services, allowing you to search for gift cards, mobile topups, and more. This server implements the Model Context Protocol to expose Bitrefill functionality to AI assistants.
How It Works
The server operates using the Model Context Protocol (MCP) to communicate with Claude and similar AI assistants. It:
Runs as a standalone process using stdio for communication
Registers resources and tools for accessing Bitrefill services
Interfaces with the Bitrefill API to provide product search and details
Returns structured JSON responses that can be processed by AI assistants
Architecture
The app server follows this architecture:
src/
├── index.ts # Main entry point
├── constants/ # Static data
│ ├── categories.ts # Product categories
│ └── payment_methods.ts # Payment methods
├── handlers/ # MCP request handlers
│ ├── resources.ts # Resource endpoints
│ └── tools.ts # Tool implementations
├── schemas/ # Data validation schemas
│ ├── detail.ts # Product detail response types
│ ├── invoice.ts # Invoice schemas
│ ├── misc.ts # Miscellaneous schemas
│ ├── order.ts # Order schemas
│ └── search.ts # Search parameters and response types
├── services/ # API services
│ ├── invoices.ts # Invoice service
│ ├── misc.ts # Miscellaneous services
│ ├── orders.ts # Order services
│ ├── products.ts # Product details service
│ └── search.ts # Search functionality
└── utils/ # Utility functions
├── index.ts # Error logging, etc.
└── api/ # API clients
├── authenticated.ts # Authenticated API client
├── base.ts # Base API client
└── public.ts # Public API clientRelated MCP server: MCP Bitnovo Pay
Features
Resources
bitrefill://product-types- List of available product types on Bitrefillbitrefill://categories/{type}- List of available categories for a specific product type (e.g.,bitrefill://categories/gift-cards)
Tools
search- Search for gift cards, esims, mobile topups and moreRequired:
query(e.g., 'Amazon', 'Netflix', 'AT&T' or '*' for all)Optional:
country,language,limit,skip,category
detail- Get detailed information about a productRequired:
id(product identifier)
categories- Get the full product type/categories mapNo required parameters
create_invoice- Create a new invoice for purchasing products (requires API key)Required:
products(array of products to include in the invoice)Each product requires:
product_idOptional product fields:
quantity,value,package_id,phone_number,email,send_email,send_sms
Required:
payment_method(one of: "balance", "bitcoin", "lightning")Optional:
webhook_url,auto_pay
get_invoices- Retrieve a list of invoices with optional filteringOptional:
start,limit,after,before
get_invoice- Retrieve details for a specific invoice by IDRequired:
id(invoice identifier)
pay_invoice- Pay an unpaid invoice (only works with 'balance' payment method)Required:
id(invoice identifier)
get_orders- Retrieve a list of orders with optional filteringOptional:
start,limit,after,before
get_order- Retrieve details for a specific order by IDRequired:
id(order identifier)
unseal_order- Reveal codes and PINs for a specific order by IDRequired:
id(order identifier)
get_account_balance- Retrieve your account balanceNo required parameters
ping- Check if the Bitrefill API is availableNo required parameters
Configuration
API Key Setup
To use the all the tools that rely on the Bitrefill API except for search, categories and detail, you need to set up Bitrefill API credentials:
Create a Bitrefill account
Ask for a developer API key by filing a request on this form
Create a
.envfile in the root directory (you can copy from.env.example)Add your Bitrefill API credentials:
BITREFILL_API_SECRET=your_api_key_here BITREFILL_API_ID=your_api_id_here
The create_invoice tool will only be available if the API credentials are set. If the API credentials are not set, the tool will not be registered and won't appear in the list of available tools.
Development
Install dependencies:
npm installBuild the server:
npm run buildFor development with auto-rebuild:
npm run watchDebugging
Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector, which is available as a package script:
npm run inspectorThe Inspector will provide a URL to access debugging tools in your browser.
Installation
Installing via Smithery
To install Bitrefill for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @bitrefill/bitrefill-mcp-server --client claudeClaude Desktop
Add the server config at:
MacOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"bitrefill": {
"command": "npx",
"args": ["-y", "bitrefill-mcp-server"],
"env": {
"BITREFILL_API_SECRET": "your_api_key_here",
"BITREFILL_API_ID": "your_api_id_here"
}
}
}
}Cline
Open the Cline extension settings
Open "MCP Servers" tab
Click on "Configure MCP Servers"
Add the server config:
{
"mcpServers": {
"github.com/bitrefill/bitrefill-mcp-server": {
"command": "npx",
"args": ["-y", "bitrefill-mcp-server"],
"disabled": false,
"autoApprove": ["search", "detail", "categories"],
"env": {
"BITREFILL_API_ID": "your_api_id_here",
"BITREFILL_API_SECRET": "your_api_key_here"
}
}
}
}Additional Cline configuration options:
disabled: Set tofalseto enable the serverautoApprove: List of tools that don't require explicit approval for each use
Cursor
Open the Cursor settings
Open "Features" settings
In the "MCP Servers" section, click on "Add new MCP Server"
Choose a name, and select "command" as "Type"
In the "Command" field, enter the following:
npx -y bitrefill-mcp-server(Optional) If you're using the
create_invoicetool, add environment variables:BITREFILL_API_SECRET: your_api_key_here
BITREFILL_API_ID: your_api_id_here
Docker
You can also run the server using Docker. First, build the image:
docker build -t bitrefill-mcp-server .Then run the container:
docker run -e BITREFILL_API_SECRET=your_api_key_here -e BITREFILL_API_ID=your_api_id_here bitrefill-mcp-serverFor development, you might want to mount your source code as a volume:
docker run -v $(pwd):/app --env-file .env bitrefill-mcp-serverAvailable Tools
12 toolscategoriesA
Get the full product type/categories map. It's suggested to use this tool to get the categories and then use the search tool to search for products in a specific category.
Inputs: no named parameters.
create_invoiceB
Create a new invoice for purchasing products with various payment methods
Inputs: products (required), payment_method (required), auto_pay, webhook_url.
detailB
Get detailed information about a product
Inputs: id (required).
get_account_balanceA
Retrieve your account balance
Inputs: no named parameters.
get_invoiceA
Retrieve details for a specific invoice by ID
Inputs: id (required).
get_invoicesC
Retrieve a list of invoices with optional filtering
Inputs: after, limit, start, before.
get_orderB
Retrieve details for a specific order by ID
Inputs: id (required).
get_ordersB
Retrieve a list of orders with optional filtering
Inputs: after, limit, start, before.
pay_invoiceA
Pay an unpaid invoice (only works with 'balance' payment method)
Inputs: id (required).
pingA
Check if the Bitrefill API is available
Inputs: no named parameters.
searchB
Search for gift cards, esims, mobile topups and more. It's suggested to use the categories tool before searching for products, to have a better understanding of what's available.
Inputs: query (required), col, rec, sec, +10 more.
unseal_orderB
Reveal codes and PINs for a specific order by ID
Inputs: id (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Each tool targets a distinct operation: browsing categories, searching products, getting details, managing invoices and orders, checking balance, and pinging. No two tools overlap in purpose.
Most tools follow a verb_noun pattern (e.g., create_invoice, get_invoice, pay_invoice), but 'categories', 'detail', and 'ping' deviate slightly. Overall, names are understandable and predictable.
12 tools cover the core workflow of a purchase platform without being excessive. Each tool serves a clear role, and the count is well-scoped for the domain.
The tool set covers the full purchase lifecycle: browsing, product details, account balance, invoicing, payment, order retrieval, and order fulfillment. Minor gaps like cancellation or refund are absent but not critical for typical use.
Related MCP Connectors
Prepaid balance for AI agents: one key, 4,900+ tools your agent can run today, caps, receipts.
Phone top-ups in 159 countries, gift cards, travel eSIMs. Pay by crypto link or USDC via x402.
Discover, inspect and run 63,000+ agent tools from one balance. Pay per call, no subscriptions.
Web search, page reading, HTML to PDF, file upload and flight search for AI agents, paid in USDC.
Related MCP Servers
- AlicenseAqualityDmaintenanceThis MCP wraps Bitrefill public API to allow agents to search for products and shop using cryptocurrencies like Bitcoin, Ethereum, Solana, and many more.2MIT

MCP Bitnovo Payofficial
AlicenseAqualityDmaintenanceEnables AI agents to create cryptocurrency payments, check payment status, generate QR codes, and manage transactions through Bitnovo Pay API integration with automatic webhook support.545 npm4MIT
LNbits MCP Serverofficial
AlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage Lightning wallets through LNbits, including balance checks, invoice creation, payments, and extension operations, all via natural language.7MIT
Blink MCP Serverofficial
AlicenseBqualityBmaintenanceEnables AI assistants to interact with the Blink Bitcoin and Lightning Network API for managing wallets, payments, invoices, and L402 services.551MIT