# Xsolla MCP

> Xsolla MCP manages all aspects of game commerce directly from your AI agent. Use it to process payments, find transaction history, list virtual items, and handle refunds without leaving your chat window.

## Overview
- **Category:** gaming-entertainment
- **Price:** Free
- **Tags:** game-commerce, payment-gateway, virtual-items, transaction-management, fintech

## Description

This connector lets you manage a game's entire economy through natural conversation. You can have your agent perform complex tasks like processing a sale by getting user payment accounts, generating tokens, and then creating the final order. Need to figure out why a player’s purchase failed last month? Your agent searches transaction history or pulls specific details for any ID. It also keeps track of what items are available in your store catalog—whether they're single virtual items or big bundles. If you need to fix an issue, you can process refunds and manage user subscriptions right away. Because this handles money and commerce data, every action generates a cryptographically signed audit trail for proof of who did what, when, and why. This means the payment flow is always transparent. You connect your credentials once through Vinkius, giving your AI agent access to all these tools so you never have to switch tabs or copy-paste transaction IDs.

## Tools

### get_promotions_admin
Retrieves administrative data on current promotions and their settings.

### get_social_login_url
Generates the required URL for a user to log in via social media.

### get_subscription_plans
Lists all existing subscription plans available to users and admins.

### get_transaction_details
Retrieves the full, granular details for a specific transaction ID.

### get_user_attributes
Pulls various attributes about a user profile after confirming their identity.

### get_user_cart
Retrieves the current list of items in an active user shopping cart.

### get_user_profile
Pulls basic information about a specific user account, requiring their JWT token.

### activate_promotion
Triggers a specific promotional code for users.

### get_user_subscription
Shows the details of a user's active or expired subscription plan.

### create_order
Creates a formal order record for an item, requiring the user's JWT token.

### get_virtual_items
Lists all individual, single virtual items available for purchase.

### invalidate_token
Deactivates a previously generated Pay Station token immediately.

### create_payment
Processes a payment using a customer’s already saved account details.

### create_subscription_plan
Creates and sets up a new plan for recurring user payments.

### create_token
Generates a temporary Pay Station token needed to complete a purchase.

### create_virtual_item_admin
Creates and adds a new virtual item into the administrator catalog.

### get_bundles
Retrieves a list of grouped product bundles available in the store.

### get_events
Fetches records related to various platform events.

### get_payment_accounts
Shows a list of payment accounts saved by the user for future use.

### link_account
Connects and links the user's account to other platforms, requiring their JWT token.

### login_user
Handles the secure login process for a new or existing user account.

### mark_event_processed
Confirms that a specific event has been handled and should not be processed again.

### redeem_coupon
Applies a coupon code to a user's account, requiring their JWT token.

### refund_transaction
Processes a refund for a completed transaction ID.

### register_user_oauth
Registers a new user account using an OAuth 2.0 flow.

### register_user
Creates a new user record in the system.

### search_transactions
Searches the entire history of transactions based on timeframes or keywords.

### update_subscription_plan
Changes a user from one subscription plan to another.

### update_virtual_item_admin
Modifies existing virtual items in the administrator catalog.

### verify_promo_code
Checks if a given promo code is valid and applicable to a user's account.

## Prompt Examples

**Prompt:** 
```
Search for all completed transactions from the last 24 hours.
```

**Response:** 
```
I've searched your transactions. I found 12 completed transactions in the last 24 hours, totaling $450.00. Would you like to see the details for the most recent ones?
```

**Prompt:** 
```
List all virtual items and bundles in our store catalog.
```

**Response:** 
```
Fetching catalog... I found 25 virtual items (including 'Gold Pouch' and 'Epic Sword') and 3 active bundles ('Starter Pack', 'Warrior Set'). Which one should I inspect further?
```

**Prompt:** 
```
Get the full details for transaction ID 987654321.
```

**Response:** 
```
Retrieving details for transaction 987654321... This was a payment of $19.99 for 'Season Pass' by user 'Gamer123'. Status: Completed. Payment method: Credit Card.
```

## Capabilities

### Process Payments
The MCP generates payment tokens and uses saved accounts to execute purchases for in-game goods.

### Audit Transactions
You can search past sales, retrieve full transaction details, and get a list of all user payments.

