home / mcp / bitrefill mcp server
A Model Context Protocol Server connector for Bitrefill public API, to enable AI agents to search and shop on Bitrefill.
Configuration
View docs{
"mcpServers": {
"bitrefill-bitrefill-mcp-server": {
"command": "npx",
"args": [
"-y",
"bitrefill-mcp-server"
],
"env": {
"BITREFILL_API_ID": "YOUR_API_ID",
"BITREFILL_API_SECRET": "YOUR_API_SECRET"
}
}
}
}You can access Bitrefill services through an MCP server that talks with Claude and other AI assistants. This server exposes product search, details, and invoicing actions in a structured way so your AI helper can perform Bitrefill tasks on your behalf.
Use the MCP server with an MCP client to search for gift cards, esims, and mobile topups, get product details, create invoices, manage orders, and check balances. You interact with highβlevel tools like search, detail, categories, create_invoice, get_invoices, get_invoice, pay_invoice, get_orders, get_order, unseal_order, get_account_balance, and ping. The client will pass your requests to the MCP server and receive structured responses suitable for AI-assisted workflows.
Typical usage patterns include: searching for products by keyword, requesting detailed information for a specific product, initializing an invoice for a selected product and payment method, retrieving invoice or order histories, paying invoices with a balance method, and revealing codes for completed orders. Your MCP client handles the orchestration and presents clear results to you.
Prerequisites: you need Node.js installed (and npm). You will run the MCP server as a local process via a stdio interface.
Step 1: Install dependencies and prepare the environment.
Step 2: Start the MCP server using the command shown in the example configuration.
Complete setup usually involves installing dependencies, building the server if needed, and launching via a runtime command that communicates over stdio.
To enable all tools that rely on Bitrefill services (except for search, categories, and detail endpoints), you must provide API credentials. Create a Bitrefill account, request a developer API key, and store credentials in a root-level .env file.
Environment variables used by the MCP server include the following placeholders. Replace the placeholders with your actual credentials.
Security: keep your API credentials secret. Do not commit .env files to public repositories. Use access controls on the machine running the MCP server.
Debugging: MCP clients communicate over stdio. If you need advanced debugging, use an MCP inspector tool to view the traffic and responses.
Search for gift cards, esims, mobile topups and more. Requires a query and can filter by country, language, limit, skip, and category.
Get detailed information about a specific product by its ID.
Return the full product type/categories map.
Create a new invoice for purchasing products. Requires product selections and a payment method.
Retrieve a list of invoices with optional filtering by time or status.
Retrieve details for a specific invoice by ID.
Pay an unpaid invoice using the balance payment method.
Retrieve a list of orders with optional filtering.
Retrieve details for a specific order by ID.
Reveal codes and PINs for a specific order by ID.
Retrieve your account balance.
Check if the Bitrefill API is available.