# Mastercard MCP

> Mastercard MCP gives your AI client instant access to global payment intelligence. Identify card issuer details from the first few digits (BIN lookup), validate account status before transactions, locate specific merchants using GPS coordinates or street addresses, and report confirmed fraud cases directly. It's a single connection point for everything related to modern commerce payments.

## Overview
- **Category:** industry-titans
- **Price:** Free
- **Tags:** bin-lookup, fraud-detection, card-validation, merchant-services, financial-data

## Description

Mastercard connects deep payment infrastructure capabilities directly to your agent through this MCP. You get instant intelligence on cards, merchants, and transactions without having to jump between complex developer portals or write boilerplate API code. Need to know if a card is active before processing a charge? Ask the AI. Trying to find a restaurant that takes contactless payments nearby? The MCP handles the geospatial search and payment capability filtering automatically.

This isn't just another data dump; it’s a conversational layer over global financial rules. You can determine everything from business classification using MCC codes to finding detailed merchant information, all through simple conversation with your AI client. Connecting this via Vinkius means you get immediate access to the full suite of payment tools, letting your agent act like an expert payments analyst on demand.

## Tools

### bin_lookup
Identifies a card's issuer bank, type (credit/debit), and category using only the first 6 to 8 digits of the card number.

### bin_lookup_post
Performs the same card identification lookup as bin_lookup but uses a POST method, which is better for handling sensitive payment data.

### get_merchant
Retrieves detailed information, including hours and accepted methods, for a specific merchant identified by its unique ID number.

### get_place_details
Gets complete details, like coordinates and payment types, for any location found during a nearby places search.

### merchant_category_codes
Provides a comprehensive list of all four-digit Merchant Category Codes used to classify every type of business.

### merchant_industry_codes
Lists higher-level industry codes, grouping related MCCs for broader market analysis and business classification.

### nearby_locations
Discovers general points of interest, including ATMs or merchants, within a given radius from specific GPS coordinates.

### search_merchants
Finds Mastercard-accepting businesses near GPS coordinates and allows filtering by business type (MCC code).

### search_places
Searches for nearby locations using GPS, specifically filtering results to show which ones accept Apple Pay or Google Pay.

### search_places_by_address
Finds specific merchant places by providing a street address instead of raw coordinates.

### submit_fraud_report
Allows authorized users to submit confirmed fraudulent transaction details directly to Mastercard’s loss database.

### validate_account
Checks a full card number against the network to confirm if it is currently active and valid for immediate transactions.

## Prompt Examples

**Prompt:** 
```
What type of card is 542418 and which bank issued it?
```

**Response:** 
```
Running BIN lookup for 542418... This is a Mastercard World Elite credit card issued by Banco Exemplo S.A. in Brazil. It's a premium tier card (not prepaid, not commercial) with BRL as the primary currency. The BIN range covers 54241800 to 54241899.
```

**Prompt:** 
```
Find restaurants near São Paulo city center that accept Mastercard within 3km.
```

**Response:** 
```
Found 27 restaurants within 3km of São Paulo center. Top results include: Restaurante Paulista (MCC: 5812) at Av. Paulista, 500; Sabor Brasileiro on Rua Augusta, 1200; and Pizzaria Bella on Rua Oscar Freire, 800. All accept Mastercard. Would you like details on any specific restaurant?
```

**Prompt:** 
```
Validate card number 5123456789012346 before I process this payment.
```

**Response:** 
```
Card validation complete: ****2346 is VALID. Account type: Credit card. Issuer: First National Bank. The card is active and ready for transactions. You can proceed with processing this payment safely.
```

## Capabilities

### Determine card issuer and type
Read the first 6-8 digits of any card number to instantly identify the bank that issued it, whether it's credit or debit, and its specific premium category.

### Validate account status
Check if a full payment card number is currently active and valid before initiating any transaction, preventing costly declines.

### Find merchants by location or address
Search for Mastercard-accepting businesses near specific GPS coordinates or using a user-friendly street address input.

### Identify local payment capabilities
Discover nearby locations and pinpoint if they accept digital wallets like Apple Pay, Google Pay, or contactless methods.

### Report confirmed fraud cases
Submit details of a fraudulent transaction to Mastercard's database for network protection and analysis.

## Use Cases

