loading…
Search for a command to run...
loading…
MCP server for validating and linting Tonel formatted Smalltalk source code using tree-sitter-tonel-smalltalk
MCP server for validating and linting Tonel formatted Smalltalk source code using tree-sitter-tonel-smalltalk
A simple MCP server for validating and linting Tonel formatted Smalltalk source code using tree-sitter-tonel-smalltalk.
without-method-body: true
if true, it only validates tonel structure only (mainly for testing)
See docs/lint-checks.md for the full list of checks.
Run directly without cloning:
uvx --from git+https://github.com/mumez/smalltalk-validator-mcp-server.git@main smalltalk-validator-mcp-server
git clone https://github.com/mumez/smalltalk-validator-mcp-server.git
cd smalltalk-validator-mcp-server
uv sync
uvx --from git+https://github.com/mumez/smalltalk-validator-mcp-server.git@main smalltalk-validator-mcp-server
uv run smalltalk-validator-mcp-server
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"
]
}
}
}
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
# Validate a complete Tonel file with method bodies
validate_tonel_smalltalk_from_file("/path/to/MyClass.st")
# Validate only Tonel structure (without method body validation)
validate_tonel_smalltalk_from_file("/path/to/MyClass.st", {"without-method-body": true})
tonel_content = """
Class {
#name : #MyClass,
#superclass : #Object,
#category : #'My-Package'
}
{ #category : #accessing }
MyClass >> getValue [
^ 42
]
"""
validate_tonel_smalltalk(tonel_content)
method_body = "^ self name asUppercase"
validate_smalltalk_method_body(method_body)
# Lint a Tonel file for best practices and style issues
result = lint_tonel_smalltalk_from_file("/path/to/MyClass.st")
# Example result:
# {
# "success": true,
# "file_path": "/path/to/MyClass.st",
# "issue_list": [
# {
# "severity": "warning",
# "message": "Method 'longMethod' long: 18 lines (recommended: 15)",
# "class_name": "MyClass",
# "selector": "longMethod",
# "is_class_method": false
# }
# ],
# "issues_count": 1,
# "warnings_count": 0,
# "errors_count": 0
# }
tonel_content = """
Class {
#name : #MyClass,
#superclass : #Object,
#instVars : [
'name',
'age'
],
#category : #'My-Package'
}
{ #category : #accessing }
MyClass >> getName [
^ name
]
"""
result = lint_tonel_smalltalk(tonel_content)
# Install dependencies
uv sync
# Run tests
uv run pytest
# Lint and format
uv run ruff check
uv run ruff format
# Install pre-commit hooks
uv run pre-commit install
Выполни в терминале:
claude mcp add smalltalk-validator-mcp-server -- npx PRs, issues, code search, CI status
автор: GitHubDatabase, auth and storage
автор: SupabaseSecure file operations with configurable access controls.
Reference / test server with prompts, resources, and tools.
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории development