Skip to main content
Glama

MCP GameBoy Server

MCP GameBoy 服务器

概述

一个用于 serverboy 的模型上下文协议 (MCP) 服务器,允许法学硕士 (LLM) 与 GameBoy 模拟器进行交互。您的法学硕士 (LLM) 可以……

  • 加载 ROM
  • 按键
  • 看看 Gameboy 屏幕
  • 跳帧

你可以...

  • 使用@modelcontextprotocol/inspector 控制 gameboy 模拟器
  • 使用http://localhost:3001/emulator上的 Web 界面控制 Gameboy 模拟器(并上传 ROM)
  • 在你最喜欢的 MCP 客户端中安装 gameboy 模拟器

截图 2025-04-25 183528

截图 2025-04-25 081510

图像

特征

  • 支持 stdio 和 SSE 传输
  • 提供 GameBoy 控制工具(上、下、左、右、A、B、开始、选择)
  • 提供加载不同 ROM 的工具
  • 提供获取当前屏幕的工具
  • 所有工具都返回带有最新屏幕帧的 ImageContent

安装

通过 Smithery 安装

要通过Smithery自动为 Claude Desktop 安装 GameBoy 模拟器服务器:

npx -y @smithery/cli install @mario-andreschak/mcp-gameboy --client claude

FLUJO中安装

  1. 单击“添加服务器”
  2. 将 Github URL 复制并粘贴到 FLUJO 中
  3. 单击解析、克隆、安装、构建和保存。

手动安装

# Clone the repository git clone https://github.com/yourusername/mcp-gameboy.git cd mcp-gameboy # Install dependencies npm install # Build the project npm run build

通过配置文件安装

!!注意:许多 MCP 客户端要求将 .env 变量中的 ROM 路径指定为绝对路径

要通过配置文件将此 MCP 服务器与 Cline 或其他 MCP 客户端集成:

  1. 打开您的 Cline 设置:
    • 在 VS Code 中,转到“文件”->“首选项”->“设置”
    • 搜索“Cline MCP 设置”
    • 点击“在settings.json中编辑”
  2. 将服务器配置添加到mcpServers对象:
    { "mcpServers": { "mcp-gameboy": { "command": "node", "args": [ "/path/to/mcp-gameboy/dist/index.js" ], "disabled": false, "autoApprove": [] } } }
  3. /path/to/mcp-gameboy/dist/index.js替换为项目目录中index.js文件的实际路径。在 Windows 系统中,请使用正斜杠 (/) 或双反斜杠 (\\) 作为路径。
  4. 保存设置文件。Cline 应该会自动连接到服务器。

用法

环境变量

!!注意:许多 MCP 客户端要求将 .env 变量中的 ROM 路径指定为绝对路径

在根目录中创建一个.env文件,其中包含以下变量:

# Server configuration PORT=3001 # ROM path for stdio mode ROM_PATH=./roms/dangan.gb

在 stdio 模式下运行

在 stdio 模式下,服务器使用ROM_PATH环境变量中指定的 ROM 路径。它将打开一个浏览器窗口来显示 GameBoy 屏幕。

npm run start

在 SSE 模式下运行

在 SSE 模式下,服务器启动一个 Express 服务器,该服务器提供网页以供选择 ROM。

npm run start-sse

然后打开浏览器访问http://localhost:3001选择一个 ROM。

工具

该服务器提供以下工具:

  • press_up :按下 GameBoy 上的向上按钮
  • press_down :按下 GameBoy 上的向下按钮
  • press_left :按下 GameBoy 上的左键
  • press_right :按下 GameBoy 上的右按钮
  • press_a :按下 GameBoy 上的 A 按钮
  • press_b :按下 GameBoy 上的 B 按钮
  • press_start :按下 GameBoy 上的 START 按钮
  • press_select :按下 GameBoy 上的 SELECT 按钮
  • load_rom :加载 GameBoy ROM 文件
  • get_screen :获取当前 GameBoy 屏幕

所有工具都返回具有最新屏幕帧的 ImageContent。

实现细节

此服务器使用模型上下文协议 (MCP) TypeScript SDK 构建。它使用:

  • 来自@modelcontextprotocol/sdk/server/mcp.jsMcpServer用于服务器实现
  • 来自@modelcontextprotocol/sdk/server/stdio.js``StdioServerTransport用于 stdio 传输
  • 来自@modelcontextprotocol/sdk/server/sse.js``SSEServerTransport用于 SSE 传输
  • 用于 GameBoy 仿真的serverboy
  • SSE 模式下的 web 服务器express
  • 用于渲染 GameBoy 屏幕的canvas

执照

麻省理工学院

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

local-only server

The server can only run on the client's local machine because it depends on local resources.

模型上下文协议服务器使 LLM 能够与 GameBoy 模拟器交互,提供控制 GameBoy、加载 ROM 和检索屏幕帧的工具。

  1. 概述
    1. 特征
      1. 安装
        1. 通过 Smithery 安装
        2. 在FLUJO中安装
        3. 手动安装
        4. 通过配置文件安装
      2. 用法
        1. 环境变量
        2. 在 stdio 模式下运行
        3. 在 SSE 模式下运行
      3. 工具
        1. 实现细节
          1. 执照

            Related MCP Servers

            • A
              security
              A
              license
              A
              quality
              A Model Context Protocol server that enables LLMs to interact with Salesforce data through SOQL queries, SOSL searches, and various API operations including record management.
              Last updated -
              10
              126
              Python
              MIT License
            • A
              security
              A
              license
              A
              quality
              A Model Context Protocol server that enables LLMs to interact with web pages, take screenshots, generate test code, scrape web pages, and execute JavaScript in a real browser environment.
              Last updated -
              29
              39
              11
              TypeScript
              MIT License
            • -
              security
              F
              license
              -
              quality
              A Model Context Protocol server that interfaces with PokeAPI to provide Pokémon information to LLM applications through JSON-RPC over stdio.
              Last updated -
              TypeScript
            • A
              security
              F
              license
              A
              quality
              A Model Context Protocol server that enables LLMs to manage network topologies, labs, nodes, and configurations in the EVE-NG network emulation platform through a standardized interface.
              Last updated -
              26
              1
              Python

            View all related MCP servers

            MCP directory API

            We provide all the information about MCP servers via our MCP API.

            curl -X GET 'https://glama.ai/api/mcp/v1/servers/mario-andreschak/mcp-gameboy'

            If you have feedback or need assistance with the MCP directory API, please join our Discord server