pharo-nc-mcp-server
Click on "Deploy 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-server show 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
Related MCP server: pharo-smalltalk-interop-mcp-server
Installation
Clone the repository:
git clone <repository-url>
cd pharo-nc-mcp-serverInstall dependencies using uv:
uv sync --devUsage
Running the MCP Server
Start the server:
uv run pharo-nc-mcp-serverCursor MCP settings
{
"mcpServers": {
"pharo-nc-mcp-server": {
"command": "uv",
"args": [
"--directory",
"/your-path/to/pharo-nc-mcp-server",
"run",
"pharo-nc-mcp-server"
]
}
}
}MCP Tools Available
evaluate_smalltalk_with_neo_console
Execute Smalltalk expressions in Pharo using NeoConsole:
# Example usage in MCP client
evaluate_smalltalk_with_neo_console(expression="42 factorial", command="eval")evaluate_simple_smalltalk
Execute Smalltalk expressions using Pharo's simple -e option:
# Simple evaluation
evaluate_simple_smalltalk(expression="Time now")get_pharo_metric
Retrieve system metrics from Pharo:
# Get system status
get_pharo_metric(metric="system.status")
# Get memory information
get_pharo_metric(metric="memory.free")get_class_comment
Get the comment of a Pharo class:
# Get Array class comment
get_class_comment(class_name="Array")get_class_definition
Get the definition of a Pharo class:
# Get Array class definition
get_class_definition(class_name="Array")get_method_list
Get the list of method selectors for a Pharo class:
# Get all method selectors for Array class
get_method_list(class_name="Array")get_method_source
Get the source code of a specific method in a Pharo class:
# Get source code for Array>>asSet method
get_method_source(class_name="Array", selector="asSet")Environment Variables
PHARO_DIR: Path to Pharo installation directory (default:~/pharo)
Development
Code Formatting and Linting
# Format code
uv run black pharo_nc_mcp_server/
# Lint code
uv run ruff check pharo_nc_mcp_server/
# Run tests
uv run python -m pytest
# Or use the test script
./scripts/test.shDevelopment 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/format.shscripts/test.sh
Runs the test suite using pytest:
./scripts/test.shAvailable Tools
11 toolsevaluate_simple_smalltalkB
Evaluate a Pharo Smalltalk expression using the simple -e option.
Args:
expression: The Smalltalk expression to evaluate
Returns:
The result of the evaluation
Inputs: expression (required).
evaluate_smalltalk_with_neo_consoleC
Evaluate a Pharo Smalltalk expression using NeoConsole.
Args:
expression: The Smalltalk expression to evaluate
command: The NeoConsole command to use (default: eval)
Returns:
The result of the evaluation
Inputs: expression (required), command.
get_class_commentC
Get the comment of a Pharo class.
Args:
class_name: The name of the class to get the comment for
Returns:
The class comment
Inputs: class_name (required).
get_class_definitionB
Get the definition of a Pharo class.
Args:
class_name: The name of the class to get the definition for
Returns:
The class definition
Inputs: class_name (required).
get_method_listB
Get the list of method selectors for a Pharo class.
Args:
class_name: The name of the class to get method selectors for
Returns:
The list of method selectors
Inputs: class_name (required).
get_method_sourceA
Get the source code of a specific method in a Pharo class.
Args:
class_name: The name of the class
selector: The method selector (message name)
Returns:
The method source code
Inputs: class_name (required), selector (required).
get_neo_console_command_historyA
Get the command history from the current NeoConsole session.
Returns:
The command history as a string, showing numbered entries of previously executed commands
Inputs: no named parameters.
get_pharo_metricC
Get a system metric from Pharo using NeoConsole.
Args:
metric: The metric to retrieve (e.g., 'system.status', 'memory.free')
Returns:
The metric value
Inputs: metric (required).
install_packageB
Install a Pharo package using Metacello.
Args:
baseline: The baseline name of the package (e.g., 'Historia')
repository: The repository URL (e.g., 'github://mumez/Historia:main/src')
Returns:
The result of the package installation
Inputs: baseline (required), repository (required).
quit_neo_consoleA
Send quit command to NeoConsole to terminate the REPL session.
Returns:
The result of the quit command
Inputs: no named parameters.
shutdown_repl_sessionB
Shutdown the persistent NeoConsole REPL session and server.
Returns:
The result of the shutdown operation
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Most tools have distinct purposes, but there is significant overlap between the two evaluation tools (evaluate_simple_smalltalk and evaluate_smalltalk_with_neo_console) which could cause confusion. The two shutdown tools (quit_neo_console and shutdown_repl_session) also have unclear boundaries, though their descriptions provide some differentiation.
All tools follow a consistent verb_noun naming pattern with snake_case throughout. The naming convention is predictable and readable, with clear action-object relationships (e.g., get_class_comment, install_package, shutdown_repl_session).
With 11 tools, the count is reasonable for a Pharo development server. However, there is some redundancy (two evaluation tools, two shutdown tools) that suggests the count could be slightly optimized without losing functionality.
The toolset covers core Pharo development operations like class/method inspection, package installation, and system metrics, but has notable gaps. There are no tools for creating or modifying classes/methods, running tests, or managing the Pharo image beyond shutdown operations, which limits workflow coverage.
Maintenance
Related MCP Connectors
Repository knowledge graph MCP server for codebase understanding and debugging.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
Self-hosted MCP server: 26 deterministic dev, security, and EVM tools.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that captures browser console logs and network requests via the Chrome DevTools Protocol. It allows users to monitor real-time logs, inspect network traffic, and execute JavaScript code directly in the browser context.1MIT
- AlicenseAqualityFmaintenanceMCP server to communicate local Pharo Smalltalk image2212MIT
- AlicenseBqualityCmaintenanceMCP server for searching, browsing, and analyzing decompiled Minecraft source code locally. Supports symbol lookup, text search, reference lookup, and lightweight RAG.11Apache 2.0
- AlicenseNot gradedqualityBmaintenanceMCP server for local codebase analysis, enabling semantic code search, impact analysis, and pack-scoped retrieval with cited file:line results.85 PyPI1Apache 2.0