# Setel Malaysia MCP

> Setel Malaysia orchestrates payments for mobility—managing payment intents, starting/stopping parking sessions, and handling EV charging cycles all from one API surface. This MCP lets your AI agent process transactions, track vehicle movements in real-time, and check loyalty points against the Setel e-wallet system.

## Overview
- **Category:** finance
- **Price:** Free
- **Tags:** setel-malaysia, e-wallet, payment-intent, parking-app, ev-charging, mesra-loyalty, mobility-api

## Description

This MCP lets your agent manage everything related to mobility payments in Malaysia. You're running a complex system that handles transactions, parking spots, and EV charging cycles—and this server controls it all. Your AI client can process full payment lifecycles, track vehicles in real-time, and pull financial reports from the Setel e-wallet system.

**Handling Payments:**
When you need to run a transaction, you don't just send money; you have to follow a specific flow. First, your agent runs `create_payment_intent` to generate a unique intent ID. This step authorizes the transaction and gives you the necessary reference number for what’s about to happen. Once that ID is live, you use it with `get_payment_intent` to check the full status and details of that intended payment—you'll know if it passed initial checks or if there was an error before you commit funds.
To finalize everything, your agent calls `capture_payment`, feeding it the intent details. That’s what actually moves the money. If you ever need a high-level view of how much cash has moved through the system for reporting purposes, you can use `get_merchant_summary` to pull a quick overview of your total merchant account settlements and activity.

**Managing Parking Sessions:**
Need to track where a vehicle's parked? You can programmatically start a session for any plate using `create_parking_session`, whether it’s in an automated lot or on the street. The agent keeps tabs on that spot, allowing you to check its current status anytime with `get_parking_session`. This tool gives all the details—active or concluded—so you know exactly what's going on. For a historical view of a vehicle’s movement, your client runs `list_parking_history` and gets a list of recent parking sessions showing both dates and how long they lasted.

**Controlling EV Charging:**
When the user needs to charge up, the agent first uses `list_charging_locations` to find every available EV charging station within a specific radius. Once you pick a spot, starting the charge is simple: `create_charging_session` begins the cycle at that location. When the car’s battery hits 100% or the user pulls out, they call `end_charging_session`. This action stops the active charging session and completes the billing cycle for the user.

**Checking Loyalty and Finances:**
Beyond movement and money transfers, you can manage customer loyalty points. Your agent calls `get_mesra_points` to look up the current point balance tied to any specific linked user ID. This is essential for calculating rewards or checking eligibility. If you need a quick financial snapshot that isn't related to a single transaction, the `get_merchant_summary` tool gives you the big picture of your total account settlements.

## Tools

### capture_payment
Finalizes an authorized payment transaction using the provided intent details.

### create_charging_session
Starts a new electric vehicle charging session at a specified location.

### create_parking_session
Initiates a parking session for a specific vehicle plate, whether at street or automated lots.

### create_payment_intent
Generates a payment intent ID required to authorize any transaction that will happen later.

### end_charging_session
Stops an active EV charging session, completing the billing cycle for the user.

### get_merchant_summary
Retrieves a high-level overview of your total merchant account settlements and activity.

### get_mesra_points
Looks up the current loyalty points balance for a specific linked user ID.

### get_parking_session
Retrieves all details about a parking session, whether it's currently active or already concluded.

### get_payment_intent
Fetches the full status and details for a specific payment intent ID you already created.

### list_charging_locations
Finds all available EV charging stations within a given geographic radius.

### list_parking_history
Generates a list of recent parking sessions for the account, showing dates and durations.

## Prompt Examples

**Prompt:** 
```
Find all Setel-compatible EV charging locations near me.
```

**Response:** 
```
I'm searching the Setel charging network... I've found 3 nearby locations: 1. Petronas KLCC (ID: ev_101, Status: Available), 2. Suria Mall (ID: ev_102, Status: Busy), 3. Avenue K (ID: ev_103, Status: Available). Would you like the full connector details for any of these?
```

**Prompt:** 
```
Check my Mesra points balance for user ID 'user_777'.
```

**Response:** 
```
Retrieving loyalty data... User 'user_777' currently has 1,250 Mesra points. These can be redeemed for fuel discounts or retail rewards. Would you like to see available rewards?
```

**Prompt:** 
```
Show the summary for my Setel merchant account.
```

**Response:** 
```
Fetching merchant metrics... For April 2024, your total settlements amount to RM 45,200.00 across 1,200 transactions. Service status: All mobility services operational.
```

## Capabilities

### Process the full payment lifecycle
The agent creates a transaction intent, captures the authorized payment, and retrieves detailed information about the intended payment.

