pharo-smalltalk-interop-mcp-server is a local MCP (Model Context Protocol) server used to communicate with a local Pharo Smalltalk image.
This project has been migrated: since v4.0.0, development has moved to smalltalk-interop-mcp-server, and the new repository adds SIS server support for Squeak in addition to Pharo. This repository is retained only as a historical reference, and it is recommended to use the new repository for the latest features and updates.
Main capabilities
- Code evaluation: execute Smalltalk expressions and return results.
- Code introspection: retrieve class and method source code, comments, and metadata.
- Search and discovery: find classes, traits, methods, references, and implementors.
- Package management: export and import packages in Tonel format.
- Project installation: install projects using Metacello.
- Test execution: run test suites at the package or class level.
- UI debugging: capture screenshots and inspect the UI structure of World morphs, Spec presenters, and Roassal visualizations.
- Server configuration: dynamically retrieve and modify server settings.
Usage
Environment requirements: Python 3.10 or higher, the uv package manager, and Pharo with PharoSmalltalkInteropServer installed.
It can be run quickly via uvx (without cloning the repository), or after cloning the repository, use uv for development installation and running.
The server can be configured via environment variables, for example PHARO_SIS_PORT (the port number of PharoSmalltalkInteropServer, default 8086).
It supports configuration and use in Cursor MCP settings and Claude Code.
Available tools
This server provides 22 MCP tools, mapped to all PharoSmalltalkInteropServer APIs, including: eval, get_class_source, get_method_source, get_class_comment, search_classes_like, search_methods_like, search_traits_like, search_implementors, search_references, search_references_to_class, list_packages, list_classes, list_extended_classes, list_methods, export_package, import_package, install_project, run_package_test, run_class_test, read_screen, get_settings, apply_settings.
The read_screen tool supports the target_type parameter (default 'world', optional 'spec', 'roassal') and the capture_screenshot parameter, returning UI structure, screenshots, and a readable summary. The extracted data covers World (class name and type, boundary coordinates, visibility, background color, text content), Spec (window title and class name, geometry, window state, decorations, presenter hierarchy), and Roassal (canvas bounds and visibility, class identity, background color and zoom level, shape and edge details, node and edge counts).
The get_settings and apply_settings tools provide dynamic server configuration management; settings take effect immediately in the current session and support arbitrary key-value pairs.
Applicable scenarios
Suitable for developers who need to perform code operations, introspection, package management, project installation, test execution, and UI debugging on a local Pharo Smalltalk image.
Limitations
This project has been migrated; the current repository is only for historical reference and no longer receives the latest features and updates. It is recommended to use the new repository smalltalk-interop-mcp-server. The test suite uses mock-based tests and can run without a live Pharo instance. Other specific limitations are not provided at this time.