PlayFab MCP Server

by akiojin
Verified

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

Integrations

  • Allows GitHub Copilot in Agent mode to query and interact with Azure Cosmos DB data, supporting operations like listing vehicles and other database queries

  • Runs the MCP server that facilitates communication between AI models and Azure Cosmos DB, processing queries and returning results

PlayFab MCP 服务器

这是什么?🤔

此服务器是一个中间件,可使大型语言模型(例如 Claude 和 VS Code)直接与 PlayFab 服务交互。它充当安全高效的翻译器,将您的 AI 助手与各种 PlayFab 功能连接起来,例如物品搜索、分段查询、玩家资料查找、库存管理和 PlayFab ID 转换。

快速示例

You: "Show me the latest 10 items." Claude: *calls the PlayFab search_items API and returns the results in plain text*

它是如何工作的?🛠️

该服务器利用模型上下文协议 (MCP) 在 AI 模型和 PlayFab 服务之间建立通用接口。尽管 MCP 旨在支持任何 AI 模型,但目前仅提供开发者预览版。

请按照以下步骤开始:

  1. 设置您的项目。
  2. 将您的项目详细信息添加到您的 LLM 客户端的配置中。
  3. 开始自然地与 PlayFab 数据交互!

它能做什么?📊

  • 使用 PlayFab 的 search_items API 搜索项目。
  • 检索全面的段信息。
  • 查询指定段内的玩家资料。
  • 使用 get_inventory_items API 检索当前库存项目。
  • 使用 get_inventory_collection_ids API 获取库存收集 ID。
  • 通过 get_title_player_account_id_from_playfab_id API 将 PlayFab ID 转换为标题玩家帐户 ID。

快速入门🚀

先决条件

  • Node.js 14 或更高版本。
  • 有效的 PlayFab 帐户(通过 PlayFab 游戏管理器获取您的标题 ID 和开发者密钥)。
  • 受支持的 LLM 客户端,例如 Claude Desktop。

设置你的项目

从 PlayFab 游戏管理器获取您的 PlayFab 标题 ID 和开发人员密钥,然后在项目根目录中创建一个包含以下内容的.env文件(将占位符替换为您的实际凭据):

PLAYFAB_TITLE_ID= PLAYFAB_DEV_SECRET_KEY=

入门

  1. 安装依赖项
    在项目根目录中,运行以下命令来安装所有必要的依赖项:
    npm install
  2. 构建项目
    通过执行以下命令编译项目:
    npm run build
  3. 启动服务器
    导航到dist文件夹并使用以下命令启动服务器:
    npm start
  4. 确认消息
    启动后,您应该会看到以下消息:
    PlayFab Server running on stdio

使用 VS Code Insiders 运行

要将 PlayFab MCP 服务器与 VS Code Insiders 和 GitHub Copilot Agent Mode 一起使用,请按照以下步骤操作:

  1. 安装VS Code Insiders
  2. 在 VS Code Insiders 中安装 GitHub Copilot 和 GitHub Copilot Chat 扩展的预发布版本。
  3. 在空文件夹中打开 VS Code Insiders 的新实例。
  4. 将此存储库中的mcp.json文件复制到您的文件夹中,并根据您的环境更新值。
  5. 启动 GitHub Copilot 并切换到代理模式;PlayFab MCP 服务器应该出现在工具列表中。
  6. 例如,尝试“显示最新的 10 个项目”之类的提示来验证服务器是否正确处理您的查询。

将项目详细信息添加到 Claude Desktop 的配置文件中

打开 Claude Desktop,前往“文件 → 设置 → 开发者 → 编辑配置”。然后,将claude_desktop_config文件内容替换为以下代码片段:

{ "mcpServers": { "playfab": { "command": "node", "args": [ "C:/Path/To/playfab-mcp/dist/index.js" ], // Specify the path to your PlayFab MCP server file "env": { "PLAYFAB_TITLE_ID": "Your PlayFab Title ID", "PLAYFAB_DEV_SECRET_KEY": "Your PlayFab Developer Secret Key" } } } }

通过这些步骤,您已成功配置 PlayFab MCP 服务器以与您的 LLM 客户端一起使用,从而实现与 PlayFab 服务的无缝交互。

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

一种服务器,使 LLM(如 Claude 和 VSCode Copilot)能够通过自然语言查询与 Azure Cosmos DB 数据交互,充当 AI 助手和数据库之间的翻译器。

  1. What Is This? 🤔
    1. Quick Example
  2. How Does It Work? 🛠️
    1. What Can It Do? 📊
  3. Quick Start 🚀
    1. Prerequisites
    2. Set Up Your Project
    3. Getting Started
    4. Running with VS Code Insiders
    5. Adding Your Project Details to Claude Desktop's Config File
ID: z32uydy6f6