### Manage parking sessions
You can programmatically start a new parking session for any vehicle plate or retrieve details on both active and past parking records.

### Control EV charging cycles
The agent finds nearby charging stations, initiates a charge session, and stops the process when the vehicle is ready.

### Retrieve financial and loyalty data
You can pull merchant account summaries for reporting or check Mesra points balances for linked users.

## Use Cases

### Processing a multi-step transaction
A user needs to pay for parking and then charge their EV. Instead of running two separate manual processes, the agent first calls `create_payment_intent` for both services, then uses `create_parking_session`, followed by `create_charging_session`. Finally, it runs `capture_payment` once to clear all charges.

### Auditing a fleet's activity
The logistics manager needs to know how much was spent last month. The agent calls `list_parking_history` and then uses `get_merchant_summary`. This combines raw session data with high-level financial totals, giving the manager immediate oversight.

### Assisting a service provider's app
A user asks the agent for charging options. The agent immediately calls `list_charging_locations` to find three nearby stations. It then uses the station details to start a session via `create_charging_session`, completing the request in one sequence.

### Handling customer queries
A user asks, 'How many points do I have and what did I pay for last week?' The agent uses `get_mesra_points` to check loyalty status, then runs `list_parking_history` to show the recent charges. Both answers are compiled into one response.

## Benefits

- **Complete Payment Control:** Instead of handling payment logic in three different services, the `create_payment_intent` and `capture_payment` tools handle the entire flow from authorization to capture within one server.
- **Real-time Mobility Tracking:** You don't have to rely on dashboards. Using `get_parking_session` or `get_charging_session` gives your agent immediate status updates, whether the vehicle is parked or charging.
- **Simplified Reporting:** Get an instant financial snapshot by calling `get_merchant_summary`. This bypasses manual data exports and allows for real-time business metrics extraction.
- **Comprehensive History View:** Need to audit past activity? The combination of `list_parking_history` and `list_charging_locations` lets your agent build a full timeline of mobility events.
- **Customer Engagement Data:** Check user loyalty status instantly. The `get_mesra_points` tool pulls the current Mesra point balance, allowing immediate personalized responses for customer service agents.

## How It Works

The bottom line is that you plug in your merchant keys to let your agent manage all mobility payments and sessions without manual dashboard interaction.

1. Subscribe to this server, then register at the Setel Merchant Dashboard.
2. In the API Settings, retrieve your necessary credentials: API Key, API Secret, and Merchant ID. Start testing using the sandbox environment.
3. Provide your AI client with these three credentials so it can execute payment, parking, or charging commands.

## Frequently Asked Questions

**How do I check a user's points balance using get_mesra_points?**
You pass the required User ID into `get_mesra_points`. It returns their current Mesra point total, which you can then use for immediate loyalty checks or promotions.

**What is the difference between create_payment_intent and get_payment_intent?**
`create_payment_intent` generates a new ID to authorize a future charge. `get_payment_intent` retrieves the current status (e.g., 'requires action' or 'succeeded') for an ID you already have.

**Can I list all parking sessions using list_parking_history?**
Yes, `list_parking_history` pulls a chronological log of recent sessions. If you need the detailed status (like 'active' vs 'ended'), use `get_parking_session` with a specific session ID.

**What do I need to start an EV charging session?**
You must call `create_charging_session`. This requires location data and payment details, which the server uses to initiate the charge and manage billing until you run `end_charging_session`.

**Where do I get my merchant account overview?**
Use the `get_merchant_summary` tool. It pulls aggregated data about your total settlements, transactions count, and service status for a given period.

**After I use `create_payment_intent`, how does `capture_payment` finalize the transaction?**
You pass the generated payment intent ID to `capture_payment`. This function moves the funds from a pending authorization into a final, settled capture. It confirms that money is actually pulled from the source account.

**What information does `get_parking_session` return for an active spot?**
It returns the session's start time, estimated end time, and current rate details. This lets you verify if a parking session is still running or if it has expired without manual checks.

**What do I need to provide when using `end_charging_session`?**
You must supply the active charging session ID and confirm the physical location. This call immediately cuts power, calculates final usage metrics, and marks the slot as free.

**Can I test this in a staging environment?**
Yes! Setel provides a pre-production API (`api-pre-prod.setel.com`) for integration testing without affecting real balances.

**How do I check the loyalty points for a user?**
Use the `get_mesra_points` tool with the specific User ID. Your agent will return the current Mesra points balance associated with that account.

**Can I automatically list all nearby EV charging locations?**
Yes! The `list_charging_locations` tool retrieves available Setel-compatible EV chargers, allowing your agent to help you find the best spot to power up.