# Test Card Hub

> Test Card Hub is an open-source MCP server for developer tools. MCP server supplying sandbox payment test cards and checkout test generation for LATAM. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, API, self-hosted
- **Repository:** https://github.com/eyrockscript/test-card-hub/tree/HEAD/mcp
- **GitHub stars:** 2
- **License:** MIT
- **MCP Registry name:** io.github.eyrockscript/test-card-hub
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-18

## About

The README says the server gives AI agents official sandbox test card numbers from Latin American and global payment gateways, covering approved, declined, insufficient funds and 3DS or review scenarios. It is meant to let an agent walk a checkout through its test paths end to end.

Beyond card lookup, it can validate whether a number looks like a real card, scan text such as code, fixtures and logs for card numbers that may be real, and explain gateway decline codes with source links. It can also return a Playwright test file in TypeScript with one test per sandbox scenario, leaving selector mapping to the developer. The server does not call any gateway and writes no files.

It suits payment engineers and QA teams working on checkouts for Mexican and LATAM gateways. Users can optionally point it at a backup exported from the companion Chrome extension to include their own environments.

## Features

- **Sandbox test card lookup:** Filters official gateway test cards by gateway, outcome, brand, environment or source.
- **Real card scanner:** Flags Luhn-valid numbers in pasted text, masking findings to first six and last four digits.
- **Card number validation:** Checks Luhn, length, brand and whether a number is a known test number.
- **Playwright test generation:** Returns a TypeScript Playwright test file covering each sandbox scenario of a gateway.
- **Decline code explanations:** Describes gateway decline codes with source URLs and suggested merchant actions.
- **Custom environments:** Reads environments from an exported Chrome extension backup file when configured.

## Good for

- Testing a checkout against approved, declined and insufficient funds outcomes
- Generating Playwright end-to-end payment tests for a LATAM gateway
- Scanning a repository or logs for accidentally committed real card numbers
- Looking up what a gateway decline code means and how to word the customer message

## Install

### Claude Code (Terminal)

```sh
claude mcp add test-card-hub -- npx -y test-card-hub-mcp
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "test-card-hub": {
      "command": "npx",
      "args": [
        "-y",
        "test-card-hub-mcp"
      ]
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "test-card-hub": {
      "command": "npx",
      "args": [
        "-y",
        "test-card-hub-mcp"
      ]
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "test-card-hub": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "test-card-hub-mcp"
      ]
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "test-card-hub": {
      "command": "npx",
      "args": [
        "-y",
        "test-card-hub-mcp"
      ]
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "test-card-hub": {
      "command": "npx",
      "args": [
        "-y",
        "test-card-hub-mcp"
      ]
    }
  }
}
```

## Tools

- `list_gateways`: Lists gateways with docs URL, verification date, card counts and gateway hints.
- `find_test_cards`: Finds sandbox test cards filtered by gateway, outcome, brand, environment or source.
- `validate_card`: Checks Luhn, length, brand and whether a number is a known test number.
- `list_environments`: Lists the user's own environments from an exported extension backup.
- `generate_checkout_tests`: Writes a Playwright TypeScript test file for a gateway's sandbox scenarios.
- `scan_for_real_cards`: Scans text for card numbers that may be real, with masked findings.
- `explain_decline`: Explains a gateway decline or error code with source and suggested messages.

## FAQ

### Does the server charge cards or call the gateways?

The README says the server never calls a gateway and is limited to test environments.

### Which gateways are covered?

Stripe, Mercado Pago MX, Conekta, Openpay MX, NetPay MX, Clip, Kushki MX, PayU Latam MX, dLocal and Adyen, according to the README.

### How do I install it?

The README gives install commands for Claude Code, and mcpServers configuration for Claude Desktop, Cursor and other clients, using pnpm dlx or npx and Node.js 20 or newer.

### Is Test Card Hub free?

Yes. Test Card Hub is open source, so you can use and self-host it for free.

### How do I add Test Card Hub to Claude Code?

Run this command in your terminal: claude mcp add test-card-hub -- npx -y test-card-hub-mcp

### What are the best alternatives to Test Card Hub?

The closest alternatives to Test Card Hub are Acp Sandbox, SendMock, Paddle (Sandbox), Able and Agent Sandbox and TestWatch.

## Where this comes from

- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Acp Sandbox](https://ai-powered.com/mcp/acp-sandbox): Acp Sandbox is a free MCP server for finance and payments.
- [SendMock](https://ai-powered.com/mcp/sendmock): SendMock is an open-source MCP server for communication.
- [Paddle (Sandbox)](https://ai-powered.com/mcp/paddle-sandbox): Paddle (Sandbox) is a free MCP server for finance and payments.
- [Able and Agent Sandbox](https://ai-powered.com/mcp/able-and-agent-sandbox): Able and Agent Sandbox is a free MCP server for developer tools.
- [TestWatch](https://ai-powered.com/mcp/testwatch): TestWatch is a freemium MCP server for developer tools.
- [SmartRetry Payment Tools](https://ai-powered.com/mcp/smartretry-payment-tools): SmartRetry Payment Tools is a free MCP server for finance and payments.
- [MCP Server](https://ai-powered.com/mcp/mcp-server-mweo0sk4): MCP Server is an MCP server for developer tools.
- [Proxy Mail QA](https://ai-powered.com/mcp/proxy-mail-qa): Proxy Mail QA is a freemium MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/test-card-hub
