Interswitch Mcp Server

io.github.Dairus01由 GitHub 账号 Dairus01 发布v0.1.3更新于 Oct 27, 2026

MCP server for Interswitch APIs: payments, transfers, Verve cards, airtime, and paycodes.

概览

AI 生成的概览

本地运行的 MCP 服务器,让 AI 助手调用 Interswitch 的支付、转账、银行卡、话费、付款码、借贷与代理银行 API。

可以做什么
  • 发起支付、创建支付链接、查询交易状态、按参考号获取交易,以及发起和查询退款
  • 列出账单机构与套餐、校验客户、支付账单与增值服务账单、话费充值和申请 ePIN
  • 发起单笔或批量银行转账、解析银行账户、列出银行代码、重新查询转账
  • 创建、查询和停用无卡付款码,包括批量创建
  • 搜索交易、获取交易详情,以及 Card 360 的制卡、PIN、冻结解冻、余额与卡片查询操作
  • 申请小额贷款、薪资借贷与价值融资,执行信用查询,读取客户人口统计与财务历史
适用场景
适合需要在桌面 MCP 客户端中通过助手操作 Interswitch 支付与金融科技 API 的场景,例如查询交易状态、解析账户,或先在沙箱中测试支付流程再接触生产环境。
运行要求
通过 npx 或全局 npm 安装在本机运行,需要 Node.js v18+ 以及访问 Interswitch 的网络。需要 INTERSWITCH_CLIENT_ID 与 INTERSWITCH_CLIENT_SECRET,以及商户号、payable 码、发起实体码、终端号等业务标识;Card 360、Transaction Search 与代理银行各有独立凭据。INTERSWITCH_ENV 选择 sandbox(默认)或 production。
安装前请注意
生产模式下若 INTERSWITCH_READ_ONLY=false,可进行真实资金操作:转账、退款、账单支付、代理取现、付款码与卡片操作都是真实写入。写入类与高风险读取类工具需传 confirm: true,确认前应有人工复核。它涉及金融凭据,包括 INTERSWITCH_CLIENT_SECRET、CARD360_CLIENT_SECRET、CARD360_RSA_PUBLIC_KEY 与 TRANSACTION_SEARCH_CLIENT_SECRET;部分工具还接受密钥用于计算 MAC。项目处于公开预览阶段。

安装

在 SourceWeft 中

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

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

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Interswitch MCP Server

A Model Context Protocol (MCP) server that enables AI assistants to interact with Interswitch APIs for payments, transfers, VAS, cardless paycodes, Transaction Search, Card 360, lending, payouts, agency banking, and fintech card-processing utilities.

[!WARNING] Public Preview: This MCP server is currently in public preview. It supports both Interswitch sandbox and production environments, so use cautiously, start with read-only mode, and report any issues you encounter.

Quick Start

Install and run via npm (recommended):

bash
npx interswitch-mcp-server

Or install globally:

bash
npm install -g interswitch-mcp-serverinterswitch-mcp-server

Or for local development, clone and build:

bash
git clone https://github.com/Dairus01/Interswitch-mcp-server.gitcd Interswitch-mcp-servernpm installnpm run build

Then configure your MCP client to use the server (see Client Integration).

Requirements

  • Node.js v18+
  • npm or yarn
  • Interswitch API credentials for the domains you want to use
  • Required Interswitch merchant, payable, initiating entity, terminal, or domain-specific identifiers for your use case

Configuration Options

Environment VariablePurpose
INTERSWITCH_CLIENT_IDCore OAuth2 client ID for payments, transfers, VAS, cardless, lending, transfer service, and payouts
INTERSWITCH_CLIENT_SECRETCore OAuth2 client secret
INTERSWITCH_ENVAPI environment: sandbox or production; defaults to sandbox
INTERSWITCH_READ_ONLYSet true to block write tools before any API call; defaults to false
INTERSWITCH_REQUIRE_CONFIRMATIONCompatibility setting. Tool confirmation is enforced by tool mode and risk.
INTERSWITCH_MERCHANT_CODEMerchant code for payment operations that require it
INTERSWITCH_PAYABLE_CODEPayable code for payment operations that require it
INTERSWITCH_INITIATING_ENTITY_CODEInitiating entity code for transfer operations
INTERSWITCH_TERMINAL_IDTerminal ID for operations that require terminal identification
CARD360_CLIENT_IDSeparate Card 360 client ID
CARD360_CLIENT_SECRETSeparate Card 360 client secret
CARD360_RSA_PUBLIC_KEYRSA public key used to encrypt Card 360 PIN payloads locally
TRANSACTION_SEARCH_CLIENT_IDSeparate Transaction Search client ID
TRANSACTION_SEARCH_CLIENT_SECRETSeparate Transaction Search client secret
INTERSWITCH_AGENCY_MERCHANT_IDAgency Banking merchant identifier
INTERSWITCH_AGENCY_TERMINAL_IDAgency Banking terminal identifier
INTERSWITCH_LEGACY_AUTH_ENABLEDEnables legacy InterswitchAuth-backed flows where supported
DEBUGEnables debug logging. Avoid using this in production.

You can select the API environment with INTERSWITCH_ENV:

  1. Sandbox (default): INTERSWITCH_ENV=sandbox
  2. Production: INTERSWITCH_ENV=production

Security note: Production mode uses real Interswitch production endpoints. If INTERSWITCH_ENV=production, valid production credentials are configured, INTERSWITCH_READ_ONLY=false, and a write tool is called with confirm: true, the server can make real production API calls.

For safer first-time setup, start in read-only mode:

bash
INTERSWITCH_ENV=production \INTERSWITCH_READ_ONLY=true \INTERSWITCH_CLIENT_ID=your_production_client_id \INTERSWITCH_CLIENT_SECRET=your_production_client_secret \interswitch-mcp-server

When you are authorized and ready to allow live writes, set:

bash
INTERSWITCH_READ_ONLY=false

Client Integration

The Interswitch MCP Server works with any MCP-compatible client. Below is the standard configuration schema used by most clients (Claude Desktop, ChatGPT Desktop, Cursor, Windsurf, VS Code, Claude Code, etc.).

Using npm (recommended)

For npm-installed server:

json
{  "mcpServers": {    "interswitch": {      "command": "npx",      "args": ["-y", "interswitch-mcp-server"],      "env": {        "INTERSWITCH_ENV": "sandbox",        "INTERSWITCH_READ_ONLY": "true",        "INTERSWITCH_CLIENT_ID": "your_client_id",        "INTERSWITCH_CLIENT_SECRET": "your_client_secret",        "INTERSWITCH_MERCHANT_CODE": "your_merchant_code",        "INTERSWITCH_PAYABLE_CODE": "your_payable_code",        "INTERSWITCH_INITIATING_ENTITY_CODE": "your_entity_code"      }    }  }}

For production, change the environment values intentionally:

json
{  "mcpServers": {    "interswitch": {      "command": "npx",      "args": ["-y", "interswitch-mcp-server"],      "env": {        "INTERSWITCH_ENV": "production",        "INTERSWITCH_READ_ONLY": "true",        "INTERSWITCH_CLIENT_ID": "your_production_client_id",        "INTERSWITCH_CLIENT_SECRET": "your_production_client_secret",        "INTERSWITCH_MERCHANT_CODE": "your_production_merchant_code",        "INTERSWITCH_PAYABLE_CODE": "your_production_payable_code",        "INTERSWITCH_INITIATING_ENTITY_CODE": "your_production_entity_code"      }    }  }}

Using a local build

If you've cloned and built the server locally:

json
{  "mcpServers": {    "interswitch": {      "command": "node",      "args": ["/path/to/Interswitch-mcp-server/dist/index.js"],      "env": {        "INTERSWITCH_ENV": "sandbox",        "INTERSWITCH_READ_ONLY": "true",        "INTERSWITCH_CLIENT_ID": "your_client_id",        "INTERSWITCH_CLIENT_SECRET": "your_client_secret"      }    }  }}

[!IMPORTANT] When setting command: "node", you should ensure you're using Node v18+. If you are using a package manager, you might need to get the path of your Node binary by running this command in your CLI:

Linux and MacOS

sh
which node

Windows

sh
where node

Once you have the path, use it as the value of the MCP Server command in the JSON configuration. e.g., command: "path/to/installation/bin/node"

Where to add this configuration

ClientConfig file location
VS Code.vscode/mcp.json
Claude Desktopclaude_desktop_config.json
ChatGPT DesktopMCP settings in app preferences
Cursor.cursor/mcp.json or global MCP settings
WindsurfMCP configuration in settings
Claude Code~/.claude/mcp.json or project-level .mcp.json

How It Works

The Interswitch MCP Server exposes Interswitch API domains to AI assistants through dedicated MCP tools. The server does not parse an OpenAPI file at runtime; instead, it provides curated, typed tools for the supported Interswitch domains.

Architecture Diagram

mermaid
graph TD    subgraph MCP Server        A[Interswitch MCP Server]        B[Tool Registry]        C[Resource Registry]    end
    subgraph Auth Layer        D[OAuth2 Passport Manager]        E[Card 360 Token Manager]        F[Transaction Search Manager]        G[Agency Banking Token Manager]        H[Legacy Auth Manager]    end
    subgraph Core Services        I[Payments Service]        J[VAS Services]        K[Transfers Service]        L[Cardless Services]        M[Transaction Search Service]        N[Card 360 Service]        O[Lending Service]        P[Transfer Service]        Q[Payouts Service]        R[Agency Service]        S[Fintech Utilities]    end
    subgraph Safety Layer        J1[Confirmation Gate]        J2[Read-Only Mode]        J3[Redaction System]        J4[Audit Logging]    end
    A --> B    A --> C    A --> D    A --> E    A --> F    A --> G    A --> H    B --> I    B --> J    B --> K    B --> L    B --> M    B --> N    B --> O    B --> P    B --> Q    B --> R    B --> S    I --> J1    J --> J1    K --> J1    L --> J1    M --> J1    N --> J1    O --> J1    P --> J1    Q --> J1    R --> J1    S --> J1    J1 --> J2    J2 --> J3    J3 --> J4    J4 --> Z[External APIs]        style MCP Server fill:#f0f8ff,stroke:#333,stroke-width:2px    style Auth Layer fill:#e6f7e6,stroke:#333,stroke-width:1px    style Core Services fill:#f9f9f9,stroke:#666,stroke-width:1px    style Safety Layer fill:#fff0f0,stroke:#c33,stroke-width:1px    style Z fill:#d4d4d4,stroke:#999,stroke-dasharray: 5 5

Each tool:

  1. Validates its input with a strict schema
  2. Applies confirmation and read-only safety gates
  3. Selects the configured sandbox or production base URL
  4. Uses the correct authentication system for the domain
  5. Calls the Interswitch API only when the tool is invoked
  6. Redacts sensitive fields from returned data
  7. Returns a normalized MCP response

Authentication systems

Auth systemUsed for
OAuth2 PassportCore payments, transfers, VAS, cardless, lending, transfer service, and payouts
Card 360 token managerCard 360 operations
Transaction Search token managerTransaction Search APIs
Legacy InterswitchAuthLegacy signed request flows where enabled
Agency Banking token managerAgency Banking SOAP/XML token flow

Available Tools

ToolDescription
isw_initialize_paymentInitialize a payment request
isw_get_transaction_statusCheck transaction status
isw_get_transaction_by_referenceFetch transaction by reference
isw_create_payment_linkCreate a payment link
isw_initiate_refundInitiate a refund; high-risk write
isw_get_refund_statusCheck refund status
isw_pay_billPay a bill
isw_get_billersList billers
isw_get_biller_packagesList packages for a biller
isw_get_billers_by_categoryList billers by category
isw_get_biller_detailsFetch biller details
isw_validate_customerValidate a biller customer
isw_pay_vas_billPay a VAS bill
isw_airtime_rechargeRecharge airtime
isw_get_airtime_epinsRequest airtime ePINs
isw_single_transferSend a single bank transfer; high-risk write
isw_bulk_transferSend bulk transfers; high-risk write; max 100 transactions
isw_resolve_bank_accountResolve bank account details
isw_get_bank_codesList supported bank codes
isw_agency_banking_cashoutInitiate agency cashout; high-risk write
isw_create_paycodeCreate a cardless paycode
isw_create_bulk_paycodesCreate bulk paycodes; high-risk write; max 100 paycodes
isw_get_paycode_statusCheck paycode status
isw_deactivate_paycodeDeactivate a paycode
isw_transaction_search_quick_searchSearch transactions by quick-search fields
isw_transaction_search_reference_searchSearch by transaction reference
isw_transaction_search_bulk_searchSearch multiple transactions
isw_get_transaction_detailsFetch detailed transaction information
isw_create_cardCreate a card; high-risk write
isw_retry_card_creationRetry card creation
isw_initiate_card_data_prepInitiate card data preparation
isw_fetch_data_prep_requestFetch a data-prep request
isw_fetch_prepared_cardsFetch prepared cards
isw_bulk_card_productionStart bulk card production; high-risk write
isw_reissue_card_pinReissue a card PIN; high-risk write
isw_change_card_pinChange a card PIN; high-risk write
isw_get_pinRetrieve PIN-related response where supported; high-risk read
isw_block_cardBlock a card; high-risk write
isw_unblock_cardUnblock a card; high-risk write
isw_block_prepaid_cardBlock a prepaid card; high-risk write
isw_unblock_prepaid_cardUnblock a prepaid card; high-risk write
isw_link_card_to_accountLink a card to an account; high-risk write
isw_check_prepaid_balanceCheck prepaid card balance
isw_check_debit_balanceCheck debit card balance
isw_confirm_prepaid_sufficientConfirm prepaid sufficient balance
isw_confirm_debit_sufficientConfirm debit sufficient balance
isw_fetch_cards_by_issuerFetch cards by issuer
isw_fetch_single_card_by_panFetch a single card by PAN with redaction
isw_fetch_cards_by_accountFetch cards by account
isw_fetch_customer_card_detailsFetch customer card details
isw_fetch_request_logsFetch Card 360 request logs
isw_validate_cardValidate card data
isw_request_nano_loanRequest a nano loan; high-risk write
isw_salary_lendingStart salary lending flow; high-risk write
isw_value_financingStart value financing flow; high-risk write
isw_get_customer_demographicsFetch customer demographics
isw_get_financial_historyFetch customer financial history
isw_get_financial_history_averageFetch financial-history averages
isw_get_financial_habitsFetch customer financial habits
isw_credit_inquiryRun credit inquiry
isw_complete_creditComplete credit using OTP; high-risk write
isw_requery_transferRequery transfer status
isw_get_receiving_institutionsList payout receiving institutions
isw_get_payout_channelsList payout channels
isw_agency_get_tokenFetch/cache Agency Banking token
isw_fintech_validate_debit_payloadValidate debit payload structure
isw_fintech_validate_reversal_payloadValidate reversal payload structure
isw_fintech_validate_enquiry_payloadValidate enquiry payload structure
isw_fintech_validate_place_lien_payloadValidate place-lien payload structure
isw_fintech_validate_debit_lien_payloadValidate debit-lien payload structure
isw_fintech_compute_macCompute MAC; high-risk because it accepts secrets
isw_fintech_build_responseBuild fintech response payload; high-risk when secrets are supplied

Available Resources

ResourceURIDescription
response_codesisw://response-codesCommon Interswitch response-code reference
config_summaryisw://config-summarySafe runtime configuration summary; returns credential presence only, never secrets

Example

