Iris is a Model Context Protocol (MCP) server running inside a live Pharo image.
It was developed with Claude AI in several pair programming sessions.
It allows Claude Desktop (or any MCP client) to inspect and interact with a running Pharo image.
| Tool | Description | Parameters |
|---|---|---|
pharo:eval |
Evaluates a Smalltalk expression in the Pharo image and returns the printString of the result |
expression (string, required) |
pharo:get_class |
Returns the definition and all method sources for a named class, both instance-side and class-side | class_name (string, required) |
pharo:get_method |
Returns the source of a single method | class_name (string, required), selector (string, required), class_side (boolean, optional) |
pharo:list_classes |
Lists all classes in the image, with optional filtering | prefix (string, optional), package (string, optional) |
pharo:run_tests |
Runs a TestCase subclass (or a single test method) and returns pass/fail/error counts with failure messages. Alternatively, runs all TestCase subclasses in a package |
class_name (string, optional), package (string, optional), selector (string, optional) |
Claude Desktop
↕ stdio
mcp-remote (Node.js proxy)
↕ HTTP POST /mcp
Pharo Image (Zinc HTTP server on port 9999)
Metacello new
baseline: 'Iris';
repository: 'github://koendehondt/iris-for-pharo:main';
onConflict: [ :e | e useIncoming ];
onUpgrade: [ :e | e useIncoming ];
ignoreImage;
load"IrisMCPServer implements the Singleton design pattern."
IrisMCPServer current.
"Starting the server."
IrisMCPServer current start.
"Checkng whether the server is running."
IrisMCPServer current isRunning.
"Stopping the server."
IrisMCPServer current stopBy default, the server runs on port 9999. To run on a custom port, 8888 for instance, evaluate
IrisMCPServer current stop.
IrisMCPServer current: (IrisMCPServer onPort: 8888).
IrisMCPServer current startThe server keeps a log of the incoming requests and the corresponding responses. Logging can be turned on and off.
"Start logging."
IrisMCPServer current startLogging.
"Checkng whether the server is logging."
IrisMCPServer current isLogging.
"Stop logging."
IrisMCPServer current stopLogging.The Pharo menubar includes an Iris menu, with a command to open the Iris MCP Server.
The window is a kind of console to start and stop the server, to start and stop logging, and to browse the log. Browsing the log is handy to keep an eye on what the agent is doing inside the Pharo image.
Install mcp-remote and add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"pharo": {
"command": "/path/to/node",
"args": [
"/path/to/mcp-remote/dist/proxy.js",
"http://localhost:9999/mcp"
]
}
}
}
