Bitrefill MCP Server

Bitrefill MCP Server

site icon
2025.04.04 0
TypeScript礼品卡服务手机充值服务金融服务
Bitrefill MCP Server 是一个基于 TypeScript 的 MCP 服务器,提供对 Bitrefill 服务的访问,允许用户搜索礼品卡、手机充值等服务。该服务器实现了模型上下文协议(MCP),将 Bitrefill 的功能暴露给 AI 助手。
View on GitHub

Overview

基本能力

产品定位

Bitrefill MCP Server 是一个连接 Bitrefill 服务的中间件,通过 MCP 协议为 AI 助手提供访问 Bitrefill 服务的功能。

核心功能

  1. 资源访问
  2. bitrefill://product-types:列出 Bitrefill 上可用的产品类型
  3. bitrefill://categories/{type}:列出特定产品类型的可用类别

  4. 工具集

  5. search:搜索礼品卡、esims、手机充值等
  6. detail:获取产品详细信息
  7. categories:获取完整的产品类型/类别映射
  8. create_invoice:创建购买产品的发票(需要 API 密钥)
  9. get_invoices:检索发票列表
  10. get_invoice:按 ID 检索特定发票的详细信息
  11. pay_invoice:支付未付发票
  12. get_orders:检索订单列表
  13. get_order:按 ID 检索特定订单的详细信息
  14. unseal_order:显示订单的代码和 PIN
  15. get_account_balance:检索账户余额
  16. ping:检查 Bitrefill API 是否可用

适用场景

  1. 通过 AI 助手搜索和购买 Bitrefill 上的产品
  2. 管理 Bitrefill 账户的发票和订单
  3. 查询账户余额

使用教程

使用依赖

  1. Node.js 环境
  2. Bitrefill API 密钥(用于完整功能)

安装教程

  1. 安装依赖:
npm install
  1. 构建服务器:
npm run build
  1. 开发模式(自动重建):
npm run watch
  1. 通过 Smithery 安装:
npx -y @smithery/cli install @bitrefill/bitrefill-mcp-server --client claude
  1. 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

调试方式

  1. 使用 MCP Inspector 进行调试:
npm run inspector
  1. 配置环境变量:
BITREFILL_API_SECRET=your_api_key_here
BITREFILL_API_ID=your_api_id_here

许可证

该项目遵循 MIT 开源许可条款,请参阅 MIT 了解完整条款。