Skip to content

Commit 3f4c779

Browse files
committed
Update README.md
1 parent 2f10ed1 commit 3f4c779

File tree

2 files changed

+16
-104
lines changed

2 files changed

+16
-104
lines changed

MCP_README.md

Lines changed: 14 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Geargrafx MCP Server
22

3-
A [Model Context Protocol](https://modelcontextprotocol.io/introduction) (MCP) server for the Geargrafx emulator, enabling AI-assisted debugging and development of TurboGrafx-16 / PC Engine / SuperGrafx games.
3+
A [Model Context Protocol](https://modelcontextprotocol.io/introduction) server for the Geargrafx emulator, enabling AI-assisted debugging and development of TurboGrafx-16 / PC Engine / SuperGrafx games.
44

5-
This server provides comprehensive tools for game development, rom hacking, reverse engineering, and debugging through standardized MCP protocols compatible with AI agents like GitHub Copilot, Claude Desktop, ChatGPT and others.
5+
This server provides tools for game development, rom hacking, reverse engineering, and debugging through standardized MCP protocols compatible with AI agents like GitHub Copilot, Claude, ChatGPT and others.
66

77
## Features
88

@@ -114,30 +114,10 @@ The Geargrafx MCP server supports two transport modes:
114114

115115
The default mode uses standard input/output for communication. The emulator is launched by the AI client and communicates through stdin/stdout pipes.
116116

117-
**Advantages:**
118-
- Automatic lifecycle management (client starts/stops the emulator)
119-
- No network configuration needed
120-
- More secure (no open ports)
121-
122-
**Use cases:**
123-
- VS Code GitHub Copilot
124-
- Claude Desktop
125-
- Any MCP client with process management
126-
127117
### HTTP Transport
128118

129119
The HTTP transport mode runs the emulator with an embedded web server on `localhost:7777/mcp`. The emulator stays running independently while the AI client connects via HTTP.
130120

131-
**Advantages:**
132-
- Persistent emulator instance
133-
- Can connect/disconnect AI clients without restarting
134-
- Manual emulator control while debugging with AI
135-
136-
**Use cases:**
137-
- Advanced debugging workflows
138-
- Multiple AI client connections
139-
- Manual emulator testing with AI assistance
140-
141121
## Quick Start
142122

143123
### STDIO Mode with VS Code
@@ -164,25 +144,21 @@ The HTTP transport mode runs the emulator with an embedded web server on `localh
164144
- **Linux:** `/path/to/geargrafx`
165145
- **Windows:** `C:/path/to/geargrafx.exe`
166146

167-
3. **Restart VS Code** for settings to take effect
147+
3. **Restart VS Code** may be necessary for settings to take effect
168148

169149
4. **Open GitHub Copilot Chat** and start debugging:
170150
- The emulator will auto-start with MCP server enabled
171151
- Load a game ROM
172152
- Start chatting with Copilot about the game state
153+
- You can add context from "MCP Resources" if needed
173154

174155
### STDIO Mode with Claude Desktop
175156

176157
#### Option 1: Desktop Extension (Recommended)
177158

178159
The easiest way to install Geargrafx MCP server on Claude Desktop is using the MCPB package:
179160

180-
1. **Download the latest MCPB package** for your platform from the [releases page](https://github.com/drhelius/geargrafx/releases):
181-
- **macOS Intel:** `geargrafx-macos-x64.mcpb`
182-
- **macOS Apple Silicon:** `geargrafx-macos-arm64.mcpb`
183-
- **Windows Intel/AMD:** `geargrafx-windows-x64.mcpb`
184-
- **Windows ARM:** `geargrafx-windows-arm64.mcpb`
185-
- **Linux Intel/AMD:** `geargrafx-linux-x64.mcpb`
161+
1. **Download the latest MCPB package** for your platform from the [releases page](https://github.com/drhelius/geargrafx/releases).
186162

187163
2. **Install the extension**:
188164
- Open Claude Desktop
@@ -191,7 +167,7 @@ The easiest way to install Geargrafx MCP server on Claude Desktop is using the M
191167
- In the Extension Developer section, click **Install Extension…**
192168
- Select the downloaded `.mcpb` file
193169

194-
3. **Start debugging**: The extension is now available in your conversations. The emulator will automatically launch when Claude needs to access debugging tools.
170+
3. **Start debugging**: The extension is now available in your conversations. The emulator will automatically launch when the tool is enabled.
195171

196172
#### Option 2: Manual Configuration
197173

@@ -221,8 +197,6 @@ If you prefer to build from source or configure manually:
221197

222198
2. **Restart Claude Desktop**
223199

224-
3. **Start debugging**: The emulator will launch when Claude needs to access debugging tools
225-
226200
### HTTP Mode
227201

228202
1. **Start the emulator manually** with HTTP transport:
@@ -250,18 +224,6 @@ If you prefer to build from source or configure manually:
250224
}
251225
```
252226

253-
Or User Settings JSON:
254-
```json
255-
{
256-
"github.copilot.chat.mcp.servers": {
257-
"geargrafx": {
258-
"type": "http",
259-
"url": "http://localhost:7777/mcp"
260-
}
261-
}
262-
}
263-
```
264-
265227
3. **Or configure Claude Desktop**:
266228
```json
267229
{
@@ -276,7 +238,7 @@ If you prefer to build from source or configure manually:
276238

277239
4. **Restart your AI client** and start debugging
278240

279-
> **Note:** The MCP HTTP Server must be running standalone before connecting the AI client. Default port is 7777 (configurable with `--mcp-http-port`). In HTTP mode, the emulator stays running even when the AI client disconnects. You can manually load games and interact with the GUI while the AI assistant connects as needed.
241+
> **Note:** The MCP HTTP Server must be running standalone before connecting the AI client.
280242
281243
## Usage Examples
282244

@@ -311,75 +273,25 @@ Once configured, you can ask your AI assistant:
311273

312274
In addition to tools, the MCP server provides documentation resources that AI assistants can access to better understand the PC Engine / TurboGrafx-16 hardware and programming.
313275

314-
Resources are organized into categories and are automatically loaded when the server starts. They provide context and reference material for AI-assisted debugging and development.
276+
MCP clients usually offer reources in the "Add context..." section of the chat interface. You may need to manually add them when you think they are relevant.
315277

316278
### Hardware Documentation Resources
317279

318280
Complete technical reference documentation for all PC Engine / TurboGrafx-16 hardware components:
319281

320282
- **HuC6280 CPU — 8-bit CMOS Microprocessor** (`geargrafx://hardware/huc6280_cpu`)
321-
- 65C02-compatible core architecture
322-
- CPU registers (A/X/Y/S/P/PC) and status flags
323-
- Memory Management Unit (MMU) with 8×8KB page mapping
324-
- Interrupt controller, 7-bit timer, I/O ports
325-
- Clock speeds (1.79MHz/7.16MHz switchable)
326-
327283
- **HuC6280 Instruction Set Reference** (`geargrafx://hardware/huc6280_instructions`)
328-
- Complete instruction set with all 65C02 base opcodes
329-
- HuC6280 extensions (BBR/BBS/RMB/SMB/TST/TAM/TMA/SAX/SAY/SXY/ST0/ST1/ST2/CSL/CSH/CLA/CLX/CLY/TAI/TDD/TIA/TII/TIN)
330-
- Addressing modes, cycle counts, flags affected
331-
332284
- **HuC6280 PSG — Programmable Sound Generator** (`geargrafx://hardware/huc6280_psg`)
333-
- 6 waveform channels with 32-sample waveform memory
334-
- Dual noise generators (channels 5 and 6)
335-
- Low Frequency Oscillator (LFO)
336-
- Stereo balance control and Direct D/A mode (DDA)
337-
338285
- **HuC6270 VDC — Video Display Controller** (`geargrafx://hardware/huc6270_vdc`)
339-
- 64KB VRAM with internal registers (R00-R13)
340-
- Display timing control and sprite rendering
341-
- Sprite Attribute Table (SAT) and DMA operations
342-
- Dual-VDC SuperGrafx support
343-
344286
- **HuC6260 VCE — Video Color Encoder** (`geargrafx://hardware/huc6260_vce`)
345-
- 512×9-bit color RAM (3-bit R/G/B per entry)
346-
- Palette organization (16 palettes × 16 colors)
347-
- Color table access and analog video output
348-
349287
- **HuC6202 VPC — Video Priority Controller** (`geargrafx://hardware/huc6202_vpc`)
350-
- SuperGrafx dual-VDC (VDC#1/VDC#2) arbitration
351-
- Priority control registers and window-based layer visibility
352-
- Per-pixel priority resolution
353-
354288
- **PC Engine Memory Map** (`geargrafx://hardware/memory_map`)
355-
- 64KB logical / 2MB physical address space
356-
- MMU 8KB page translation (MPR0-MPR7)
357-
- Hardware register layout (VDC/$0000, VCE/$0400, PSG/$0800, Timer/$0C00, Input/$1000, IRQ/$1400)
358-
- RAM configuration, ROM banking, CD-ROM/Arcade Card extensions
359-
360-
### How Resources Work
361-
362-
Resources are read-only documentation that AI assistants can reference during conversations:
363-
364-
1. **Automatic Loading**: Resources are loaded when the MCP server starts
365-
2. **Context Enhancement**: AI assistants can retrieve resources to understand hardware specifics
366-
3. **Format**: Resources are provided in Markdown format for easy reading
367-
4. **URIs**: Each resource has a unique URI like `geargrafx://category/resource_id`
368-
369-
### Accessing Resources
370-
371-
Resources are accessed through the MCP protocol's resource capabilities:
372-
373-
- `resources/list` - List all available resources
374-
- `resources/read` - Read the content of a specific resource
375-
376-
AI clients automatically handle resource retrieval, so you typically don't need to manually request them. The AI assistant will fetch relevant resources when needed to answer your questions or provide better debugging assistance.
377289

378-
## How It Works
290+
## How MCP Works in Geargrafx
379291

380292
- The MCP server runs **alongside** the GUI in a background thread
381-
- The emulator GUI remains fully functional (you can play/debug normally)
382-
- Commands from the AI are queued and executed on the main thread
293+
- The emulator GUI remains fully functional (you can play/debug normally while using MCP)
294+
- Commands from the AI are queued and executed on the GUI thread
383295
- Both GUI and MCP share the same emulator state
384296
- Changes made through MCP are instantly reflected in the GUI and vice versa
385297

@@ -389,8 +301,8 @@ AI clients automatically handle resource retrieval, so you typically don't need
389301
```
390302
┌─────────────────┐ ┌──────────────────┐
391303
│ VS Code / │ stdio │ Geargrafx │
392-
│ Claude Desktop │◄──────────────────►│ MCP Server
393-
│ (AI Client) │ pipes │ (Background)
304+
│ Claude Desktop │◄──────────────────►│ MCP Server │
305+
│ (AI Client) │ pipes │ (background)
394306
└─────────────────┘ └──────────────────┘
395307
│ │
396308
└───► Launches ►────────────────────────┘
@@ -408,7 +320,7 @@ AI clients automatically handle resource retrieval, so you typically don't need
408320
┌─────────────────┐ ┌──────────────────┐
409321
│ VS Code / │ HTTP (port 7777) │ Geargrafx │
410322
│ Claude Desktop │◄──────────────────►│ MCP HTTP Server │
411-
│ (AI Client) │ │ (listener)
323+
│ (AI Client) │ │ (listener) │
412324
└─────────────────┘ └──────────────────┘
413325
414326
│ Shared State

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Don't hesitate to report bugs or ask for new features by [opening an issue](http
109109
- Supported platforms (standalone): Windows, Linux, BSD and macOS.
110110
- Supported platforms (libretro): Windows, Linux, macOS, Raspberry Pi, Android, iOS, tvOS, PlayStation Vita, PlayStation 3, Nintendo 3DS, Nintendo GameCube, Nintendo Wii, Nintendo WiiU, Nintendo Switch, Emscripten, Classic Mini systems (NES, SNES, C64, ...), OpenDingux, RetroFW and QNX.
111111
- Full debugger with just-in-time disassembler, CPU breakpoints, memory access breakpoints, code navigation (goto address, JP JR and JSR double clicking), debug symbols, automatic labels, memory editor, PSG inspector and video viewer including registers, tiles, sprites, backgrounds, CD-ROM sub-systems and both VDCs in SuperGrafx mode.
112-
- MCP server for AI-assisted debugging with GitHub Copilot, Claude Desktop, ChatGPT ..., exposing tools for execution control, memory inspection, hardware status, and more.
112+
- MCP server for AI-assisted debugging with GitHub Copilot, Claude, ChatGPT and similar, exposing tools for execution control, memory inspection, hardware status, and more.
113113
- Windows and Linux *Portable Mode*.
114114
- ROM loading from the command line by adding the ROM path as an argument.
115115
- ROM loading using drag & drop.
@@ -148,7 +148,7 @@ Options:
148148

149149
### MCP Server
150150

151-
Geargrafx includes a [Model Context Protocol](https://modelcontextprotocol.io/introduction) (MCP) server that enables AI-assisted debugging through AI agents like GitHub Copilot, Claude Desktop, ChatGPT... The server provides tools for execution control, memory inspection, breakpoints, disassembly, hardware status, sprite viewing, and more.
151+
Geargrafx includes a [Model Context Protocol](https://modelcontextprotocol.io/introduction) (MCP) server that enables AI-assisted debugging through AI agents like GitHub Copilot, Claude, ChatGPT and similar. The server provides tools for execution control, memory inspection, breakpoints, disassembly, hardware status, sprite viewing, and more.
152152

153153
For complete setup instructions and tool documentation, see [MCP_README.md](MCP_README.md).
154154

0 commit comments

Comments
 (0)