home / mcp / claudesmalltalk mcp server
Provides live Smalltalk interaction through MCP to evaluate code, browse classes, and modify methods within running Smalltalk images.
Configuration
View docs{
"mcpServers": {
"corporatesmalltalkconsultingltd-claudesmalltalk": {
"command": "/path/to/CuisVM.app/Contents/MacOS/Squeak",
"args": [
"/path/to/ClaudeCuis.image",
"--mcp"
],
"env": {
"MQTT_PORT": "1883",
"MQTT_BROKER": "YOUR_MQTT_BROKER",
"MQTT_PASSWORD": "YOUR_PASSWORD",
"MQTT_USERNAME": "YOUR_USERNAME",
"CLAUDE_TIMEOUT": "30",
"OPENAI_API_KEY": "sk-...",
"CLAUDE_IMAGE_ID": "dev1"
}
}
}
}You can connect Claude to live Smalltalk images using MCP (Model Context Protocol) to evaluate code, browse classes, define methods, and more in a running Smalltalk environment. This MCP server setup lets Claude communicate with a Smalltalk image through either native local MCP servers or bridge-based options, providing real-time interaction and tooling inside your Smalltalk workspace.
Choose an MCP client path that matches your setup. You can run a local, native MCP server that talks to your Smalltalk image directly, or use bridge-based options that connect Claude over a network or cloud service. Once configured, you can ask Claude to evaluate Smalltalk expressions, inspect class structures, view and edit methods, browse hierarchies, and save image state when dev tools are enabled.
Prerequisites vary by option. Ensure you pick a compatible Smalltalk image, MCP server, and the language/runtime your bridge requires. Follow the concrete steps for your chosen path below.
This is a local, self-contained setup that requires no Python or MQTT broker. Claude communicates directly with a Cuis Smalltalk image via MCP over stdio.
This is a local, self-contained setup that keeps the Squeak GUI responsive while Claude talks to a Squeak 6.0 MCPServer over stdio. It provides very fast request handling.
This path uses a Python bridge and MQTT broker to connect Claude to a Cuis Smalltalk image. It is development-friendly, allowing the image to stay running with its GUI while Claude interacts via the bridge.
This path enables ChatGPT to execute Smalltalk code through a Python bridge, sharing the same 14 tools. It requires a Python 3.10+ runtime and an OpenAI API key.
This path connects a Clawdbot AI agent to a Squeak 6.0 MCPServer, enabling persistent daemon interaction and project-based workflows. It requires headless operation tools and an OpenAI-like key setup.
This section shows the concrete MCP server blocks you will configure in Claude. Each option includes a stdio (local) command and argument list, plus any environment variables shown for that path.
β’ Tools and actions are exposed as named endpoints you call from Claude, such as evaluating code, browsing classes, viewing sources, and managing image state. β’ Environment variables shown in the examples control broker connections, image identifiers, and timeouts. Use placeholders where values are not provided. β’ When you see an installation or startup flow, follow the exact commands and file paths shown to ensure MCP starts correctly.
If Claude cannot reach your Smalltalk image, verify the MCP channel is up, the imageId matches your config, and the broker or stdio path is correct. For Squeak GUI freezes, ensure OSProcess is installed and the MCP transport uses BufferedAsyncFileReadStream. Check that the dev mode tools are enabled if you expect save capabilities.
The following are typical files involved in the MCP workflow: MCP-Server.pck.st, MCP-Server-Squeak.st, ClaudeCuis.image, ClaudeCuis_mcp.py, openai_mcp.py, OPENAI-SETUP.md, SQUEAK-SETUP.md, CLAWDBOT-SETUP.md, and various package and test files used to install and run the MCP bridge.
Common tasks include evaluating Smalltalk expressions, listing classes, inspecting methods, editing class definitions, and saving the image in dev mode. You can also query subclass relationships, retrieve class hierarchies, and manage code in a running Smalltalk image.
When exposing commands over MCP, protect access to the broker or local stdio channels. Use strong credentials for MQTT where applicable, limit image access, and disable dev-only actions in production. Review environment variables and ensure API keys or tokens are kept secure.
If upgrading between options, plan for moving from a local stdio MCPServer to a bridge-based setup or vice versa. Preserve image identifiers and key tools while migrating endpoints, and reconfigure Claude to point to the new mcpServers entries.
Pick a path: Cuis Native MCP, Squeak Native MCP, Python/MQTT Bridge, OpenAI Bridge, or Clawdbot. Gather the Smalltalk image, the MCP server package, and any required runtime (Python or Node) per option. Copy the example MCP configuration snippet into Claudeβs MCP settings and start the respective server. Then ask Claude to evaluate code, browse classes, or save changes as needed.
Note: The following tools are exposed by the MCP setup to interact with Smalltalk. These tools provide a range of capabilities from evaluating code to inspecting and modifying the image.
Key environment variables shown in setups include MQTT_BROKER, MQTT_PORT, MQTT_USERNAME, MQTT_PASSWORD for MQTT-based bridges, CLAUDE_IMAGE_ID for selecting the target image, CLAUDE_TIMEOUT for response timeouts, OPENAI_API_KEY for OpenAI bridge usage, and SQUEAK_VM_PATH and SQUEAK_IMAGE_PATH for OpenAI/Clawdbot/OpenAI-based paths.
Requests flow on claude/request/{imageId} and responses come back on claude/response/{requestId}, enabling structured communication between Claude and the Smalltalk image.
Test MQTT connectivity by subscribing to all topics and then validate the Python bridge startup with environment variables set to your broker. Run unit tests and integration tests when broker-based flows are used.
In development mode, you can save images and versions. Some actions, like saving the image, are restricted when not in dev mode. Ensure you enable dev mode if you rely on save capabilities.
Execute Smalltalk code and return the result
Get class metadata including superclass, instance vars, and methods
View source code of a method, with support for class-side methods via a side parameter
Create or modify a class definition
Add or update a method in a class
Remove a method from a class
Remove a class from the system
List classes matching a prefix
Get the superclass chain for a class
Get immediate subclasses of a class
List all system categories
List classes in a category
Save the current image in place (dev mode only)
Save image/changes as the next version (dev mode only)