Skip to content

feat: Galaxy-SynBioCAD digital-kernel adapter + MCP discovery tools - #273

Open
LamaSu wants to merge 4 commits into
masterfrom
feat/adapter-galaxy-synbiocad
Open

feat: Galaxy-SynBioCAD digital-kernel adapter + MCP discovery tools#273
LamaSu wants to merge 4 commits into
masterfrom
feat/adapter-galaxy-synbiocad

Conversation

@LamaSu

@LamaSu LamaSu commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Summary

Adds @pcc/adapter-galaxy-synbiocad — a PCC digital-kernel adapter for the
Galaxy-SynBioCAD tool suite (brsynth/galaxytools;
Faulon lab, Nature Communications 2022) —
plus MCP-server discovery tools that surface its catalog to any agent.

Galaxy-SynBioCAD is computational (retrosynthesis, FBA, enzyme selection, DNA design), so it
registers via kernel-sdk's DigitalKernelManifest + createKernelHandler, not the physical
MachineAdapter path. It composes with physical kernels: design a pathway → synthesize the DNA
→ run it on an OT-2
(via @pcc/adapter-pylabrobot) in one CWM DAG.

What's in it

50a72b98 — the adapter

  • src/catalog.json — deterministically generated from the Galaxy tool XMLs by
    scripts/build_catalog.py: 63 tools, 491 typed input params, 87 outputs, 13 pipeline stages.
    Every tool ships a JSON-Schema (Draft-07) input_schema / output_schema — the
    machine-readable menu agents pick from. <expand macro> params resolved (StrainDesign),
    deprecated standalone wrappers flagged, dotted param paths (adv.topx, sink.emptysink) that
    map 1:1 to Galaxy's | nested-input convention.
  • One catalog-driven executorexecute({tool_id, params}) runs any tool over the Galaxy
    REST API (GalaxyRestClient) or a deterministic MockGalaxyClient (mock-first, per PCC convention).
  • toWorkflowStep(id) — the composition bridge: any tool → a DigitalWorkflowStep (carries
    inputSchema/outputSchema/dependsOn) that composes with physical steps.

72671234 — MCP wiring

  • Three discovery tools in packages/mcp-server: pcc_galaxy_synbiocad_{stages, list_tools, tool_schema} — surface the catalog to any MCP client (local read, no network).

Live verification (against galaxy-synbiocad.org — v21.09, 350 tools installed)

  • health() ✅, listTools() ✅ (350), 40/50 advertised tools present on the public server.
  • Caught + fixed a real integration bug: the server installs full toolshed ids
    (toolshed.g2.bx.psu.edu/repos/tduigou/retropath2/retropath2/3.9.1+galaxy0), not the short
    catalog id retropath2. Added resolveServerToolId() (short → server's latest toolshed id,
    case-insensitive for PartsGenie) and verified it live.

Tests

  • adapter: 27/27 pass, tsc clean.
  • mcp-server: 77/77 pass (6 new end-to-end smoke tests over the in-memory MCP transport), tsc clean.
  • No new external deps (only tweetnacl, already in-repo via kernel-sdk → clean Gate-A).

Honest gaps / not in scope

  • GalaxyRestClient's authenticated job-execution path is implemented-to-spec and
    mock-tested, but not yet run against a live server — that needs a Galaxy API key (anonymous
    POST /api/histories → 403).
  • Gateway registerKernel is not called here — it requires a deployed HTTPS endpoint (the
    gateway runs a touchstone smoke test). The MCP wiring already makes the tools discoverable today.

🤖 Generated with Claude Code

https://claude.ai/code/session_01S57C9JofbpCJA8y2i2oYgd

LamaSu and others added 4 commits July 20, 2026 17:03
Exposes the brsynth/galaxytools synthetic-biology & metabolic-engineering
suite (~50 tools: RetroPath2.0, rpTools, Selenzyme, PartsGenie, DNA-Bot,
DNA Weaver, StrainDesign, OptDOE, iCFree, AMN) as a PCC digital kernel via
kernel-sdk's DigitalKernelManifest + createKernelHandler.

- catalog.json: deterministically generated from the Galaxy tool XMLs
  (63 tools, 491 typed input params, 87 outputs, 13 pipeline stages), each
  with a JSON-Schema input/output contract that agents pick from.
- one catalog-driven executor over the Galaxy REST API + a mock-first
  transport; toWorkflowStep() composes tools into a mixed digital+physical DAG.
- GalaxyRestClient verified live against galaxy-synbiocad.org (health,
  listTools, short-id -> toolshed tool_id resolution). 27/27 tests pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S57C9JofbpCJA8y2i2oYgd
Adds three discovery tools — pcc_galaxy_synbiocad_stages / _list_tools /
_tool_schema — that expose the @pcc/adapter-galaxy-synbiocad catalog (~50
synthetic-biology / metabolic-engineering tools with full JSON-Schema I/O)
to any MCP client. Reads the local catalog, no network. 6 end-to-end smoke
tests over the in-memory transport; full mcp-server suite green (77 tests).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S57C9JofbpCJA8y2i2oYgd
- scripts/serve.mjs: node:http server for the kernel job handler. Answers the
  gateway touchstone dry-run with 2xx and runs real jobs (signed evidence bundle).
- scripts/register-kernel.mjs: build manifest -> POST /api/kernels/register ->
  self-verify (builder self-auth via X-Agent-Id) against a PCC gateway.
- README: corrected live-verification status + a deploy/register runbook.

Serve wrapper locally verified end-to-end: GET / + dryRun + real retropath2 job
all return 200; the dryRun path satisfies routes/kernel-marketplace runSmokeTest.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S57C9JofbpCJA8y2i2oYgd
Proven end-to-end against pcc-gateway-staging: provision -> serve.mjs ->
cloudflared tunnel -> register -> verify -> status "verified" (kernel appears in
the marketplace listing). The /verify POST 400'd on an empty body when
content-type is application/json; send `{}`. Also documents that
BUILDER_AGENT_ID must equal the gateway operator_id (from /api/auth/provision)
for builder self-verify.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S57C9JofbpCJA8y2i2oYgd
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