Use with Claude Code
Connect Claude Code CLI to Bitrefill MCP for purchasing gift cards and eSIMs.
Connect Claude Code to Bitrefill MCP to search for products, check prices, and make purchases directly from your terminal.
Prerequisites
- Claude Code CLI installed (installation guide)
- A Bitrefill account
Setup with OAuth (Recommended)
Step 1: Add the MCP Server
claude mcp add --transport http bitrefill https://api.bitrefill.com/mcpTo make it available in all projects, add the --scope user flag:
claude mcp add --transport http bitrefill https://api.bitrefill.com/mcp --scope userStep 2: Authenticate
- Launch Claude Code:
claude- Run the MCP command:
/mcp
- Select Bitrefill and click Authenticate
- Complete the OAuth flow in your browser
- Return to Claude Code — you're now connected
Setup with API Key
If you prefer to use an API key:
- Generate an API key at bitrefill.com/account/developers
- Add the server with your API key in the URL:
claude mcp add --transport http bitrefill https://api.bitrefill.com/mcp/YOUR_API_KEY --scope userNo browser authentication needed — the API key handles it.
Configuration File
You can also add the server directly to your config file.
Global config (~/.claude.json):
{
"mcpServers": {
"bitrefill": {
"type": "http",
"url": "https://api.bitrefill.com/mcp"
}
}
}With API key:
{
"mcpServers": {
"bitrefill": {
"type": "http",
"url": "https://api.bitrefill.com/mcp/YOUR_API_KEY"
}
}
}Scope Options
| Scope | Location | Use Case |
|---|---|---|
local | Current directory | Project-specific |
project | .mcp.json in project | Shared with team |
user | ~/.claude.json | Available everywhere |
For personal use, user scope is recommended so Bitrefill is available in all your projects.
Using Bitrefill
Once connected, ask Claude to use Bitrefill:
Search for Spotify gift cards in the UK
Show me eSIM options for traveling to Spain
Buy a $100 Apple gift card
Available Tools
| Tool | What It Does |
|---|---|
search-products | Find gift cards and eSIMs |
product-details | Get pricing and denominations |
buy-products | Purchase products |
list-invoices | View your invoices |
get-invoice-by-id | Get invoice details |
list-orders | View your orders |
get-order-by-id | Get order details |
Managing the Server
List configured MCP servers:
claude mcp listRemove the Bitrefill server:
claude mcp remove bitrefillClear OAuth authentication:
/mcp
Then select Bitrefill > Clear authentication.
Troubleshooting
Browser doesn't open for OAuth
If the browser doesn't open automatically, copy the URL displayed in the terminal and paste it in your browser.
Server not connecting
- Check that you added with the correct transport:
--transport http - Verify the URL is correct
- Try removing and re-adding the server
Tools not available in specific project
If you added with local scope, the server is only available in that directory. Use --scope user for global availability.
Updated about 2 months ago