- Home
- MCP servers
- Pharo NC
Pharo NC
- python
2
GitHub Stars
python
Language
4 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
You have a local MCP server that lets you evaluate Pharo Smalltalk expressions and retrieve Pharo system information from NeoConsole. It runs on your machine, accepts commands from an MCP client, and returns results you can use in dashboards, editors, or automation scripts.
How to use
Start the MCP server from your project directory using the built-in runtime. Once the server is running, you can connect with an MCP client to evaluate Smalltalk expressions, fetch Pharo metrics, inspect class information, and retrieve method sources. Use the provided MCP tools to perform common tasks like evaluating expressions, inspecting class definitions, and querying system metrics.
How to install
Prerequisites you need before installing the MCP server are as follows.
Install Python 3.10 or later.
Install the uv package manager.
Install Pharo and NeoConsole, and set up the Pharo directory environment variable as described in the next steps.
Set the PHARO_DIR environment variable to your Pharo installation directory (default: ~/pharo). Ensure NeoConsole.image is available in the Pharo directory.
Clone the MCP server repository to your local machine and move into the project directory.
Install dependencies using uv, then start the server.
Configuration and running the server
{
"mcpServers": {
"pharo_nc_mcp_server": {
"command": "uv",
"args": [
"--directory",
"/your-path/to/pharo-nc-mcp-server",
"run",
"pharo-nc-mcp-server"
]
}
}
}
Notes on running and development
The server relies on Python 3.10+, the uv package manager, and Pharo with NeoConsole. You can run the server with the provided command, and you can adjust the directory argument to point to your local copy of the MCP server code.
Security and best practices
Run the MCP server on a trusted network or localhost during development. Do not expose the server to untrusted networks without proper authentication and access controls. Keep your Pharo environment up to date and monitor any expressions or code executed through the server.
Examples and common tasks
Evaluate Smalltalk expressions via NeoConsole, retrieve system metrics, and inspect Pharo class definitions or method sources using the available MCP tools.
Available tools
evaluate_smalltalk_with_neo_console
Execute Smalltalk expressions in Pharo using NeoConsole and return results.
evaluate_simple_smalltalk
Evaluate Smalltalk expressions using Pharo's simple -e option and return results.
get_pharo_metric
Retrieve system metrics from Pharo such as memory and status.
get_class_comment
Get the comment of a specified Pharo class.
get_class_definition
Get the full definition of a specified Pharo class.
get_method_list
Retrieve all method selectors for a given Pharo class.
get_method_source
Fetch the source code for a specific method in a Pharo class.