Token导航 LogoToken导航TokenDH.com
Pharo Nc MCP Server logo
开发工具stdio官方级别未说明来源级核验

Pharo Nc MCP Server

MCP Server

一个本地MCP服务器,用于通过NeoConsole评估Pharo Smalltalk表达式和获取系统信息。

工具数

6

提示词数

0

GitHub Stars

2

资源数

0
Python开发工具命令行工具

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

mumez

提供方

mumez

最后核验

2026/5/17 20:23

运行时

Python

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

uv run pharo-nc-mcp-server

详细介绍

pharo nc mcp服务器

![Tests](https://github.com/mumez/pharo-nc-mcp-server/actions/workflows/test.yml)

本地MCP服务器,用于评估Pharo Smalltalk表达式并通过以下方式获取系统信息 NeoConsole.

先决条件

  • Python 3.10或更高版本
  • 紫外线 包管理器
  • 安装了NeoConsole的Pharo

Pharo设置

  1. 安装Pharo和NeoConsole
  2. 设置 PHARO_DIR 将环境变量添加到Pharo安装目录(默认值: ~/pharo)
  3. 确保 NeoConsole.image 可在Pharo目录中找到

安装

  1. 克隆存储库:
git clone 
cd pharo-nc-mcp-server
  1. 使用uv安装依赖项:
uv sync --dev

用法

运行MCP服务器

启动服务器:

uv run pharo-nc-mcp-server

光标MCP设置

{
  "mcpServers": {
    "pharo-nc-mcp-server": {
      "command": "uv",
      "args": [
        "--directory",
        "/your-path/to/pharo-nc-mcp-server",
        "run",
        "pharo-nc-mcp-server"
      ]
    }
  }
}

MCP工具可用

evaluate_smalltalk_with_neo_console

使用NeoConsole在Pharo中执行Smalltalk表达式:

# Example usage in MCP client
evaluate_smalltalk_with_neo_console(expression="42 factorial", command="eval")

evaluate_simple_smalltalk

使用Pharo的simple-e选项执行Smalltalk表达式:

# Simple evaluation
evaluate_simple_smalltalk(expression="Time now")

get_pharo_metric

从Pharo检索系统指标:

# Get system status
get_pharo_metric(metric="system.status")

# Get memory information
get_pharo_metric(metric="memory.free")

get_class_comment

获取Pharo类的注释:

# Get Array class comment
get_class_comment(class_name="Array")

get_class_definition

获取Pharo类的定义:

# Get Array class definition
get_class_definition(class_name="Array")

get_method_list

获取Pharo类的方法选择器列表:

# Get all method selectors for Array class
get_method_list(class_name="Array")

get_method_source

获取Pharo类中特定方法的源代码:

# Get source code for Array>>asSet method
get_method_source(class_name="Array", selector="asSet")

环境变量

  • PHARO_DIR:Pharo安装目录的路径(默认: ~/pharo)

发展

代码格式化和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

开发脚本

该项目在 scripts/ 目录:

scripts/format.sh

在一个命令中格式化所有代码和文档文件:

  • 使用黑色格式化Python代码
  • 使用mdformat格式化markdown文件
  • 与Ruff一起运行linting检查
./scripts/format.sh

scripts/test.sh

使用pytest运行测试套件:

./scripts/test.sh

目录标签

目录标签

Python开发工具命令行工具Smalltalk本地部署PharoMCP服务器代码评估

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Python

部署方式(deploymentType,部署类型)

local-only

工具数量(toolCount,工具数)

6

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdiononelocal-only

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP