Bitrefill Search and Shop

Official

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Allows searching for and retrieving details about Amazon gift cards through the Bitrefill API

  • Allows searching for and retrieving details about AT&T mobile topups through the Bitrefill API

  • Allows searching for and retrieving details about Netflix gift cards through the Bitrefill API

Bitrefill MCP サーバー

TypeScriptベースのMCPサーバー。Bitrefillサービスへのアクセスを提供し、ギフトカードやモバイルチャージなどの検索を可能にします。このサーバーは、モデルコンテキストプロトコルを実装し、Bitrefill機能をAIアシスタントに公開します。

仕組み

サーバーは、モデルコンテキストプロトコル(MCP)を使用して、ClaudeなどのAIアシスタントと通信します。MCPは以下の機能を提供します。

  1. 通信にstdioを使用してスタンドアロンプロセスとして実行されます
  2. Bitrefill サービスにアクセスするためのリソースとツールを登録します
  3. Bitrefill APIとのインターフェースで製品検索と詳細を提供します
  4. AIアシスタントが処理できる構造化されたJSONレスポンスを返します

建築

アプリ サーバーは次のアーキテクチャに従います。

src/ ├── index.ts # Main entry point ├── constants/ # Static data │ ├── categories.ts # Product categories │ └── payment_methods.ts # Payment methods ├── handlers/ # MCP request handlers │ ├── resources.ts # Resource endpoints │ └── tools.ts # Tool implementations ├── schemas/ # Data validation schemas │ ├── detail.ts # Product detail response types │ ├── invoice.ts # Invoice schemas │ ├── misc.ts # Miscellaneous schemas │ ├── order.ts # Order schemas │ └── search.ts # Search parameters and response types ├── services/ # API services │ ├── invoices.ts # Invoice service │ ├── misc.ts # Miscellaneous services │ ├── orders.ts # Order services │ ├── products.ts # Product details service │ └── search.ts # Search functionality └── utils/ # Utility functions ├── index.ts # Error logging, etc. └── api/ # API clients ├── authenticated.ts # Authenticated API client ├── base.ts # Base API client └── public.ts # Public API client

特徴

リソース

  • bitrefill://product-types - Bitrefillで利用可能な製品タイプのリスト
  • bitrefill://categories/{type} - 特定の製品タイプで利用可能なカテゴリのリスト(例: bitrefill://categories/gift-cards

ツール

  • search - ギフトカード、eSIM、モバイルトップアップなどを検索
    • 必須: query (例: 「Amazon」、「Netflix」、「AT&T」、またはすべてを表す「*」)
    • オプション: countrylanguagelimitskipcategory
  • detail - 製品の詳細情報を取得する
    • 必須: id (製品識別子)
  • categories - 完全な製品タイプ/カテゴリマップを取得します
    • 必須パラメータはありません
  • create_invoice - 製品を購入するための新しい請求書を作成します(API キーが必要です)
    • 必須: products (請求書に含める製品の配列)
      • 各製品には次のものが必要です: product_id
      • オプションの製品フィールド: quantityvaluepackage_idphone_numberemailsend_emailsend_sms
    • 必須: payment_method (「balance」、「bitcoin」、「lightning」のいずれか)
    • オプション: webhook_urlauto_pay
  • get_invoices - オプションのフィルタリングを使用して請求書のリストを取得します
    • オプション: startlimitafterbefore
  • get_invoice - IDで特定の請求書の詳細を取得する
    • 必須: id (請求書識別子)
  • pay_invoice - 未払いの請求書を支払う(「残高」支払い方法でのみ機能します)
    • 必須: id (請求書識別子)
  • get_orders - オプションのフィルタリングを使用して注文のリストを取得します
    • オプション: startlimitafterbefore
  • get_order - IDで特定の注文の詳細を取得する
    • 必須: id (注文識別子)
  • unseal_order - IDで特定の注文のコードとPINを表示する
    • 必須: id (注文識別子)
  • get_account_balance - アカウント残高を取得する
    • 必須パラメータはありません
  • ping - Bitrefill APIが利用可能かどうかを確認する
    • 必須パラメータはありません

構成

APIキーの設定

searchcategoriesdetailを除く Bitrefill API に依存するすべてのツールを使用するには、Bitrefill API 資格情報を設定する必要があります。

  1. Bitrefillアカウントを作成する
  2. このフォームにリクエストを送信して開発者APIキーを申請してください
  3. ルートディレクトリに.envファイルを作成します( .env.exampleからコピーできます)。
  4. Bitrefill API 資格情報を追加します。
    BITREFILL_API_SECRET=your_api_key_here BITREFILL_API_ID=your_api_id_here

create_invoiceツールは、API 認証情報が設定されている場合にのみ使用できます。API 認証情報が設定されていない場合、ツールは登録されず、利用可能なツールのリストにも表示されません。

発達

依存関係をインストールします:

npm install

サーバーを構築します。

npm run build

自動リビルドを使用した開発の場合:

npm run watch

デバッグ

MCPサーバーはstdio経由で通信するため、デバッグが困難になる場合があります。パッケージスクリプトとして提供されているMCP Inspectorの使用をお勧めします。

npm run inspector

インスペクターは、ブラウザでデバッグ ツールにアクセスするための URL を提供します。

インストール

Smithery経由でインストール

Smithery経由で Claude Desktop 用の Bitrefill を自動的にインストールするには:

npx -y @smithery/cli install @bitrefill/bitrefill-mcp-server --client claude

クロードデスクトップ

次の場所にサーバー設定を追加します:

  • MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%/Claude/claude_desktop_config.json
{ "mcpServers": { "bitrefill": { "command": "npx", "args": ["-y", "bitrefill-mcp-server"], "env": { "BITREFILL_API_SECRET": "your_api_key_here", "BITREFILL_API_ID": "your_api_id_here" } } } }

クライン

  1. Cline拡張機能の設定を開く
  2. 「MCPサーバー」タブを開く
  3. 「MCPサーバーの構成」をクリックします
  4. サーバー設定を追加します:
{ "mcpServers": { "github.com/bitrefill/bitrefill-mcp-server": { "command": "npx", "args": ["-y", "bitrefill-mcp-server"], "disabled": false, "autoApprove": ["search", "detail", "categories"], "env": { "BITREFILL_API_ID": "your_api_id_here", "BITREFILL_API_SECRET": "your_api_key_here" } } } }

追加のCline構成オプション:

  • disabled : サーバーを有効にするにはfalseに設定します
  • autoApprove : 使用ごとに明示的な承認を必要としないツールのリスト

カーソル

  1. カーソル設定を開く
  2. 「機能」設定を開く
  3. 「MCPサーバー」セクションで、「新しいMCPサーバーを追加」をクリックします。
  4. 名前を選択し、「タイプ」として「コマンド」を選択します
  5. 「コマンド」フィールドに次のように入力します。
npx -y bitrefill-mcp-server
  1. (オプション) create_invoiceツールを使用している場合は、環境変数を追加します。
    • BITREFILL_API_SECRET: APIキーを入力してください
    • BITREFILL_API_ID: API IDを入力してください

ドッカー

Dockerを使ってサーバーを実行することもできます。まずはイメージをビルドします。

docker build -t bitrefill-mcp-server .

次にコンテナを実行します。

docker run -e BITREFILL_API_SECRET=your_api_key_here -e BITREFILL_API_ID=your_api_id_here bitrefill-mcp-server

開発の場合、ソース コードをボリュームとしてマウントする必要がある場合があります。

docker run -v $(pwd):/app --env-file .env bitrefill-mcp-server
-
security - not tested
A
license - permissive license
-
quality - not tested

この MCP は Bitrefill パブリック API をラップし、エージェントが Bitcoin、Ethereum、Solana などの暗号通貨を使用して製品を検索したり買い物したりできるようにします。

  1. How It Works
    1. Architecture
  2. Features
    1. Resources
    2. Tools
  3. Configuration
    1. API Key Setup
  4. Development
    1. Debugging
      1. Installation
        1. Installing via Smithery
        2. Claude Desktop
        3. Cline
        4. Cursor
        5. Docker
      ID: ee6rjptag1