Mcp Flutterwave

io.github.bajoski34由 GitHub 账号 bajoski34 发布v1.2.0更新于 Oct 24, 2026

MCP Server to interact with Flutterwave APIs.

已验证STDIO仅桌面金融商业与电商

概览

AI 生成的概览

一个本地 MCP 服务器,让 AI 助手调用 Flutterwave 支付 API:结账链接、卡与移动支付扣款、转账、虚拟账户、账单、外汇与稳定币。

可以做什么
创建和停用托管结账支付链接,并通过银行卡、银行账户、移动货币、M-Pesa 或 USSD 向客户扣款,涵盖 PIN、AVS、3DS 和 OTP 流程及 OTP 校验。按 ID 或参考号查询交易、查看事件时间线并重发失败的 webhook。发起转账、管理收款人,创建或列出付款计划。创建、查询和更新虚拟账户,列出批量批次。查询并支付账单(仅尼日利亚)及查看账单状态。申请外汇报价并执行交易,进行 BVN 验证、银行账户解析和卡 BIN 查询,以及在 Polygon 上发送或兑换 USDC/USDT。
适用场景
适合让助手端到端操作 Flutterwave 商户账户:收款、查询交易状态、付款、通过虚拟账户收款、支付尼日利亚账单、兑换货币或转移稳定币。若只是只读查看其他支付服务商的数据,则无需使用。
运行要求
通过 stdio 在本地运行,由 Claude Desktop 等 MCP 客户端启动;npm/npx 包需要 Node.js 20 或更高版本,也可使用 Docker。需要 Flutterwave 密钥,放在环境变量 FLW_SECRET_KEY 中;银行卡扣款还需 FLW_ENCRYPTION_KEY。需要访问 Flutterwave v3 API 的网络。通过 --tools 参数启用工具(all 或逗号分隔列表)。
安装前请注意
密钥和加密密钥可完全访问真实商户账户,且这些工具会动用真实资金:扣款、转账、账单支付、外汇交易和稳定币转账。卡信息及 PIN/OTP 会经过助手,BVN 验证会返回敏感身份数据。外汇交易最低 1,000 美元,报价 5 分钟内失效。建议用 --tools 限制启用的工具,并在确认前逐项核对操作。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Mcp Flutterwave,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

mcp-flutterwave

[CI] [npm version] [npm downloads] [Docker] [License: MIT] [Node.js] [MCP]

An MCP (Model Context Protocol) server that enables AI assistants to interact with the Flutterwave API — create payment links, charge customers directly, manage transfers, collect via virtual accounts, pay bills, and more.

Note: This server currently targets the Flutterwave v3 API. Support for v4 is coming soon.

Also ships with a built-in web app that connects to the MCP server and lets you talk to a Claude-powered Flutterwave assistant directly in your browser.


Contents


Features

  • Checkout — Create hosted payment links and disable them
  • Direct Charges — Charge customers via card, bank account, mobile money, M-Pesa, or USSD
  • Full card auth flow — PIN, AVS (Address Verification), 3D Secure redirect, and OTP validation all handled automatically
  • Charge Validation — Validate OTP-based charges with a dedicated tool
  • Transactions — Verify by ID or reference, view event timeline, resend failed webhooks
  • Transfers — Initiate single transfers, manage beneficiaries
  • Payment Plans — Create and retrieve subscription plans
  • Virtual Accounts — Generate dedicated account numbers for NGN and GHS bank transfer collection (static or dynamic)
  • Bill Payments — Pay airtime, data, cable TV, electricity, internet bills and more (Nigeria)
  • FX Trade — Convert between NGN, GHS, and USD with live quotes (RFQ → trade in two steps)
  • Verification — BVN identity verification, bank account name resolution, and card BIN lookup
  • Stablecoins — Send USDC/USDT to Polygon wallets, or convert NGN/USD fiat into stablecoins
  • Rich UI — Every tool returns a branded HTML card rendered inline in supported clients
  • Web App — A standalone browser chat interface powered by Claude + this MCP server

Installation

npm

bash
npm install -g mcp-flutterwave

npx (no install needed)

bash
npx mcp-flutterwave --tools=all

Docker

Pull the image:

bash
docker pull ghcr.io/bajoski34/mcp-flutterwave:latest

The server communicates over stdio, so it must be launched by an MCP client — not run standalone. Configure Claude Desktop to use the Docker image as the MCP server:

json
{  "mcpServers": {    "flutterwave": {      "command": "docker",      "args": [        "run", "--rm", "-i",        "-e", "FLW_SECRET_KEY=YOUR_SECRET_KEY",        "-e", "FLW_ENCRYPTION_KEY=YOUR_ENCRYPTION_KEY",        "ghcr.io/bajoski34/mcp-flutterwave:latest"      ]    }  }}

The -i flag keeps stdin open so Claude Desktop can communicate with the server over stdio.

Requirements: Node.js 20 or later (for npm/npx).


Available Tools

Checkout

ToolDescription
create_checkoutCreate a hosted Flutterwave payment link
disable_checkoutDisable an existing payment link

Direct Charges

ToolDescription
charge_cardDirectly charge a debit or credit card — handles PIN, AVS, 3DS, and OTP flows
charge_bank_accountDebit a bank account (NGN / GHS)
charge_mobile_moneyMobile money — Ghana, Uganda, Rwanda, Zambia, Francophone Africa
charge_mpesaM-Pesa charge (KES)
charge_ussdUSSD charge (NGN)
validate_chargeValidate a pending charge using OTP

Transactions

ToolDescription
read_transactionGet transaction details by ID
read_transaction_with_referenceGet transaction details by tx_ref
read_transaction_timelineView the event timeline for a transaction
resend_transaction_webhookResend a failed webhook

Transfers

ToolDescription
create_transferInitiate a bank transfer
create_beneficiarySave a new transfer beneficiary
list_beneficiariesList all saved beneficiaries

Payment Plans

ToolDescription
create_payment_planCreate a recurring payment plan
get_payment_plansList payment plans with optional filters

Virtual Accounts

ToolDescription
create_virtual_accountCreate a dedicated bank account number for a customer (NGN or GHS)
get_virtual_accountRetrieve a virtual account's status and details by order_ref
update_virtual_accountLink or update the BVN on an NGN virtual account
list_virtual_account_bulkList all accounts created in a bulk batch

Bill Payments

ToolDescription
get_bill_categoriesList available bill categories (AIRTIME, CABLEBILLS, UTILITYBILLS, etc.)
get_bill_providersList billers/providers for a category
get_bill_itemsList payable items for a specific biller
validate_bill_customerValidate a customer account before payment (meter number, smartcard, etc.)
pay_billSubmit a bill payment
get_bill_statusCheck payment status and retrieve prepaid tokens (electricity)

FX Trade

ToolDescription
request_fx_quoteSubmit a Request For Quote (RFQ) for a currency conversion
get_fx_quotePoll the quote status — wait for READY before trading
initiate_fx_tradeLock in a READY quote and execute the trade
get_fx_tradePoll trade status until SETTLED or FAILED

Verification

ToolDescription
initiate_bvn_verificationBegin a BVN identity check — returns a single-use customer consent URL
get_bvn_detailsRetrieve full BVN identity data after consent is given
resolve_bank_accountLook up the account holder name for a bank account number
verify_card_binLook up card brand, type, issuer, and country from the first 6 digits

Stablecoins

ToolDescription
get_stablecoin_feeGet the transfer fee before sending — shows net amount the recipient receives
send_stablecoinSend USDC or USDT to a Polygon wallet address
convert_to_stablecoinConvert NGN or USD fiat balance into USDC or USDT

Card Charge Flow

Direct card charges are multi-step. The charge_card tool handles every stage automatically and tells Claude what to do next.

1. charge_card(card details)        │        ├─ mode: "pin"        → ask customer for PIN        │       charge_card(same params + authorization: { mode: "pin", pin: "..." })        │               │        │               ├─ mode: "otp"      → validate_charge(flw_ref, otp)        │               └─ mode: "redirect" → send customer to 3DS URL        │        ├─ mode: "avs_noauth" → ask customer for billing address        │       charge_card(same params + authorization: { mode: "avs_noauth", city, address, ... })        │               │        │               ├─ mode: "otp"      → validate_charge(flw_ref, otp)        │               └─ mode: "redirect" → send customer to 3DS URL        │        ├─ mode: "redirect"   → send customer to 3DS URL, then read_transaction to verify        │        └─ (none)             → charge complete — read_transaction to verify

Authorization parameters

When a second call is needed, pass authorization alongside the original card details:

json
// PIN flow{ "authorization": { "mode": "pin", "pin": "3310" } }
// AVS flow{ "authorization": { "mode": "avs_noauth", "city": "Lagos", "address": "12 Victoria Island", "state": "LA", "country": "NG", "zipcode": "100001" } }

AMEX cards

American Express transactions require the card_holder_name field in addition to standard card details.

Payload encryption

Card payloads are encrypted with 3DES-ECB using your FLW_ENCRYPTION_KEY before they are sent to Flutterwave (PCI DSS requirement). The encryption is handled automatically — set the environment variable and the server does the rest.


