feat: read-only results-inspector MCP server (core aggregator tools)#13
Merged
Conversation
MCP stdio server with 7 read-only tools over PyAutoFit output directories (list fits, model/posterior/search summaries, inline images), as thin wrappers on the existing aggregator API, for chat harnesses without code execution (Claude Desktop first). Includes the af_inspect_results_mcp skill, .mcp.json registration, audit-sweep wiring and fixture tests. Phase 1 of #12. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the read-only results-inspector MCP server (
autoassistant/mcp/): an MCP stdio server exposing 7 tools over PyAutoFit output directories — list fits ranked by evidence, model/posterior/search summaries, and result images returned inline — so chat harnesses without code execution (Claude Desktop first; Claude Code via the repo-root.mcp.json) can inspect results. Phase 1 of #12 (the lens layer lands in autolens_assistant).Design rules (documented in the skill): glue, not code — every tool is argument parsing + one existing public aggregator call (
Aggregator.from_directory,SearchOutput); read-only — no fit-running, no compute, no writes intooutput/; stdout is the protocol — autofit stdout prints and logging handlers are rerouted to stderr so the JSON-RPC channel stays clean.Scripts Changed
autoassistant/mcp/tools.py— the 7 tool functions (no MCP dependency; tests exercise them directly)autoassistant/mcp/server.py— MCP registration + stdout/logging protection;autoassistant/mcp/__main__.py—python -m autoassistant.mcpautoassistant/tests/test_mcp_tools.py— fixture runs a real tinyaf.LBFGS/af.ex.Gaussianfit so on-disk format drift fails loudly (10 tests)skills/af_inspect_results_mcp.md— new skill: tool table, Claude Desktop/Claude Code config, deployment tiers (remote/hosted documented-not-built), maintainer rules; registered inskills/README.md+.claude/skills/symlinkskills/af_setup_environment.md— one-linepip install mcpnote (assistant env only, never a library requirement)autoassistant/audit_skill_apis.py—autoassistant/mcp/*.pyjoins the symbol-audit scan (anti-drift).mcp.json— Claude Code registrationTest Plan
autoassistant/tests/— 63 passed (includes the 10 new MCP tests)audit_skill_apis.py --scope all— 0 missing/broken (mcp files scanned)model.resultsummary → subplot inlineGenerated by the PyAutoLabs agent workflow.