home / mcp / playfab mcp server
PlayFab MCP server with CI/CD and release-please
Configuration
View docs{
"mcpServers": {
"akiojin-playfab-mcp-server": {
"command": "npx",
"args": [
"-y",
"@akiojin/playfab-mcp-server"
],
"env": {
"PLAYFAB_TITLE_ID": "YOUR_TITLE_ID",
"PLAYFAB_DEV_SECRET_KEY": "YOUR_DEV_SECRET_KEY"
}
}
}
}You learn how to run and use the PlayFab MCP Server to let large language models interact with PlayFab services. This server acts as a secure translator that exposes catalog, player, inventory, and account operations so your AI assistant can perform actions like searching items, managing inventory, and querying user data directly through PlayFab APIs.
You connect your MCP client to the PlayFab MCP Server and then issue natural language prompts that map to PlayFab endpoints. Practical patterns include asking for item search results, updating a draft item, retrieving a player’s inventory, or getting user account details. The server handles translating your requests into PlayFab API calls and returns structured results you can present to users.
Typical usage patterns you can try after wiring up the MCP client: search the catalog for items, create or update draft items, publish items, fetch item details, inspect a user’s inventory, add or remove inventory items, or retrieve a player’s account information. The server exposes a comprehensive set of endpoints to cover catalog management, inventory operations, and user data management.
Prerequisites you need before starting:
- Node.js 18 or higher
- A PlayFab account with a Title ID and Developer Secret Key
- An MCP client such as Claude Desktop or Cursor Desktop to connect to the server
Follow these concrete steps to set up and run the server locally:
# 1) Create a project directory and enter it
mkdir playfab-mcp-server
cd playfab-mcp-server
# 2) Create a .env file with your PlayFab credentials
PLAYFAB_TITLE_ID=
PLAYFAB_DEV_SECRET_KEY=
# 3) Install dependencies
npm install
# 4) Build the project
npm run build
# 5) Start the server
npm startYou can configure the MCP server within your LLM client by providing the MCP server details in the client’s config. The example below shows how to set up a local stdio-based MCP server using npx to run the PlayFab MCP package and pass your credentials via environment variables.
{
"mcpServers": {
"playfab": {
"command": "npx",
"args": [
"-y",
"@akiojin/playfab-mcp-server"
],
"env": {
"PLAYFAB_TITLE_ID": "Your PlayFab Title ID",
"PLAYFAB_DEV_SECRET_KEY": "Your PlayFab Developer Secret Key"
}
}
}
}Always use environment variables for sensitive credentials. Rotate PlayFab secret keys periodically and keep dependencies up to date. Use least-privilege access for credentials and avoid embedding secrets in code or configuration files that travel with your source.
Search for items in PlayFab catalog using the search_items API to retrieve matching results.
Create a new draft item in the catalog using the create_draft_item API, enabling draft content before publishing.
Update properties of an existing draft item with the update_draft_item API.
Remove an item from the catalog using the delete_item API.
Publish a draft item to make it available in the live catalog using publish_draft_item API.
Get detailed information about a catalog item via the get_item API.
Convert a PlayFab ID to a Title Player Account ID using get_title_player_account_id_from_playfab_id API.
Retrieve comprehensive user account information through the get_user_account_info API.
Retrieve current inventory items for a player with the get_inventory_items API.
Fetch inventory collection IDs using the get_inventory_collection_ids API.
Add items to a player's inventory via the add_inventory_items API.
Remove items from a player's inventory using the delete_inventory_items API.
Subtract specific amounts from inventory items with the subtract_inventory_items API.
Modify item properties in inventory through the update_inventory_items API.
Run batch inventory operations with the execute_inventory_operations API in Economy v2.
Ban players by ID, IP, or MAC address using the ban_users API.
Completely revoke all bans for a user using revoke_all_bans_for_user API.
Retrieve player custom data via the get_user_data API.
Update player custom data with the update_user_data API.
Set global title data using the set_title_data API.
Retrieve global title data via the get_title_data API.
Set server-only internal data with the set_title_internal_data API.
Retrieve internal data with the get_title_internal_data API.