When you ask your AI assistant something like "Use Interswitch to initialize a 5000 NGN payment for [email protected]", here's what happens behind the scenes:

  1. The assistant selects isw_initialize_payment
  2. It passes explicit money input such as amountNaira: 5000
  3. For write operations, it must include confirm: true
  4. The server validates the request, converts the amount safely where required, authenticates with Interswitch, and calls the configured sandbox or production endpoint
  5. You get a normalized response with redacted raw data

Prompt recommendation

To get the best results when using this MCP server, be specific in your prompts and always include "Interswitch" in your requests.

Good prompts:

  • "Initialize an Interswitch payment for 50000 NGN for [email protected]."
  • "Check the Interswitch transaction status for reference order-1001."
  • "Resolve Interswitch bank account 0123456789 with bank code 058."
  • "Send an Interswitch single transfer for 1000 NGN with confirm true."
  • "Read the Interswitch response code resource."

Less effective prompts:

  • "List my transactions" (unclear which service and reference/search criteria to use)
  • "Send money" (missing beneficiary, bank, amount, and confirmation details)
  • "Pay this bill" (missing biller, package, customer, and amount details)

Being explicit ensures the LLM narrows down to the right tool quickly and reduces ambiguity.

Production Safety

This server can route to production Interswitch endpoints when INTERSWITCH_ENV=production is set. Production readiness depends on correct credentials, Interswitch account permissions, and your organization's operational controls.

Safety behavior built into the server:

  • Write tools require confirm: true
  • High-risk sensitive read tools require confirm: true
  • INTERSWITCH_READ_ONLY=true blocks all writes before any external API call
  • Low-risk reads do not require confirmation
  • Raw responses are redacted before being returned
  • Tokens and secrets are never intentionally returned in tool output
  • Card PIN payloads are encrypted locally when the required RSA public key is configured
  • Production startup warnings are written to stderr instead of silently hiding risky configuration

Recommended production rollout:

  1. Configure production credentials but keep INTERSWITCH_READ_ONLY=true
  2. Verify startup warnings and config summary
  3. Test safe read-only tools first
  4. Confirm domain credentials for the exact tools you intend to use
  5. Switch INTERSWITCH_READ_ONLY=false only when live writes are authorized
  6. Require human review before prompts that include confirm: true

Development

Run locally (without building)

For local development and testing, you can run the TypeScript source directly:

bash
npm run dev

Run with MCP Inspector

bash
npm run inspect

Build

bash
npm run build

Run tests

bash
npm test

Type-check

bash
npm run lint

Preview npm package contents

bash
npm pack --dry-run

Troubleshooting

IssueSolution
Server exits silently at startupRun it from a terminal and check stderr; verify Node v18+ and valid environment variables
Production warning appearsAdd the missing credential group, set INTERSWITCH_READ_ONLY=true, or disable DEBUG depending on the warning
Tools not appearing in clientEnsure the server is running and the client config path is correct
Write tool blockedPass confirm: true; if still blocked, check INTERSWITCH_READ_ONLY
High-risk read blockedPass confirm: true
Payment tools failConfigure INTERSWITCH_MERCHANT_CODE and INTERSWITCH_PAYABLE_CODE where required
Transfer tools failConfigure INTERSWITCH_INITIATING_ENTITY_CODE where required
Card 360 tools failConfigure CARD360_CLIENT_ID and CARD360_CLIENT_SECRET
PIN operations failConfigure a valid CARD360_RSA_PUBLIC_KEY
Transaction Search failsConfigure TRANSACTION_SEARCH_CLIENT_ID and TRANSACTION_SEARCH_CLIENT_SECRET
Agency tools failConfigure INTERSWITCH_AGENCY_MERCHANT_ID and INTERSWITCH_AGENCY_TERMINAL_ID
Request timeoutsCheck network connectivity to the configured Interswitch environment

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

See CONTRIBUTING.md for more details.

License

MIT

来源:README.md,提交 c10b0cc

工具

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

版本历史

1
  1. v0.1.3最新Sep 16, 2026

评分

已满足适用检查项的 50%

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

  • 近 30 天内可连通25 分

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

  • 已声明认证方式10 分

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

  • 已列出工具15 分

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

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