Virtual Accounts

Virtual accounts give each customer a dedicated bank account number to make transfers into. Flutterwave notifies your webhook when a payment arrives.

FeatureNGNGHS
Dynamic (one-time)✓ — set amount, expires in ~1 hr✓ — use frequency and duration
Static (reusable)✓ — is_permanent: true, BVN required✓ — is_permanent: true
BVN requiredStatic accounts onlyNo

NGN static account

json
{  "email": "[email protected]",  "currency": "NGN",  "tx_ref": "VA-NGN-001",  "is_permanent": true,  "bvn": "22415929481"}

GHS dynamic account

json
{  "email": "[email protected]",  "currency": "GHS",  "tx_ref": "VA-GHS-001",  "amount": 500,  "frequency": 5,  "duration": 7}

After creation, save the order_ref — it is the key for retrieving or updating the account via get_virtual_account and update_virtual_account.


Bill Payment Flow

Bill payments follow a 6-step discovery flow. Skip validate_bill_customer for airtime and mobile data.

1. get_bill_categories        ↓ choose a category (e.g. UTILITYBILLS)
2. get_bill_providers(category)        ↓ get biller_code (e.g. "BIL127" for IKEDC)
3. get_bill_items(biller_code)        ↓ get item_code and amount info
4. validate_bill_customer(item_code, customer_id)   ← skip for AIRTIME / MOBILEDATA        ↓ confirm customer name and details
5. pay_bill(biller_code, item_code, customer_id, amount)        ↓ returns reference
6. get_bill_status(reference)        ↓ confirms completion          for electricity: prepaid token is in extra.token — share it with the customer

Supported categories

CodeDescription
AIRTIMEMobile airtime top-up
MOBILEDATAData bundle purchase
CABLEBILLSCable TV (DSTV, GOTV, StarTimes)
INTSERVICEInternet service subscriptions
UTILITYBILLSElectricity (prepaid & postpaid)
TAXGovernment tax payments
DONATIONSCharitable donations
TRANSLOGTransport / logistics
DEALPAYDeal payments
RELINSTReligious institutions
SCHPBSchool / education payments

Bill payments are available for Nigeria only (country: NG).


FX Trade Flow

Currency conversion uses a two-step quote-then-trade flow. Quotes are valid for 5 minutes and available weekdays only (Monday–Friday).

1. request_fx_quote(base_currency, target_currency, quantity)        ↓ returns quote_id, status: NEW
2. get_fx_quote(quote_id)   ← poll until READY or FAILED        ↓ READY: contains rate, approved_quantity, total_value, expiry
3. initiate_fx_trade(quote_id, narration)        ↓ locks in rate, returns trade_id, status: NEW
4. get_fx_trade(trade_id)   ← poll until SETTLED or FAILED        ↓ SETTLED: converted funds credited to target currency wallet instantly

Supported currency pairs

PairSellReceive
NGN/USDNigerian NairaUS Dollar
GHS/USDGhanaian CediUS Dollar
USD/NGNUS DollarNigerian Naira

Quote statuses

StatusMeaning
NEWQuote is being priced
READYRate locked — call initiate_fx_trade now
PROCESSINGA trade has been initiated on this quote
EXPIRED5-minute window passed — submit a new quote
FAILEDPair unsupported, minimum not met, or account limit exceeded

Trade statuses

StatusMeaning
NEWTrade queued
PENDINGExecuting
SETTLEDFunds exchanged and credited to target currency wallet
FAILEDInsufficient balance or processing error

Key constraints

  • Minimum trade: $1,000 USD equivalent in the base currency
  • Quote lifetime: 5 minutes from issuance (READY state)
  • One-time use: Each quote can only be used for one trade
  • Approved quantity: May differ from requested quantity due to liquidity or account limits — always use approved_quantity for reconciliation
  • Account enablement: Contact [email protected] to enable FX trading on your account

Verification

Bank Account Resolution

Verify a recipient's account details before sending a transfer. Always show the resolved name to the user before proceeding.

json
{ "account_number": "0690000040", "account_bank": "044" }

Common bank codes: 044 Access Bank · 057 Zenith Bank · 058 GTBank · 033 UBA · 011 First Bank

Card BIN Lookup

Identify card metadata from the first 6 digits of a card number.

json
{ "bin": "553188" }// → { brand: "MASTERCARD", type: "CREDIT", issuer: "NEXUS MERCHANT BANK", country: "NIGERIA" }

AMEX cards identified via BIN require the card_holder_name field when calling charge_card.

