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

Setup with OAuth (Recommended)

Step 1: Add the MCP Server

claude mcp add --transport http bitrefill https://api.bitrefill.com/mcp

To make it available in all projects, add the --scope user flag:

claude mcp add --transport http bitrefill https://api.bitrefill.com/mcp --scope user

Step 2: Authenticate

  1. Launch Claude Code:
claude
  1. Run the MCP command:
/mcp
  1. Select Bitrefill and click Authenticate
  2. Complete the OAuth flow in your browser
  3. Return to Claude Code — you're now connected

Setup with API Key

If you prefer to use an API key:

  1. Generate an API key at bitrefill.com/account/developers
  2. 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 user

No 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

ScopeLocationUse Case
localCurrent directoryProject-specific
project.mcp.json in projectShared with team
user~/.claude.jsonAvailable 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

ToolWhat It Does
search-productsFind gift cards and eSIMs
product-detailsGet pricing and denominations
buy-productsPurchase products
list-invoicesView your invoices
get-invoice-by-idGet invoice details
list-ordersView your orders
get-order-by-idGet order details

Managing the Server

List configured MCP servers:

claude mcp list

Remove the Bitrefill server:

claude mcp remove bitrefill

Clear 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
  1. Check that you added with the correct transport: --transport http
  2. Verify the URL is correct
  3. 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.