Use with Cursor
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
- Open Cursor Settings (gear icon or
Cmd/Ctrl + ,) - Go to Tools & Integrations (or Tools > MCP)
- Find Bitrefill — it will show "Needs login"
- Click it to open the OAuth flow in your browser
- Sign in to Bitrefill and approve access
- 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:
- Open Cursor Settings
- Navigate to Tools & Integrations > MCP Tools
- Click Add Custom MCP
- Enter:
- Name:
bitrefill - Type: SSE
- URL:
https://api.bitrefill.com/mcp
- Name:
- Save and authenticate when prompted
Setup with API Key
If you prefer to use an API key:
- Generate an API key at bitrefill.com/account/developers
- 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",
"get-product-details",
"list-invoices",
"get-invoice-by-id"
]
}
}
}Consider keeping
buy-productsout ofautoApproveso 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
See the eCommerce MCP Server reference for full tool documentation.
| Tool | What It Does |
|---|---|
search-products | Find gift cards, eSIMs, and refills |
get-product-details | Get pricing and denominations |
buy-products | Purchase products |
submit-prepayment-step | Complete bill-payment forms |
list-invoices | View your invoice history |
get-invoice-by-id | Get invoice status and redemption info |
update-order | Track gift card balance or archive orders |
Troubleshooting
Server not appearing in settings
- Check that your config file is valid JSON (no trailing commas)
- Verify the file is in
.cursor/mcp.json(project) or~/.cursor/mcp.json(global) - Restart Cursor
OAuth login loop
If clicking "Needs login" keeps reopening:
- Clear browser cookies for bitrefill.com
- Try a different browser
- Make sure pop-ups aren't blocked
Connection timing out
MCP tools in Cursor have a timeout. For slow connections, try:
- Check your internet connection
- Try again later
- Switch to API key authentication if the issue persists