Skip to content

Phase 3: SAM MCP server on validated simulation workflows and job layer (extensible to other SAM functions) #236

Open

Description

@michaldengusiak

Parent: #227

Goal

Expose SAM's validated simulation workflows to AI agents through MCP, built on the job layer from #235 and the comparison from #231. The tool surface should be easy to extend to other SAM engineering functions.

Design outline

  • A C# console host using the official ModelContextProtocol C# SDK. The first transport is stdio; a localhost HTTP transport inside the running UI is a later option.
  • An extensible tool registry. Each SAM function registers typed tools, so new tools can be added without changing the host.
  • Initial tools, following openstudio-mcp's run-ID conventions:
    • submit_simulation(engine: tas|openstudio, model_path, weather_path) → job_id
    • get_job_status, cancel_job, list_jobs
    • get_results_summary (B1a)
    • compare_runs (benchmark-compare plus the input manifests)
    • get_input_manifest
  • Security: inputs and outputs are restricted to configured allow-listed folders, there is no arbitrary code or script execution, and tool outputs are structured JSON.
  • Interop: export_osm lets an agent hand work over to openstudio-mcp (Docs: using NatLabRockies/openstudio-mcp as an optional agent companion on SAM-exported OSM/OSW SAM_OpenStudio#31).

Depends on

#235 (G4), #231.

Acceptance criteria

Check Where Result
Unit tests for each tool against a fake job layer; path allow-list tests GitHub CI NOT RUN
MCP Inspector or Claude Code session: submit → status → results → compare → cancel on case A Local, licensed Tas + OpenStudio 3.10 NOT RUN
A new tool registered without changing the host (extensibility test) GitHub CI NOT RUN

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions