GemStone MCP Server

An alpha port of the GtLMcpServer Object << #GtLMcpServer slots: { #port . #tools . #resources . #prompts . #server . #history . #errors . #debug . #asynchronous . #currentAsyncExecution . #objectStorage . #summarizersRegistry . #announcer }; sharedVariables: { #Current }; tag: 'Mcp'; package: 'Gt4LlmCore' may be installed on top of non-Rowan GemStone databases.

After installing GemStone, typically following the instructions in gt4gemstone server installation perform the following two additional steps:

1. Install the Zinc web server components:

gt4gemstone/scripts/zinc/inputZinc.sh

The output should show an errorCount of 0 at the end.

2. Install magritte, gt4llm and GT compatibility code:

gt4gemstone/scripts/inputGT.sh

The output should show an errorCount of 0 at the end.

Start the MCP server from the command line:

        
cd gt4gemstone/scripts
topaz -l -I loginSystemUser.topaz -S mcp_server_13442.topaz < /dev/zero
        
      

The MCP server only operates in synchronous mode.

Only a subset of the available tools are supported, see GtLTools>>#onGemstone onGemstone "Answer the set of tools available to the GemStone MCP server. i.e. the MCP server running in GemStone." ^ GtLTools gtSearch, GtLTools gtCodeChange, GtLTools gtExamplesRun, (GtLTools gtObjectsExecution reject: [ :each | each name = 'getViewContent' ]). .

The magritte, gt4llm and GT compatibility code is all managed from GT using the following mechanisms:

Code is exported to topaz files for loading in to GemStone. The general export mechanism is GtGemStoneTopazExporter Object << #GtGemStoneTopazExporter slots: { #packageNames . #additionalClasses . #stubClasses . #excludedClasses . #excludedMethods . #includeGsCodeMethods . #gsCodeClasses . #gemstoneClassNames . #newMethodPackageNames . #newMethodClassNames . #selectedClasses . #alternateClassDefinitions }; tag: 'Export'; package: 'GToolkit-GemStone-Pharo' . The code to be exported is specified by GtGemStoneGtCodeExporter Object << #GtGemStoneGtCodeExporter slots: { #exporter }; tag: 'Export'; package: 'GToolkit-GemStone-Pharo' .

Where GemStone specific code is required, three mechanisms are used:

Object>>#gtDo:gemstoneDo: gtDo: gtoolkitBlock gemstoneDo: gemstoneBlock "Evaluate the supplied platform specific block" ^ gtoolkitBlock value allows parts of a method to be platform specific.

The gsCode: pragma allows an alternative method definition on GemStone.

GtGemStoneExtensionMethod Object << #GtGemStoneExtensionMethod slots: { #selector . #protocol . #source . #meta . #gtVersions . #className . #hash }; package: 'GToolkit-GemStone' allows a method to be overwritten on GemStone. The collection of extension methods to be applied is held in GtGemStoneExtensionMethods Object << #GtGemStoneExtensionMethods slots: {}; package: 'GToolkit-GemStone' .

GemStone compatibility and development rules provides guidelines to help LLMs write compatible code.

inputGT.sh above loads the magritte, gt4llm and GT compatibility code from gemstone/src-gs/GT.gs.

To update this file evaluate:

GtGemStoneGtCodeExporter new export
  

It is not unusual to an attempt to reload the newly exported code to fail due to inadvertent GemStone incompatibilities being made.

Updating GT.gs and load in to GemStone contains a process for a LLM to follow to identify and resolve GemStone incompatibilities.