### A traveler needs a local store that accepts digital payments.
The user asks: 'Where's a coffee shop near me that takes Apple Pay?' The agent uses `search_places` with the current GPS coordinates and filters for Apple Pay acceptance, returning precise results.

### A fraud analyst needs to investigate suspicious transaction batch data.
The user asks: 'What is the issuer bank behind these card numbers?' The agent runs `bin_lookup` on the partial number, immediately telling the analyst if it's a corporate or prepaid account.

### An e-commerce developer needs to validate customer inputs before checkout.
The user asks: 'Is this card number active?' The agent executes `validate_account` with the full PAN, giving a definitive VALID/INVALID status so the payment gateway doesn't waste time.

### A sales team needs to find potential retail partners in a new district.
The user asks: 'Show me all local restaurants near 123 Main St.' The agent uses `search_places_by_address` and then uses the resulting IDs with `get_place_details` to pull complete contact info.

## Benefits

- Reduces transaction decline rates by running accounts through the `validate_account` tool, ensuring you only process payments on active cards. This saves time and money immediately.
- Finds merchants using either coordinates (`search_merchants`) or a simple street address (`search_places_by_address`), making location queries much more user-friendly for any client.
- Quickly identifies card details using `bin_lookup`, letting your agent tell you the issuer bank, card tier (Gold/Platinum), and country from just the first few digits of a number.
- Enhances customer service by searching for locations that accept specific digital wallets. Use `search_places` to filter results specifically for Apple Pay or Google Pay support.
- Improves compliance workflows by allowing authorized personnel to use `submit_fraud_report`, feeding confirmed fraud data back into the network immediately.

## How It Works

The bottom line is you never have to write a single API call yourself; you just ask your AI client what payment intelligence you need.

1. Subscribe to the MCP and provide your Mastercard Developer Client ID and Client Secret.
2. Your AI client uses natural language to formulate a request, specifying what it needs—for example, 'Find restaurants near 34th Street that accept digital wallets.'
3. The MCP executes the necessary background calls, gathers data on merchants or card details, and presents the final answer directly back through your agent.

## Frequently Asked Questions

**Can I identify what bank issued a card just from the first few digits?**
Yes! Use the `bin_lookup` tool with the first 6-8 digits of the card number (the BIN). Mastercard will return the issuer bank name, card type (credit/debit/prepaid), card category (Gold/Platinum/World), issuing country, and flags like whether it's a commercial or healthcare card. For example, BIN 542418 reveals the exact issuing bank and card tier.

**How can I find merchants that accept Mastercard near a specific location?**
Use the `search_merchants` tool with latitude, longitude, and a search radius in meters. You can optionally filter by MCC code (e.g., "5812" for restaurants, "5411" for grocery stores). For example, searching with coordinates -23.5505, -46.6333 (São Paulo) and radius 5000 will return all Mastercard-accepting merchants within 5km. Results include merchant names, addresses, categories, and coordinates.

**Can I verify if a payment card is valid before processing a transaction?**
Yes! Use the `validate_account` tool with the full card number. It checks Mastercard records to determine if the card is active and valid, returning the validation status (VALID/INVALID), account type (credit/debit/prepaid), and issuer information. Optionally include expiry date (MMYY format) and cardholder name for enhanced validation. This helps reduce declined transactions and fraud risk. Never store full card numbers — handle them securely.

**How do I report a confirmed fraudulent transaction to Mastercard?**
Use the `submit_fraud_report` tool with the card number, transaction amount, currency (ISO 4217), and fraud type code. Fraud types: "01" = Stolen Card, "02" = Never Received Card, "03" = Fraudulent Application, "04" = Counterfeit Card. Optionally include fraud amount and transaction date. This submits to Mastercard's Fraud and Loss Database (FLD) to help reduce false positives across the network. IMPORTANT: Only authorized fraud management personnel should use this tool for confirmed cases.

**Can I find merchants that accept Apple Pay or Google Pay near me?**
Yes! Use the `search_places` tool with GPS coordinates and set hasApplePay=true or hasGooglePay=true to filter for merchants with those payment capabilities. Returns detailed merchant information including names, addresses, MCC codes, and which digital wallets they accept. For example, searching near Times Square (40.7580, -73.9855) with hasApplePay=true will show all nearby Apple Pay-enabled merchants.