# Test Card Hub MCP server

> Provides AI agents with official sandbox test cards and decline code explanations for Latin American and global payment gateways.

- Repository: https://github.com/eyrockscript/test-card-hub
- Page: https://hostedmcp.org/servers/eyrockscript/test-card-hub
- Transport: stdio
- Stars: 2
- License: MIT
- Latest version: 1.1.0

## Install

### Claude Code

```sh
claude mcp add test-card-hub -- npx -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"
      ]
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"test-card-hub","type":"stdio","command":"npx","args":["-y","test-card-hub-mcp"]}'
```

### Claude Desktop (`claude_desktop_config.json`)

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

### Codex

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

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.test-card-hub]
command = "npx"
args = ["-y", "test-card-hub-mcp"]
```

### Gemini CLI

```sh
gemini mcp add -s user test-card-hub npx -- -y test-card-hub-mcp
```

### Gemini settings.json (`~/.gemini/settings.json`)

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

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `TEST_CARD_HUB_BACKUP` | no | no | Optional path to the backup JSON exported from the Test Card Hub Chrome extension, to expose your own environments. |

## Tools (7)

- `list_gateways`
- `find_test_cards`
- `validate_card`
- `list_environments`
- `generate_checkout_tests`
- `scan_for_real_cards`
- `explain_decline`

## FAQ

### Does this server generate real credit card numbers?

No, the server only provides official sandbox test cards from gateway documentation and never generates new card numbers or calls a gateway.

### Can I use this to generate Playwright tests?

Yes, the server includes a tool to write TypeScript Playwright test files for various sandbox scenarios of a gateway.

### How can I scan my code for potential real card numbers?

You can use the scan_for_real_cards tool to scan text like code, logs, or seed data for Luhn-valid numbers that are not known sandbox numbers.

### What gateways are supported?

Supported gateways include Stripe, Mercado Pago MX, Conekta, Openpay MX, NetPay MX, Clip, Kushki MX, PayU Latam MX, dLocal, and Adyen.