BVN Verification (Nigeria)

Two-step consent flow — customer must approve data sharing on the NIBSS portal.

1. initiate_bvn_verification(bvn, firstname, lastname, redirect_url)        ↓ returns reference + single-use consent URL
2. Customer visits consent URL → approves data sharing on NIBSS portal        ↓ webhook (bvn.completed) fires OR poll:
3. get_bvn_details(reference)        ↓ returns name, DOB, gender, phone, NIN, state of origin, watchlist status

Requires Flutterwave account enablement — contact [email protected]. If the customer has already consented, initiate_bvn_verification returns url: null and you can call get_bvn_details immediately.


Stablecoins

Send USDC or USDT over the Polygon network, or convert NGN/USD fiat balances into stablecoins. Always call get_stablecoin_fee first so the user knows the net amount the recipient will receive.

Wallet-to-wallet transfer

1. get_stablecoin_fee(amount, currency: "USDT", debit_currency: "USDT")        ↓ shows fee and net amount
2. send_stablecoin(wallet_address, amount, currency, debit_currency)        ↓ returns reference and transfer status

Fiat-to-stablecoin conversion

1. get_stablecoin_fee(amount, currency: "USDC", debit_currency: "NGN")        ↓ shows fee (percentage-based) and net USDC amount
2. convert_to_stablecoin(merchant_id, amount, currency, debit_currency: "NGN")        ↓ deducts NGN from your fiat wallet, credits USDC/USDT

Key constraints

ConstraintDetail
NetworkPolygon only — no Tron, Solana, or Stellar
CoinsUSDC and USDT
Wallet formatEVM address: 0x + 40 hex characters (42 total)
Fiat sourcesNGN or USD for convert_to_stablecoin; stablecoin must match currency for send_stablecoin
Fee typeFlat fee for same-currency; percentage fee for fiat → stablecoin

Web App

The app/ directory contains a standalone browser chat interface that wraps this MCP server with a Claude-powered conversation loop.

[Flutterwave MCP-UI components: transaction, payment link and transfer cards]

How it works

Browser  →  POST /api/chat               ↓           Claude (Sonnet) — all MCP tools injected via advanced-tool-use beta               ↓  tool_use           MCP Server (this repo, spawned via stdio)               ↓           Flutterwave API

The web app uses three Anthropic Advanced Tool Use features:

  • Tool Search — non-core tools are deferred and loaded on demand, reducing token usage by ~85%
  • Programmatic Tool Calling — Claude can write code that calls multiple tools in sequence without inflating the conversation context
  • Tool Use Examples — curated input_examples for every tool improve parameter accuracy from ~72% to ~90%

The app returns a rich branded UI card for every tool response — checkout links, transaction details, charge states, transfer summaries, virtual accounts, bill receipts — rendered inline in the chat.

Running the web app

Prerequisites

VariableRequiredDescription
FLW_SECRET_KEYYesYour Flutterwave secret key
FLW_ENCRYPTION_KEYFor card chargesYour Flutterwave encryption key
ANTHROPIC_API_KEYYesYour Anthropic API key

Get your keys from the Flutterwave Dashboard under Settings → API Keys.
Get your Anthropic key from the Anthropic Console.

Build and start

bash
# Clone and installgit clone https://github.com/bajoski34/mcp-flutterwave.gitcd mcp-flutterwavenpm install
# Build both the MCP server and the web appnpm run build:all
# StartANTHROPIC_API_KEY=sk-ant-... FLW_SECRET_KEY=FLWSECK_... npm run start:app

Then open http://localhost:3000.

Available scripts

ScriptDescription
npm run buildBuild the MCP server only
npm run build:appBuild the web app only
npm run build:allBuild everything
npm run start:appStart the web app (requires a prior build)
npm run dev:appBuild everything then start the web app
npm testRun the test suite

Port

Set the PORT environment variable to change from the default 3000.


MCP Server Setup

Via npm

bash
npm install -g mcp-flutterwave

Via GitHub

bash
git clone https://github.com/bajoski34/mcp-flutterwave.gitcd mcp-flutterwavenpm installnpm run build

Environment variables

VariableRequiredDescription
FLW_SECRET_KEYYesYour Flutterwave secret key
FLW_ENCRYPTION_KEYFor card chargesYour Flutterwave encryption key (from Dashboard → Settings → API)

Usage with Claude Desktop

Add the following to your claude_desktop_config.json. See the MCP quickstart for details.

Pass --tools=all to enable every tool, or supply a comma-separated list to restrict which tools are registered.

Via npm

json
{  "mcpServers": {    "flutterwave": {      "command": "mcp-flutterwave",      "args": ["--tools=all"],      "env": {        "FLW_SECRET_KEY": "YOUR_SECRET_KEY",        "FLW_ENCRYPTION_KEY": "YOUR_ENCRYPTION_KEY"      }    }  }}

Via local build

json
{  "mcpServers": {    "flutterwave": {      "command": "node",      "args": [        "/path/to/mcp-flutterwave/build/index.js",        "--tools=all"      ],      "env": {        "FLW_SECRET_KEY": "YOUR_SECRET_KEY",        "FLW_ENCRYPTION_KEY": "YOUR_ENCRYPTION_KEY"      }    }  }}

Selective tools

json
"args": [  "--tools=create_checkout,read_transaction,create_transfer"]

Accepted tool names (use all to enable everything):

create_checkout            disable_checkoutread_transaction           read_transaction_with_referenceread_transaction_timeline  resend_transaction_webhookcreate_transfer            create_beneficiary            list_beneficiariescreate_payment_plan        get_payment_planscharge_card                charge_bank_account           charge_mobile_moneycharge_mpesa               charge_ussd                   validate_chargecreate_virtual_account     get_virtual_account           update_virtual_accountlist_virtual_account_bulkget_bill_categories        get_bill_providers            get_bill_itemsvalidate_bill_customer     pay_bill                      get_bill_statusrequest_fx_quote           get_fx_quoteinitiate_fx_trade          get_fx_tradeinitiate_bvn_verification  get_bvn_detailsresolve_bank_account       verify_card_binget_stablecoin_fee         send_stablecoin               convert_to_stablecoin

MCP-UI Components

Every tool returns a rich HTML card alongside its text response, powered by @mcp-ui/server. The cards use Flutterwave's design tokens — navy #0A0E27, deep orange #FF5804, brand orange #F5A623, and the system sans-serif typeface.

Card charge UI states

StateCard shown
PIN requiredStep-by-step instructions, transaction reference
AVS requiredRequired billing address fields as chips
3DS redirectBank authentication URL with a direct link
OTP requiredBank message, flw_ref to pass to validate_charge
CompletedAmount, status badge, transaction and Flutterwave references

Virtual account UI

The virtual account card shows the bank account number in a large, prominent box alongside the bank name, account type (Static / Dynamic), currency, expiry date, and order reference.

Bill payment UI

ToolCard shown
pay_billBill receipt — biller, item, customer ID, amount, status
get_bill_statusStatus card with prepaid token (electricity) in large monospace text, with a share note

Verification UI

ToolCard shown
initiate_bvn_verificationConsent card — customer name (BVN last-4 only), single-use consent link with open button, step-by-step instructions
get_bvn_detailsIdentity card — name, DOB, gender, phone, NIN, state of origin; BVN partially masked; red watchlist badge if flagged
resolve_bank_accountGreen verified card — account name in large text with account number and bank code
verify_card_binBrand-coloured card (Visa blue / Mastercard red / Amex blue / dark for others) — brand, type badge, issuer, country

Stablecoin UI

ToolCard shown
get_stablecoin_feeBlue-themed fee card — coin pair, flat fee or percentage breakdown, net amount the recipient receives
send_stablecoinTransfer card — truncated wallet address, amount, status badge
convert_to_stablecoinConversion card — fiat debit currency, target stablecoin, merchant ID, status

FX trade UI

Both request_fx_quote/get_fx_quote and initiate_fx_trade/get_fx_trade return dark navy-themed cards:

StateCard shown
Quote NEW / PROCESSINGInstrument badge, status pill, poll instruction
Quote READYExchange rate, approved quantity, received amount, expiry, call-to-action
Quote FAILED / EXPIREDError message with reason
Trade NEW / PENDINGAmount in target currency, poll instruction
Trade SETTLEDGreen settled banner, target currency amount, recipient, wallet credit note
Trade FAILEDRed failure banner with response_message

Cards are compatible with:

  • Flutterwave Web App (this repo's app/) — rendered inline in the chat
  • MCP Inspector — for testing during development
  • Any MCP client that supports the resource content type with HTML

Contributing

We welcome contributions! Please read our Contributing Guide for details on how to get started, development guidelines, and how to submit pull requests.


Changelog

All notable changes are documented in GitHub Releases.


Security

If you discover a security vulnerability, please do not open a public issue. Instead, email [email protected] directly. We will respond as quickly as possible.


License

MIT © Abraham Olaobaju

See LICENSE for the full text.

来源:README.md,提交 c4a97be

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.2.0最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分