### Manage Catalog Assets
The agent lists all available virtual items, bundles, and subscription plans in your store.

### Handle User Accounts
You can find user carts, check profiles, register new players, or update their subscriptions.

### Resolve Issues
The MCP processes refunds for failed sales and activates promotions to compensate users.

## Use Cases

### Investigating a Player Dispute
A support agent gets a ticket about an unauthorized charge. They ask their agent to search transactions, using `search_transactions`, and then pull the full details with `get_transaction_details` so they can explain exactly what happened.

### Running a Flash Sale
A product manager needs to launch an item promotion. They use the agent to check if their promo codes are valid using `verify_promo_code`, and then activate it globally with `activate_promotion`.

### Onboarding a New User
A developer needs to test the user journey. They use the agent to first run `login_user`, then check their shopping cart via `get_user_cart`, and finally simulate the checkout by calling `create_order`.

### Handling Account Changes
A PM needs to upgrade a user's service package. They instruct the agent to get the current subscription details using `get_user_subscription`, and then run `update_subscription_plan` immediately after.

## Benefits

- Speed up support resolutions. Instead of clicking through multiple dashboards to find a sale's details, you ask the agent for `get_transaction_details` and get instant answers.
- Automate revenue recovery. The agent can handle refunds instantly by running `refund_transaction` when a customer reports an issue, all within one chat session.
- Maintain data integrity across platforms. Because this is financial tooling, every single call generates a cryptographically signed audit trail, proving exactly who made the change and when.
- Build complex automations. Combine Xsolla with other MCPs—like a messaging tool to alert support staff immediately after `create_order` completes.
- Manage your inventory live. Quickly list all available assets by using tools like `get_virtual_items` or `get_bundles` without ever logging into the backend admin panel.

## How It Works

The bottom line is that you talk to your AI client; it talks to us, and we handle all the commerce API calls in the background.

1. Subscribe to this MCP, providing your Xsolla Merchant ID, Project ID, and API Key.
2. Your AI agent uses the credentials through Vinkius's secure proxy to perform actions against the Xsolla platform.
3. The agent reports back with the status of the request—whether an order was created, a refund was processed, or if a user profile was retrieved.

## Frequently Asked Questions

**How do I check what items are available in my store using get_virtual_items?**
You ask your agent to use `get_virtual_items`. It pulls a current, complete list of every single virtual item you have defined for sale.

**What is the best way to handle a failed purchase with refund_transaction?**
To process refunds, your agent needs two things: the transaction ID and confirmation that the request should go through. Running `refund_transaction` handles both steps in one call.

**Can I update an item description using update_virtual_item_admin?**
Yes, the `update_virtual_item_admin` tool lets you modify existing virtual items. This is useful if you need to change a price point or fix a typo in the catalog.

**Is get_user_cart safe for checking current purchases?**
Yes, `get_user_cart` retrieves what's currently in a user's active shopping cart. It requires the user’s JWT token to ensure you are looking at the right person's data.

**How do I check what payment methods a user has saved using get_payment_accounts?**
This tool lists all payment accounts associated with the merchant. It's read-only, so you can quickly see if the required credit card or bank account details are available for use during checkout.

**What is the role of creating a Pay Station token using create_token?**
It generates a temporary, single-use token needed to finalize purchases. This process proves payment authorization and allows your system to complete transactions without exposing sensitive credentials repeatedly.

**If I need to onboard a new player account, should I use register_user?**
Yes, using this tool creates the foundational user record in your system. After registration, you'll typically follow up with login_user or link_account to secure the profile.

**How do I define a new recurring income stream using create_subscription_plan?**
This tool defines the financial structure for ongoing revenue. You use it to set billing cycles, pricing tiers, and rules before any user can subscribe to that plan.

**Can I search for specific transactions based on their status?**
Yes. Use the `search_transactions` tool. You can filter by status (e.g., 'completed', 'canceled') and date ranges to find exactly what you need.

**How do I view the virtual items currently available in my catalog?**
Simply use the `get_virtual_items` tool. It will retrieve the full list of virtual items configured in your project catalog.

**Is it possible to issue a refund through the AI agent?**
Yes. By using the `refund_transaction` tool with a valid Transaction ID and an optional reason, the agent can initiate the refund process directly.