Back to MCP directory
publicPublicdnsLocal runtime

bitrefill_bitrefill-mcp-server

Bitrefill MCP服务器是一个基于TypeScript的MCP协议服务,提供访问Bitrefill礼品卡、手机充值等服务的接口,支持AI助手通过MCP协议进行产品搜索、详情查询和订单管理。

article

README

🚀 Bitrefill MCP 服务器

Bitrefill MCP 服务器是一个基于 TypeScript 的服务器,它实现了模型上下文协议 (Model Context Protocol),能够向 AI 助手暴露 Bitrefill 功能。借助该服务器,用户可以方便地访问 Bitrefill 服务,实现搜索礼品卡、手机充值等操作。

smithery badge

🚀 快速开始

服务器运行步骤

  1. 安装依赖项
    npm install
    
  2. 构建服务器
    npm run build
    
  3. 开发模式(自动重建)
    npm run watch
    
  4. 调试: 使用 MCP 监视器进行调试,命令如下:
    npm run inspector
    
    该工具将提供一个浏览器 URL,用于访问调试工具。

📦 安装指南

通过 Smithery 安装

自动安装 Bitrefill 到 Claude Desktop:

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

在 Claude Desktop 中配置

在相应路径下添加服务器配置:

  • 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"
            }
        }
    }
}

在 Cline 中配置

  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"
            }
        }
    }
}

在 Cursor 中配置

  1. 打开 Cursor 设置。
  2. 进入“功能”设置。
  3. 在“MCP 服务器”部分,点击“添加新 MCP 服务器”。
  4. 输入名称并选择类型为“command”。
  5. 在“Command”字段中输入:
npx -y bitrefill-mcp-server

使用 Docker 运行

  1. 构建镜像:
docker build -t bitrefill-mcp-server .
  1. 启动容器:
docker run -e BITREFILL_API_SECRET=your_api_key_here -e BITREFILL_API_ID=your_api_id_here bitrefill-mcp-server
  1. 开发时挂载代码:
docker run -v $(pwd):/app --env-file .env bitrefill-mcp-server

📚 详细文档

项目结构

bitrefill-mcp-server/
├── src/
│   ├── main.ts                 # 主程序入口
│   ├── tools/                  # 各个工具实现
│   │   ├── search.ts           # 搜索功能
│   │   ├── detail.ts           # 详细信息查询
│   │   └── categories.ts       # 类别管理
├── .env.example               # 环境变量示例文件
└── package.json                # 项目依赖及脚本配置

环境变量

在根目录创建 .env 文件,并添加以下内容:

BITREFILL_API_SECRET=your_api_key_here
BITREFILL_API_ID=your_api_id_here

💻 使用示例

基础用法

以下是几种常见操作的使用示例:

搜索礼品卡

{
    "tool": "search",
    "args": ["bitcoin", "ethereum"]
}

查询详细信息

{
    "tool": "detail",
    "args": ["BTC"]
}

管理类别

{
    "tool": "categories",
    "command": "list"
}

⚠️ 注意事项

⚠️ 重要提示

  • 服务器默认绑定到 localhost:4012
  • 确保环境变量正确设置,以启用 create_invoice 工具。
  • 使用 Docker 时,确保已安装 Docker 并配置正确。

通过以上步骤,您可以轻松集成 Bitrefill 的 MCP 服务器,为您的应用添加强大的区块链数据查询功能。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client