galaxy-tool-refactor-mcp
An MCP server that exposes the Galaxy tool refactoring framework to AI coding
agents. A tier-4 sibling of galaxy-tool-refactor-cli: both wrap the
galaxy-tool-refactor-registry facade (tier 3.6) for a different audience — the
CLI for humans at a terminal, this for agents over the Model Context Protocol.
Shape
The facade is library-first (structured args in, structured results out, no disk writes unless asked, introspectable), so the server is a thin adapter:
service.py— protocol-agnostic. Pure functions that take XML as astr(plusrulesets/select/ignore) and return JSON-abledicts by calling the facade. Nomcpimport; fully unit-tested.server.py— the FastMCP binding. A small handler per tool delegates toservice, and is the error boundary (facadeUnknownRuleset/UnknownRuleCode/UnknownProfileand tier-1ToolXmlSyntaxError→ a clean MCP tool error).
Tools
| MCP tool | What it does |
|---|---|
format_tool |
Apply a ruleset's fixable rules then format; returns canonical XML + advisory notes. |
upgrade_tool |
Repair then profile placement then format; minimal-bump by default (profile= moves only when strictly needed for validity; modernize opts into the behavior-preserving walk, capped at the lower of the behaviour ceiling and the deployment ceiling, the newest profile every major public Galaxy server runs; allow_behavior_change lifts the walk's behaviour gate only, target_profile caps the walk and may exceed the deployment ceiling); returns upgraded XML, steps applied, the behavior-preserving verdict, baseline_profile/reached_profile/stopped_at/blocking_codes/auto_fixed_codes, and notes. |
check_tool |
Report-only detect over the selected rules; returns the findings (each flagged fixable vs advisory). |
convert_help_tool |
Convert an RST <help> body to Markdown when provable (profile ≥ 24.2 + render-equivalence gate); returns converted XML or a skip reason. |
tokenize_version_tool |
Factor a literal version="<base>+galaxy<suffix>" into @TOOL_VERSION@/@VERSION_SUFFIX@ tokens when the expansion-equality gate proves it byte-identical; returns tokenized XML or a skip reason. |
find_references_tool |
Read-only: every Cheetah $name reference site across the tool's templated sections (returns {name, occurrences}). Single-document — references inside imported macro files are the CLI find-references. |
rename_param_tool |
Rename a parameter across the tool atomically (returns {old, new, changed, renamed, reason, formatted}; formatted is null on a bail). Single-document — the cross-file/imported-macro rename is the CLI rename-param. |
list_rulesets |
The baked-in rulesets (name / codes / is_default / description). |
list_rules |
The baked-in rules (code / summary / family / fixable / rulesets). |
Agents supply content and receive content — the server never writes to disk.
Run
uv run galaxy-tool-refactor-mcp # serves over stdio
Point an MCP client (e.g. a coding agent) at that command. list_rulesets /
list_rules let the agent discover the available rulesets and rule codes at
runtime instead of hardcoding them.
See docs/decisions.md D1 for the design, and
docs/vision.md for the longer-horizon agent-authored-rules
direction (Goal 2, still future).
Metadata
Release files for galaxy-tool-refactor-mcp 0.3.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| galaxy_tool_refactor_mcp-0.3.9.tar.gz | 20.1 kB | With provenance | Details for galaxy_tool_refactor_mcp-0.3.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| galaxy_tool_refactor_mcp-0.3.9-py3-none-any.whl | Python 3 | none | any | Details for galaxy_tool_refactor_mcp-0.3.9-py3-none-any.whl |
Total release size: 29.7 kB
Release files / galaxy_tool_refactor_mcp-0.3.9.tar.gz
| Download URL | galaxy_tool_refactor_mcp-0.3.9.tar.gz |
|---|---|
| Size | 20.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
937c4bf5da642f6340ac0535499bb9142d99b36964b17c402d9ee2c155e9ed66
|
|
BLAKE2b-256 checksum How to use checksums |
be377296ce653d4b720379f40db995f7a4e1bcac838d0cb61af7603be48678f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.
Transparency logRelease files / galaxy_tool_refactor_mcp-0.3.9-py3-none-any.whl
| Download URL | galaxy_tool_refactor_mcp-0.3.9-py3-none-any.whl |
|---|---|
| Size | 9.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6bcc0f4652b6947d403197fc1f5b2318d069593f3a7ef48bfce5a7695f6ae721
|
|
BLAKE2b-256 checksum How to use checksums |
1e1999c31e5d49d5f331f82a0c877eacce3f1be65f1938ae107dbf8fc3a84e0d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.
Transparency logSecurity for galaxy-tool-refactor-mcp 0.3.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for galaxy_tool_refactor_mcp-0.3.9.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.