Skip to main content
ClaudeWave

LLM-friendly MCP server for the MyFatoorah payments API

MCP ServersRegistry oficial0 estrellas0 forksTypeScriptMITActualizado today
ClaudeWave Trust Score
95/100
Verified
Passed
  • Open-source license (MIT)
  • Actively maintained (<30d)
  • Clear description
  • Topics declared
  • Documented (README)
Last scanned: 8/28/2026
Install in Claude Code / Claude Desktop
Method: NPX · myfatoorah-mcp
Claude Code CLI
claude mcp add myfatoorah-mcp -- npx -y myfatoorah-mcp
claude_desktop_config.json (Claude Desktop)
{
  "mcpServers": {
    "myfatoorah-mcp": {
      "command": "npx",
      "args": ["-y", "myfatoorah-mcp"]
    }
  }
}
1. Run the command above in your terminal (Claude Code), or paste the JSON config into claude_desktop_config.json (Claude Desktop).
2. Replace any <placeholder> values with your API keys or paths.
3. Restart Claude. The MCP server and its tools appear automatically.
Casos de uso

Resumen de MCP Servers

# MyFatoorah MCP

An LLM-friendly [Model Context Protocol](https://modelcontextprotocol.io/) server for the [MyFatoorah API](https://docs.myfatoorah.com/docs/). 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](docs/USAGE.md).

## Requirements

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

## Setup

```sh
npm install
cp .env.example .env
npm 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

| Variable                 | Required                  | Default         | Description                                                        |
| ------------------------ | ------------------------- | --------------- | ------------------------------------------------------------------ |
| `MYFATOORAH_API_TOKEN`   | Yes, when calling the API | —               | Bearer token. Never expose it to an agent prompt.                  |
| `MYFATOORAH_ENVIRONMENT` | No                        | `test`          | `test`, `kuwait`, `uae`, `saudi_arabia`, `qatar`, or `egypt`       |
| `MYFATOORAH_BASE_URL`    | No                        | Environment URL | HTTPS override for a supported MyFatoorah deployment or test proxy |
| `MYFATOORAH_TIMEOUT_MS`  | No                        | `30000`         | Request 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

| Tool                             | Effect       | Purpose                                                                                     |
| -------------------------------- | ------------ | ------------------------------------------------------------------------------------------- |
| `myfatoorah_get_payment_methods` | Read-only    | Lists enabled methods and their `ApiName` values                                            |
| `myfatoorah_create_payment`      | Creates data | Creates a hosted checkout or invoice link with `POST /v3/payments`                          |
| `myfatoorah_get_payment`         | Read-only    | Gets authoritative payment details by PaymentId                                             |
| `myfatoorah_get_invoice`         | Read-only    | Gets an invoice by InvoiceId or external identifier                                         |
| `myfatoorah_create_refund`       | Destructive  | Creates a full or partial refund; requires `confirm: true`                                  |
| `myfatoorah_get_refund`          | Read-only    | Gets refund details by RefundId                                                             |
| `myfatoorah_api_request`         | Varies       | Restricted 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 format
npm run lint
npm run typecheck
npm test
npm run build
npm 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:

- [MyFatoorah API key and regional URLs](https://docs.myfatoorah.com/docs/api-key)
- [MCP TypeScript SDK v2](https://ts.sdk.modelcontextprotocol.io/v2/)
- [Model Context Protocol specification](https://modelcontextprotocol.io/specification/latest)

## License

MIT
ai-agentsclaudekuwaitmcpmodel-context-protocolmyfatoorahpaymentstypescript

Lo que la gente pregunta sobre myfatoorah-mcp

¿Qué es kuwaitdevs/myfatoorah-mcp?

+

kuwaitdevs/myfatoorah-mcp es mcp servers para el ecosistema de Claude AI. LLM-friendly MCP server for the MyFatoorah payments API Tiene 0 estrellas en GitHub y su última actualización registrada es del 2026-08-27.

¿Cómo se instala myfatoorah-mcp?

+

Puedes instalar myfatoorah-mcp clonando el repositorio (https://github.com/kuwaitdevs/myfatoorah-mcp) o siguiendo las instrucciones del README en GitHub. ClaudeWave también te ofrece bloques de instalación rápida en esta misma página.

¿Es seguro usar kuwaitdevs/myfatoorah-mcp?

+

Nuestro agente de seguridad ha analizado kuwaitdevs/myfatoorah-mcp y le ha asignado un Trust Score de 95/100 (tier: Verified). Revisa el desglose completo de comprobaciones superadas y flags en esta página.

¿Quién mantiene kuwaitdevs/myfatoorah-mcp?

+

kuwaitdevs/myfatoorah-mcp es mantenido por kuwaitdevs. La última actividad registrada en GitHub es del 2026-08-27, con 0 issues abiertos.

¿Hay alternativas a myfatoorah-mcp?

+

Sí. En ClaudeWave puedes explorar mcp servers similares en /categories/mcp, ordenados por popularidad o actividad reciente.

Despliega myfatoorah-mcp en tu cloud

Lleva este repo a producción en minutos. Cada plataforma genera su propio entorno con variables de entorno editables.

¿Mantienes este repo? Añade un badge a tu README

Pega el badge en tu README de GitHub para mostrar que está auditado por ClaudeWave. Cada badge enlaza de vuelta a esta página y muestra el Trust Score actual.

Featured on ClaudeWave: kuwaitdevs/myfatoorah-mcp
[![Featured on ClaudeWave](https://claudewave.com/api/badge/kuwaitdevs-myfatoorah-mcp)](https://claudewave.com/repo/kuwaitdevs-myfatoorah-mcp)
<a href="https://claudewave.com/repo/kuwaitdevs-myfatoorah-mcp"><img src="https://claudewave.com/api/badge/kuwaitdevs-myfatoorah-mcp" alt="Featured on ClaudeWave: kuwaitdevs/myfatoorah-mcp" width="320" height="64" /></a>

Más MCP Servers

Alternativas a myfatoorah-mcp