Use with Cursor

Connect Cursor IDE to Bitrefill MCP for purchasing gift cards and eSIMs.

Connect Cursor to Bitrefill MCP to search for products, check prices, and make purchases directly from your IDE.

Prerequisites

  • Cursor IDE installed (download)
  • A Bitrefill account

Setup with OAuth (Recommended)

Step 1: Create the Config File

Create or edit .cursor/mcp.json in your project root:

{
  "mcpServers": {
    "bitrefill": {
      "url": "https://api.bitrefill.com/mcp"
    }
  }
}

For global availability across all projects, create ~/.cursor/mcp.json instead.

Step 2: Authenticate

  1. Open Cursor Settings (gear icon or Cmd/Ctrl + ,)
  2. Go to Tools & Integrations (or Tools > MCP)
  3. Find Bitrefill — it will show "Needs login"
  4. Click it to open the OAuth flow in your browser
  5. Sign in to Bitrefill and approve access
  6. Click "Open Cursor" to return

The server will show a green checkmark when connected.

Alternative: Settings Menu

You can also add the server through the UI:

  1. Open Cursor Settings
  2. Navigate to Tools & Integrations > MCP Tools
  3. Click Add Custom MCP
  4. Enter:
    • Name: bitrefill
    • Type: SSE
    • URL: https://api.bitrefill.com/mcp
  5. Save and authenticate when prompted

Setup with API Key

If you prefer to use an API key:

  1. Generate an API key at bitrefill.com/account/developers
  2. Add to your config with the API key in the URL:
{
  "mcpServers": {
    "bitrefill": {
      "url": "https://api.bitrefill.com/mcp/YOUR_API_KEY"
    }
  }
}

No browser authentication needed — the API key handles it.

Using Environment Variables

For better security, use an environment variable:

{
  "mcpServers": {
    "bitrefill": {
      "url": "https://api.bitrefill.com/mcp/${env:BITREFILL_API_KEY}"
    }
  }
}

Then set BITREFILL_API_KEY in your environment.

Tool Approval

By default, Cursor asks for approval before running MCP tools. You can auto-approve read-only tools:

{
  "mcpServers": {
    "bitrefill": {
      "url": "https://api.bitrefill.com/mcp",
      "autoApprove": [
        "search-products",
        "product-details",
        "list-invoices",
        "get-invoice-by-id",
        "list-orders",
        "get-order-by-id"
      ]
    }
  }
}

Consider keeping buy-products out of autoApprove so you always confirm purchases before they happen.

Using Bitrefill

In Cursor's AI chat, try:

"Search for Netflix gift cards"

"Show me travel eSIMs for Europe"

"Buy a $50 DoorDash 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

Troubleshooting

Server not appearing in settings
  1. Check that your config file is valid JSON (no trailing commas)
  2. Verify the file is in .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)
  3. Restart Cursor
OAuth login loop

If clicking "Needs login" keeps reopening:

  1. Clear browser cookies for bitrefill.com
  2. Try a different browser
  3. Make sure pop-ups aren't blocked
Connection timing out

MCP tools in Cursor have a timeout. For slow connections, try:

  1. Check your internet connection
  2. Try again later
  3. Switch to API key authentication if the issue persists