Token导航 LogoToken导航TokenDH.com
Bitrefill MCP Server logo
AI代理HTTP官方级别未说明来源级核验

Bitrefill MCP Server

MCP Server

Bitrefill MCP服务器是一个参考实现,允许用户通过API购买礼品卡和eSIM,适用于AI助手集成和自定义开发。

工具数

4

提示词数

0

GitHub Stars

2

资源数

0
TypeScriptClaudeAPI集成Claude DesktopClaudeCursor

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

bitrefill

提供方

bitrefill

最后核验

2026/5/17 20:22

运行时

Node.js

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

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

详细介绍

Bitrepull MCP服务器(示例实现)

这是一个示例/参考实现。 对于生产用途,请连接到 官方托管的Bitrefill电子商务MCPhttps://api.bitrefill.com/mcp 相反。它由Bitrefill维护,支持OAuth,并公开相同的工具,而无需运行、部署或更新任何东西。 如果需要,请使用此存储库 了解如何构建Bitrefill MCP, 叉它, 扩展它,或 自宿主定制变体 在上面 Bitrellow API v2.

此服务器包装 Bitrellow API v2 (https://api.bitrefill.com/v2)使用 Authorization: Bearer ${BITREFILL_API_KEY}.只有 请求 用Zod对参数进行验证;API响应以不变的JSON文本形式返回。

使用官方远程MCP(建议用于生产)

Bitrefill电子商务MCP 由Bitrefill托管,是与ChatGPT、Claude Desktop/Code、Cursor和任何其他MCP兼容客户端集成的推荐方式。

  • OAuth(推荐)。将您的客户指向:
  https://api.bitrefill.com/mcp

您将被重定向到Bitrefill进行登录和授权访问。不需要API密钥处理。

  https://api.bitrefill.com/mcp/YOUR_API_KEY

每个客户端的设置指南: ChatGPT, 克劳德桌面, 克劳德代码, 光标.

何时使用此仓库

仅在需要时运行此本地MCP:

  • 研究Bitrefill MCP服务器的工作参考实现。
  • 分叉它以添加自定义工具、提示、验证、日志记录或路由。
  • 私有网络或空气间隙环境中的自主机。
  • 尝试使用更广泛的v2端点集(此示例公开了18个工具,而官方远程MCP有意公开了一组精心策划的7个工具;请参阅 电子商务MCP).

对于日常的“从我的人工智能助手那里购买礼品卡/eSIM”用例,更喜欢上面的托管服务器。

配置

  1. 创建API密钥: 比特币充值账户→ 开发者.
  2. 设置在环境中(或 .env 对于本地跑步):
BITREFILL_API_KEY=your_api_key_here

如果 BITREFILL_API_KEY 缺失, 无工具 已注册(v2甚至需要身份验证 ping).

工具(v1.0.0)

工具API
search-productsGET /products/search (与 q)或 GET /products (浏览)
product-detailsGET /products/{id}
buy-productsPOST /invoices
get-invoice-by-idGET /invoices/{id}
get-order-by-idGET /orders/{id}
list-invoicesGET /invoices
list-ordersGET /orders
pay-invoicePOST /invoices/{id}/pay
get-account-balanceGET /accounts/balance
check-phone-numberGET /check_phone_number
pingGET /ping
list-esim-productsGET /products/esims
get-esim-productGET /products/esims/{id}
create-esim-invoicePOST /esims
get-esim-invoiceGET /esims/invoice/{id}
pay-esim-invoicePOST /esims/invoice/{id}/pay
list-esimsGET /esims
get-esimGET /esims/{id}

与0.x相比的突破性变化: 旧snake_case工具名称(search, create_invoice, unseal_order, ...)已删除。使用上面的名字。没有 unseal_order 在v2中; GET /orders/{id} 回报 redemption_info 交付时。

资源

  • bitrefill://payment-methods:允许 payment_method 字符串用于 buy-products / create-esim-invoice
  • bitrefill://category-slugs:B2B category 产品列表/搜索的查询值
  • bitrefill://product-types:产品系列密钥
  • bitrefill://product-types/{productType}:每个家庭的蛞蝓类别

项目布局

src/
  index.ts
  types/api.ts          # Optional TS shapes for API JSON (not validated at runtime)
  constants/            # payment_method list, category slugs
  handlers/             # resources.ts, tools.ts
  schemas/              # Zod: inputs only
  services/             # API calls (search, products, invoices, orders, esims, misc)
  utils/api/            # base (BitrefillApiError), authenticated (Bearer v2)

发展

pnpm install
pnpm run build
pnpm run typecheck
pnpm run lint

烟雾测试(仅此回购的MCP)

烟雾测试始终开始 这个包裹的 服务器(node build/index.js 之后 pnpm run build).他们确实如此 打开 https://api.bitrefill.com/mcp 或任何其他远程MCP URL。

推荐:MCP客户端正在处理中(stdio到 build/index.js):

pnpm run build
pnpm run smoke

pnpm run test-services (别名)。

可选的: MCP检查员 CLI,仍然只是反对 服务器:

pnpm run build
pnpm run smoke:inspector

全部18个工具 (Inspector CLI、摘要行、故意使用的虚拟ID):

pnpm run test:inspector:all-tools

检查员使用 --tool-arg key=value (对多个键重复),而不是单个JSON blob。对于嵌套数据,在值中使用JSON,例如。\ --tool-arg 'products=[{"product_id":"x","value":10}]'.

交互式UI(仅限本地服务器):

pnpm run build
pnpm run inspector

示例:

pnpm dlx @modelcontextprotocol/inspector node build/index.js --cli --method tools/call --tool-name ping
pnpm dlx @modelcontextprotocol/inspector node build/index.js --cli --method tools/call --tool-name product-details --tool-arg id=test-gift-card-code

客户端示例(自托管示例)

提醒:对于生产,更喜欢托管 https://api.bitrefill.com/mcp (OAuth)通过下面的stdio配置。

光标/克劳德风格MCP配置,把钥匙递进去 env:

{
  "mcpServers": {
    "bitrefill": {
      "command": "npx",
      "args": ["-y", "bitrefill-mcp-server"],
      "env": {
        "BITREFILL_API_KEY": "your_api_key_here"
      }
    }
  }
}

码头工人例如。 -e BITREFILL_API_KEY=...--env-file .env.

托管远程MCP (不安装,推荐):

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

文档

许可证

麻省理工学院

目录标签

目录标签

TypeScriptClaudeAPI集成电商本地部署礼品卡eSIMAI助手

支持客户端

Claude DesktopClaudeCursor

接入字段

传输方式(transport,传输协议)

HTTP

鉴权方式(authType,认证方式)

oauth

运行时(runtime,运行环境)

Node.js

部署方式(deploymentType,部署类型)

remote-capable

工具数量(toolCount,工具数)

4

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

HTTPoauthremote-capable

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP