Menu ▾ ▴

#19 An MCP mode for the client, so that AI tools can drive GxInspect

open
nobody
None
2026-10-13
2026-10-13
No

AI coding tools such as Claude Code, Claude Desktop, Cursor or OpenAI's Codex CLI take tools through the Model Context Protocol (MCP). Today an agent can only drive GxInspect by running the console client in a shell. That means shell quoting, a permission prompt for every command, screenshots written to a file and read back, and no way for the AI tool to tell a command that reads from one that changes something.

Proposal: GxInspect.exe --mcp speaks MCP over stdin and stdout (JSON-RPC, one message per line) and forwards to the servers over the existing protocol, finding them through the discovery files and authenticating with their token as now. Registering it is one line, e.g. claude mcp add gxinspect -- C:\Tools\GxInspect\GxInspect.exe --mcp. Nothing changes in the server packages.

Few tools, since every tool definition costs context in every conversation:

  • list_ides: what --list shows; picks the IDE that later calls go to unless they name one
  • query: the commands that only read
  • act: the commands that change something, marked destructive so that the AI tool asks before each one
  • screenshot: returns the image itself, which MCP has a content type for, instead of a file name

To settle:

  • Which commands only read. Each command is registered by the server, so the registration should say whether it changes anything, rather than the client keeping a list of its own.
  • The tool descriptions come from HELP ALL of the connected server, since a GExperts DLL adds commands of its own.
  • ERROR answers set MCP's error flag; the text stays plain text.
  • Timeouts per command: STEP and RUNTO wait up to 600 s, and a busy main thread (ticket #12) has to give an answer rather than a hang.
  • A stopped debuggee cannot answer its own server; the tool should say so instead of waiting.
  • JSON: the Delphi 13 build of the client has System.JSON, a Delphi 2007 build has not. Either the MCP mode exists only in the Delphi 13 build, or it gets a small JSON reader of its own.

Not proposed: MCP over HTTP directly from the server package. Threading and authentication would move into the IDE, and every IDE would have to be registered with the AI tool separately, where the client finds them through the discovery files.

A usage guide for AI agents (AGENTS.md) is the first, cheaper step and covers the console client as it is.

Related: #6 (a windowed client).

Discussion


Log in to post a comment.