MyFatoorah MCP

io.github.kuwaitdevsPublished by GitHub account kuwaitdevsv0.1.0Updated Oct 24, 2026

Safely connect AI agents to MyFatoorah payments, invoices, payment methods, and refunds.

VerifiedSTDIODesktop onlyFinanceBusiness & Commerce

Overview

AI-generated overview

Lets an assistant work with MyFatoorah payments: list payment methods, create payment links, verify payments, read invoices, and issue refunds.

What you can do
Wraps the MyFatoorah payment API in focused tools: list enabled payment methods, create a hosted checkout or invoice link, fetch payment details by PaymentId, read invoices by InvoiceId or external identifier, create full or partial refunds, and read refund details. A restricted generic request tool allows relative /v2/ or /v3/ paths, with mutations requiring confirmation. It also exposes a configuration resource and a guided payment-link prompt.
When to use it
Use it when an assistant needs to create or verify MyFatoorah payments, inspect invoices, or process refunds from an MCP host such as Claude Desktop, Claude Code, VS Code, or Cursor. Start in the sandbox environment before pointing it at a live account.
Requirements
Runs locally over stdio as an npm package (myfatoorah-mcp) and needs Node.js 20 or newer. Requires a MyFatoorah API token in MYFATOORAH_API_TOKEN, plus optional MYFATOORAH_ENVIRONMENT (test, kuwait, uae, saudi_arabia, qatar, egypt; defaults to test) and MYFATOORAH_TIMEOUT_MS. Network access to the MyFatoorah API is required; multi-country accounts need a separate token per country.
Before you install
MYFATOORAH_API_TOKEN is a bearer credential: keep it in the host environment or a secret manager, never in source control or an agent prompt, and use a least-privilege key. Refunds move real money in live mode and require explicit approval of the exact PaymentId and amount before confirm: true. Creating payments writes data. A redirect is not proof of payment; require invoice status PAID and transaction status SUCCESS. Do not expose the stdio process as an unauthenticated network service.

Installation

In SourceWeft

  1. Open MyFatoorah MCP in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

MyFatoorah MCP

An LLM-friendly Model Context Protocol server for the MyFatoorah API. It lets Claude, VS Code, Cursor, and other MCP hosts discover payment methods, create payment links, verify payments, inspect invoices, and manage refunds through focused tools.

This is an independent community project, not an official MyFatoorah product. Test in the sandbox before using a live account.

For step-by-step host setup, Inspector testing, agent prompts, payment verification, refunds, and troubleshooting, see the usage guide.

Requirements

  • Node.js 20 or newer
  • A MyFatoorah API token with only the permissions required by the tools you use

Setup

sh
npm installcp .env.example .envnpm run build

Set MYFATOORAH_API_TOKEN in the MCP host's environment. The server does not automatically load .env; the VS Code debug configuration does.

Environment variables

VariableRequiredDefaultDescription
MYFATOORAH_API_TOKENYes, when calling the API—Bearer token. Never expose it to an agent prompt.
MYFATOORAH_ENVIRONMENTNotesttest, kuwait, uae, saudi_arabia, qatar, or egypt
MYFATOORAH_BASE_URLNoEnvironment URLHTTPS override for a supported MyFatoorah deployment or test proxy
MYFATOORAH_TIMEOUT_MSNo30000Request timeout from 1 to 300000 ms

Kuwait also covers the shared Bahrain, Jordan, and Oman API origin. Multi-country accounts use a separate token for each country.

Connect an MCP host

Use an absolute path in host configurations. Replace /absolute/path/to/myfatoorah-mcp and the token placeholder locally.

Claude Desktop

Add this server to Claude Desktop's MCP configuration:

json
{  "mcpServers": {    "myfatoorah": {      "command": "node",      "args": ["/absolute/path/to/myfatoorah-mcp/dist/index.js"],      "env": {        "MYFATOORAH_API_TOKEN": "YOUR_TOKEN",        "MYFATOORAH_ENVIRONMENT": "test"      }    }  }}

Restart Claude Desktop after saving the configuration.

Claude Code

Project-scoped configuration can use .mcp.json (keep it uncommitted if it contains a token):

json
{  "mcpServers": {    "myfatoorah": {      "type": "stdio",      "command": "node",      "args": ["/absolute/path/to/myfatoorah-mcp/dist/index.js"],      "env": {        "MYFATOORAH_API_TOKEN": "YOUR_TOKEN",        "MYFATOORAH_ENVIRONMENT": "test"      }    }  }}

VS Code / GitHub Copilot

The included .vscode/mcp.json launches the built server and securely prompts for a token. Build once, open the MCP servers view, then start myfatoorah. The token is not stored in the repository.

Cursor and generic stdio hosts

Use the same command, args, and env values as the Claude Desktop example. MCP protocol messages use stdin/stdout; server diagnostics must use stderr.

After publishing to npm, hosts can instead launch it with npx -y myfatoorah-mcp.

Tools

ToolEffectPurpose
myfatoorah_get_payment_methodsRead-onlyLists enabled methods and their ApiName values
myfatoorah_create_paymentCreates dataCreates a hosted checkout or invoice link with POST /v3/payments
myfatoorah_get_paymentRead-onlyGets authoritative payment details by PaymentId
myfatoorah_get_invoiceRead-onlyGets an invoice by InvoiceId or external identifier
myfatoorah_create_refundDestructiveCreates a full or partial refund; requires confirm: true
myfatoorah_get_refundRead-onlyGets refund details by RefundId
myfatoorah_api_requestVariesRestricted escape hatch for relative /v2/ or /v3/ paths; mutations require confirmation

The server also exposes:

  • Resource myfatoorah://configuration: environment, base URL, timeout, and whether a token is configured—never the token itself.
  • Prompt create-payment-safely: a reusable guided payment-link workflow.

Successful tools return a concise text summary plus machine-readable structuredContent containing the MyFatoorah response.

Safe payment workflow

  1. Read myfatoorah://configuration and confirm test versus live.
  2. If selecting a gateway, call myfatoorah_get_payment_methods and use its ApiName.
  3. Confirm amount, currency, customer, notification method, and callback URL.
  4. Call myfatoorah_create_payment and give the customer its PaymentURL.
  5. After callback, call myfatoorah_get_payment with the returned PaymentId. A redirect is not proof of payment; require invoice status PAID and transaction status SUCCESS.

Refunds move money in live mode. Obtain explicit user approval for the exact PaymentId and amount before passing confirm: true.

Development

sh
npm run formatnpm run lintnpm run typechecknpm testnpm run buildnpm run inspect

npm run inspect starts the official MCP Inspector against the compiled stdio server. VS Code also includes build/test tasks and a debug configuration.

Tests mock every MyFatoorah request; they do not make network calls or require a token.

Security

  • Use a least-privilege MyFatoorah API key and rotate it regularly.
  • Put credentials in the host environment or a secret manager, never source control or model context.
  • The generic request tool rejects absolute URLs, protocol-relative URLs, traversal, and paths outside /v2/ and /v3/ to prevent credential exfiltration.
  • API errors and Bearer values are redacted before reaching the model.
  • Prefer idempotency keys for supported mutations and stable order identifiers.
  • Do not expose this stdio process as an unauthenticated network service.
  • Direct card handling is intentionally not modeled as a focused tool; it requires PCI compliance.

API scope and references

The focused tools use MyFatoorah's documented v3 routes as of August 2026:

  • GET /v3/payment-methods
  • POST /v3/payments
  • GET /v3/payments/{paymentId}
  • GET /v3/invoices/{invoiceId}
  • GET /v3/invoices/externalIdentifier/{externalIdentifier}
  • POST /v3/refunds
  • GET /v3/refunds/{refundId}

References:

License

MIT

Source: README.md at commit 2d8a767

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.1.0LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts