Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@pharo-nc-mcp-servershow me the definition of the OrderedCollection class"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
pharo-nc-mcp-server
A local MCP server to evaluate Pharo Smalltalk expressions and get system information via NeoConsole.
Prerequisites
Python 3.10 or later
uv package manager
Pharo with NeoConsole installed
Pharo Setup
Install Pharo and NeoConsole
Set the
PHARO_DIRenvironment variable to your Pharo installation directory (default:~/pharo)Ensure
NeoConsole.imageis available in the Pharo directory
Installation
Clone the repository:
Install dependencies using uv:
Usage
Running the MCP Server
Start the server:
Cursor MCP settings
MCP Tools Available
evaluate_smalltalk_with_neo_console
Execute Smalltalk expressions in Pharo using NeoConsole:
evaluate_simple_smalltalk
Execute Smalltalk expressions using Pharo's simple -e option:
get_pharo_metric
Retrieve system metrics from Pharo:
get_class_comment
Get the comment of a Pharo class:
get_class_definition
Get the definition of a Pharo class:
get_method_list
Get the list of method selectors for a Pharo class:
get_method_source
Get the source code of a specific method in a Pharo class:
Environment Variables
PHARO_DIR: Path to Pharo installation directory (default:~/pharo)
Development
Code Formatting and Linting
Development Scripts
The project includes several convenience scripts in the scripts/ directory:
scripts/format.sh
Formats all code and documentation files in one command:
Formats Python code using Black
Formats markdown files using mdformat
Runs linting checks with Ruff
scripts/test.sh
Runs the test suite using pytest: