pharo-nc-mcp-server
A local MCP server that enables users to evaluate Pharo Smalltalk expressions and retrieve system information via NeoConsole. It provides comprehensive tools for inspecting class definitions, method sources, and system metrics within a Pharo environment.
README
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:
git clone <repository-url>
cd pharo-nc-mcp-server
- Install dependencies using uv:
uv sync --dev
Usage
Running the MCP Server
Start the server:
uv run pharo-nc-mcp-server
Cursor 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.sh
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/format.sh
scripts/test.sh
Runs the test suite using pytest:
./scripts/test.sh
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
E2B
Using MCP to run code via e2b.