Working with GT as an MCP server

GT ships with a minimal implementation of an MCP server that can execute tools, expose resources, and define prompts.

To start an MCP server on port 3000, execute the following snippet.

server := GtLMcpServer new
		port: 3000;
		start
  

To stop the server, you can call GtMcpServer>>#stop stop server ifNotNil: [ server stop. server := nil ] on it.

server stop
  

A note: this server was not hardened. It is a simple Zinc server that might crash or, depending on the capabilities you give the tools it exposes, do undesirable things to your image or system at large. Use with caution at this time.