Smalltalk Validator Mcp Server

by mumez

148 downloads
Not rated
GitHub

About

MCP server for validating and linting Tonel formatted Smalltalk source code using tree-sitter-tonel-smalltalk.

Details

Author
mumez
Downloads
148
Categories
Other

- Validate Tonel files from file path or content string.
- Validate Smalltalk method bodies for syntax correctness.
- Lint Tonel files for best practices and style issues.
- Option to skip method body validation with without-method-body.
- Returns structured results with issues, counts, and severities.

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Smalltalk Validator Mcp Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install with uvx --from git+https://github.com/mumez/smalltalk-validator-mcp-server.git@main smalltalk-validator-mcp-server or clone the repository and run uv run smalltalk-validator-mcp-server. Configure it as an MCP server in Cursor or Claude Code using the provided JSON or CLI commands. The server exposes five tools: validate_tonel_smalltalk_from_file, validate_tonel_smalltalk, validate_smalltalk_method_body, lint_tonel_smalltalk_from_file, and lint_tonel_smalltalk. Validation options include without-method-body to skip method body checking.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "smalltalk validator mcp server": {
            "smalltalk-validator": {
                "command": "uvx",
                "args": [
                    "--from",
                    "git+https://github.com/mumez/smalltalk-validator-mcp-server.git@main",
                    "smalltalk-validator-mcp-server"
                ]
            }
        }
    }
}

McpServers

{
    "smalltalk-validator": {
        "command": "uvx",
        "args": [
            "--from",
            "git+https://github.com/mumez/smalltalk-validator-mcp-server.git@main",
            "smalltalk-validator-mcp-server"
        ]
    }
}

smalltalk-validator-mcp-server

A simple MCP server for validating and linting Tonel formatted Smalltalk source code using
tree-sitter-tonel-smalltalk.

- The purpose is that we would like to validate and lint AI-generated tonel files and
Smalltalk method definitions before loading them into a real Smalltalk environment.

Tools

Validation Tools

validate_tonel_smalltalk_from_file(file_path, options)

- Validate Tonel formatted Smalltalk source code from a file

validate_tonel_smalltalk(file_content, options)

- Validate Tonel formatted Smalltalk source code from content string

validate_smalltalk_method_body(method_body_content)

- Validate a Smalltalk method body for syntax correctness

Validation Options

without-method-body: true
    if true, it only validates tonel structure only (mainly for testing)

Linting Tools

lint_tonel_smalltalk_from_file(file_path)

- Lint Tonel formatted Smalltalk source code from a file

lint_tonel_smalltalk(file_content)

- Lint Tonel formatted Smalltalk source code from content string

See docs/lint-checks.md for the full list of checks.

Installation

Quick install (uvx)

Run directly without cloning:

uvx --from git+https://github.com/mumez/smalltalk-validator-mcp-server.git@main smalltalk-validator-mcp-server

Development setup (git clone)

git clone https://github.com/mumez/smalltalk-validator-mcp-server.git
cd smalltalk-validator-mcp-server
uv sync

Usage

Running the MCP Server

- Using uvx (recommended for quick run):

uvx --from git+https://github.com/mumez/smalltalk-validator-mcp-server.git@main smalltalk-validator-mcp-server

- From a cloned repo:

uv run smalltalk-validator-mcp-server

Configuration Examples

Cursor Configuration

Add to your .cursor/settings.json:

{
  "mcpServers": {
    "smalltalk-validator": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/mumez/smalltalk-validator-mcp-server.git@main",
        "smalltalk-validator-mcp-server"
      ]
    }
  }
}

If you prefer using a local clone, use this instead:

{
  "mcpServers": {
    "smalltalk-validator": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/smalltalk-validator-mcp-server",
        "run",
        "smalltalk-validator-mcp-server"
      ]
    }
  }
}

Claude Code Configuration

Add to your Claude Code settings:

claude mcp add smalltalk-validator -- uvx --from git+https://github.com/mumez/smalltalk-validator-mcp-server.git@main smalltalk-validator-mcp-server

Using a local clone instead:

claude mcp add smalltalk-validator -- uv --directory /path/to/smalltalk-validator-mcp-server run smalltalk-validator-mcp-server

Tool Usage Examples

Validate Tonel file from filesystem

```python

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.