Skip to content

feat: read-only results-inspector MCP server (core aggregator tools)#13

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/results-inspector-mcp
Jul 17, 2026
Merged

feat: read-only results-inspector MCP server (core aggregator tools)#13
Jammy2211 merged 1 commit into
mainfrom
feature/results-inspector-mcp

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

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 into output/; 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__.pypython -m autoassistant.mcp
  • autoassistant/tests/test_mcp_tools.py — fixture runs a real tiny af.LBFGS/af.ex.Gaussian fit 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 in skills/README.md + .claude/skills/ symlink
  • skills/af_setup_environment.md — one-line pip install mcp note (assistant env only, never a library requirement)
  • autoassistant/audit_skill_apis.pyautoassistant/mcp/*.py joins the symbol-audit scan (anti-drift)
  • .mcp.json — Claude Code registration

Test Plan

  • autoassistant/tests/ — 63 passed (includes the 10 new MCP tests)
  • audit_skill_apis.py --scope all — 0 missing/broken (mcp files scanned)
  • End-to-end stdio smoke via an MCP client session: 7 tools listed, calls green, images render
  • Claude Desktop walkthrough (acceptance): list fits by evidence → model.result summary → subplot inline

Generated by the PyAutoLabs agent workflow.

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>
@Jammy2211
Jammy2211 merged commit 9866a93 into main Jul 17, 2026
1 check passed
@Jammy2211
Jammy2211 deleted the feature/results-inspector-mcp branch July 17, 2026 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant