Skip to main content
Glama
bitrefill

Bitrefill Search and Shop

Official
by bitrefill

search

Find gift cards, eSIMs, and mobile top-ups by searching with keywords, country codes, or categories to purchase products using cryptocurrencies.

Instructions

Search for gift cards, esims, mobile topups and more. It's suggested to use the categories tool before searching for products, to have a better understanding of what's available.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query (e.g., 'Amazon', 'Netflix', 'AT&T' or '*' for all the available products)
countryNoCountry code (e.g., 'US', 'IT', 'GB')
languageNoLanguage code for results (e.g., 'en')
limitNoMaximum number of results to return
skipNoNumber of results to skip (for pagination)
categoryNoFilter by category (e.g., 'gaming', 'entertainment')
beta_flagsNoBeta feature flags
cartNoCart identifier
do_recommendNoEnable recommendations
recNoRecommendation parameter
secNoSecurity parameter
colNoColumn layout parameter
prefccNoPreferred country code parameter
srcNoSource of the request

Implementation Reference

  • The execution logic of the 'search' MCP tool handler, which invokes the SearchService and returns formatted results or error content.
    async (args) => { try { const searchResults = await SearchService.search(args.query, args); return { content: [ { type: "text" as const, text: JSON.stringify(searchResults, null, 2) } ] }; } catch (error) { const errorMessage = error instanceof Error ? error.message : String(error); return { content: [ { type: "text" as const, text: JSON.stringify({ error: errorMessage }, null, 2), }, ], isError: true, }; } }
  • Registration of the 'search' tool on the MCP server, specifying name, description, input schema, and handler function.
    server.tool( "search", "Search for gift cards, esims, mobile topups and more. It's suggested to use the `categories` tool before searching for products, to have a better understanding of what's available.", SearchOptions, async (args) => { try { const searchResults = await SearchService.search(args.query, args); return { content: [ { type: "text" as const, text: JSON.stringify(searchResults, null, 2) } ] }; } catch (error) { const errorMessage = error instanceof Error ? error.message : String(error); return { content: [ { type: "text" as const, text: JSON.stringify({ error: errorMessage }, null, 2), }, ], isError: true, }; } } );
  • Input schema (SearchOptions) for the 'search' tool, defining parameters like query, country, limit, etc., using Zod.
    export const SearchOptions = { query: z.string().describe("Search query (e.g., 'Amazon', 'Netflix', 'AT&T' or '*' for all the available products)"), country: z.string().optional().describe("Country code (e.g., 'US', 'IT', 'GB')"), language: z.string().optional().describe("Language code for results (e.g., 'en')"), limit: z.number().optional().describe("Maximum number of results to return"), skip: z.number().optional().describe("Number of results to skip (for pagination)"), category: z.string().optional().describe("Filter by category (e.g., 'gaming', 'entertainment')"), beta_flags: z.string().optional().describe("Beta feature flags"), cart: z.string().optional().describe("Cart identifier"), do_recommend: z.number().optional().describe("Enable recommendations"), rec: z.number().optional().describe("Recommendation parameter"), sec: z.number().optional().describe("Security parameter"), col: z.number().optional().describe("Column layout parameter"), prefcc: z.number().optional().describe("Preferred country code parameter"), src: z.string().optional().describe("Source of the request"), };
  • Helper method in SearchService that validates options and delegates to publicApiClient.search for the actual API call.
    public static async search( query: string, options: Partial<SearchOptionsType> = {} ): Promise<SearchResults> { // Validate options const validatedOptions = SearchOptionsSchema.parse(options); // Use the public API client to perform the search return publicApiClient.search(query, validatedOptions); }

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bitrefill/bitrefill-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server