MCP is an in-image Model Context Protocol server for Pharo. It lets MCP clients inspect and change the running image through Pharo-aware tools for packages, classes, methods, tests, repositories, change history, debugging, and UI inspection.
MCP works through the Pharo ecosystem—compilation, refactorings, Renraku, SUnit, Iceberg, Metacello, Epicea, and Spec—rather than patching exported Tonel files as plain text.
Pharo 10, 11, 12, 13, 14, and 15 are supported.
Protocol revisions 2025-03-26, 2025-06-18, 2025-11-25 and 2026-07-28
are supported, each answered in its own shape.
Load MCP in a supported image:
Metacello new
baseline: 'MCP';
repository: 'github://Evref-BL/MCP:v4.x.x/src';
onConflictUseIncoming;
load.That loads the default group. To choose the groups, send load: with their
names in place of load. The baseline groups are:
Core: the server, its transport and schema machinery, and the catalog tools it dispatches throughIDE: the image tools — classes, methods, packages, tests, critiques, repositories, change history, debuggingUI: the world-menu windows and the inspector tabsTelemetry: the OpenTelemetry backendTests: the tests ofCoreandIDE;UI TestsandTelemetry Testshold those ofUIandTelemetrydefault:Core,IDEandUIall: every group, the tests included
An image without a display has no use for UI and loads #( 'Core' 'IDE' ).
A project embedding the server and serving tools of its own loads Core alone,
which leaves out the image tools and everything behind them. Loading its package
is all its tools need: a tool that names itself is in the catalog.
Building on MCP walks through
a tool, a resource and a prompt of your own, and shows how a project's baseline
depends on a release of MCP.
Start the Streamable HTTP server:
MCP startOnPort: 4000.Getting started says what it answers when the image already has a server there.
Connect a local MCP client to http://127.0.0.1:4000. Client configuration
formats differ; see Getting started for setup
and first calls.
- Documentation index
- Getting started
- Building on MCP
- Observability and UI
- Tool reference
- Developing MCP
Install the guide, local references, workflow skills, and direct MCP configuration for an agent host into the current project:
npx @evref-bl/pharo-mcp install --host claudeUse --host codex or --host opencode for those hosts. The direct MCP
configuration expects port 4000; update it when the image uses another port.
Node integrations that provide their own MCP transport can install only the guide, skills, references, and soft-loading instruction block:
import { installGuidance } from "@evref-bl/pharo-mcp";
installGuidance({ host: "codex", cwd: process.cwd() });An integration that places those files itself reads them from
templateDirectory(), the package's templates directory, which holds:
pharo.AGENTS.md, the guide;pharo-references/<name>.md, the references it routes to;pharo-skills/<name>/SKILL.md, the skills.
The guide routes to them as pharo-references/<name>.md and
skills/<name>/SKILL.md; an integration that installs the skills under other
paths rewrites those routes.
Live behavior must be verified in an image; source inspection alone is not enough. Start with AGENTS.md and Developing MCP.