Pharo MCP Server logo

Pharo MCP Server

by paulwilke

Pharo MCP Server is a Pharo Smalltalk implementation of Anthropic's Model Context Protocol (MCP) server specification. It enables Large Language Models like Claude to interact with Pharo applications.

View on GitHub

Last updated: N/A

What is Pharo MCP Server?

This project is a server-side implementation of the Model Context Protocol (MCP) specification for the Pharo Smalltalk environment. It allows developers to expose functionalities within their Pharo applications as 'tools' that MCP-compliant LLMs can discover and invoke through the standardized protocol.

How to use Pharo MCP Server?

The server is intended to be loaded using Metacello. After loading, developers can register Pharo methods or blocks as MCP tools using the provided API. The server then automatically generates the MCP Service Description JSON based on the registered tools and their metadata.

Key features of Pharo MCP Server

  • MCP Specification Compliance

  • Dynamic Tool Registration

  • Automatic Service Description

  • Web Server Integration (Teapot)

  • JSON Handling (NeoJSON)

  • Extensible

  • Input validation using JSON Schema definitions (Planned)

  • Integration helpers for common Pharo object models (Voyage) (Planned)

Use cases of Pharo MCP Server

  • Querying data from Pharo applications using LLMs

  • Creating objects in Pharo applications via LLM commands

  • Triggering actions within Pharo applications through LLM interaction

  • Integrating Pharo applications with LLM-powered workflows

FAQ from Pharo MCP Server

What is MCP?

The Model Context Protocol (MCP) is a specification designed to standardize how Large Language Models (LLMs) interact with external tools and services.

What is the goal of this project?

To provide a robust and easy-to-use server-side implementation of the MCP specification specifically for the Pharo Smalltalk environment.

How do I install this server?

Use Metacello to load the project into your Pharo image.

How do I define tools?

The project provides a simple API to register Pharo methods or blocks as MCP tools.

What web framework does this use?

This project uses the Teapot micro web framework.