Releases: sassoftware/sas-mcp-server
Releases · sassoftware/sas-mcp-server
Release list
v1.5.0 — SAS Intelligent Decisioning tools & opt-in usage telemetry
Highlights
🧩 SAS Intelligent Decisioning — 23 new tools (#25)
Author and operate SAS Intelligent Decisioning rule sets and decision flows end to end, directly from the MCP server:
- Rule sets & rules — create / update / get / list / delete rule sets and the conditional rules inside them, plus lock and list immutable rule-set revisions.
- Decision flows — create / update / get / list / delete flows that chain rule-set steps, retrieve their generated DS2 code, and lock / list / fetch decision revisions.
- Publish & score —
publish_decision_flowpublishes a locked revision to Micro Analytic Score (MAS), polls the asynchronous Model Publish job to completion, and returns the server-generated MASmoduleId— so the result is immediately usable with the newget_mas_module_step_signatureand the existingscore_data, with no separate lookup.
📊 Opt-in "collection mode" usage telemetry (#24)
An off-by-default mode that helps maintainers learn how the server is actually used — which tools, for what goals, with what inputs, and where they fall short. Implemented as a FastMCP middleware that requires no changes to any tool:
- Injects a per-call
goalthe model fills in (stripped before the tool runs), and appends one redacted, size-bounded JSON Lines record per call to a rotating local log. - Nothing is ever transmitted anywhere — the log stays on the machine running the server, and sharing it with maintainers is a deliberate, manual step. Secret-shaped keys and inline Bearer/JWT tokens are redacted, results default to a content-free shape summary, and the log file is locked to the current user.
- Enable with
COLLECTION_MODE=true; see the Collection Mode section of the README for the fullCOLLECTION_*configuration.
🔢 Tool count
The server now exposes 68 tools spanning code execution, data discovery, data operations & files, reports, batch jobs, model management & scoring, decisioning, compute contexts, and the SAS Information Catalog.
🐳 Container image
Published to GHCR on release:
ghcr.io/sassoftware/sas-mcp-server:1.5.0 # also tagged 1.5 and latest
📄 Details
- Full changelog for this release: CHANGELOG › 1.5.0
- Compare: v1.4.0...v1.5.0
Unified Report Export & AutoML Champion Model Publishing
Added
- AutoML champion model register/publish tools (3) (#22) —
register_ml_champion_modelregisters an AutoML pipeline automation project's champion model to the Model Repository;publish_ml_champion_modelpublishes it to a scoring destination;list_publishing_destinationslists the available destinations to publish to. All three drive themlPipelineAutomationchampion-model action endpoint (register/publish), shared viahelpers/auto_ml_helpers.py. Brings the tool count to 45. export_reporttool (#18) — one tool covering every synchronous Visual Analytics report export:package(zip),pdf,png,svg,csv,tsv,xlsx, andsummary, for a whole report or selected report objects. Results are returned with native MCP content types — text inline for text formats, image content forpng, and an embedded binary file (carrying the correct MIME type, e.g.application/zipfor packages) forpackage/pdf/xlsx— instead of a hand-rolled base64 JSON blob. Per-format input validation enforces the API's object-count andimage_sizerules; binary exports larger thanMAX_EXPORT_INLINE_BYTES(default 25 MiB) are refused with guidance rather than streamed through the model context; and a Viya HTTP error is surfaced as a structuredexport_failedresult instead of a raised exception. The format registry, validation, and request execution live inhelpers/report_export_helpers.pyso the tool stays a thin wrapper.
Changed — BREAKING
export_report_packagehas been replaced byexport_report. The old tool hit the wrong route (/visualAnalytics/getExportedReportPackage/{id}/package, the operationId rather than the path) and sentreportObjectsas a JSON body on a GET. Useexport_reportwithexport_format="package"; report objects are passed viareport_objects.
Removed — BREAKING
get_report_imagehas been removed, superseded byexport_report. It used thereportImagesservice to return an async job descriptor (not the image itself) for a report section thumbnail.export_reportwithexport_format="png"or"svg"renders the whole report or a single object and returns the actual image bytes as native MCP content.
SAS Information Catalog Tools & Reference-Based Uploads
Added
- SAS Information Catalog tools (9) (#19) —
catalog_search,catalog_search_helper,catalog_find_instance,catalog_list_agents,catalog_run_agent,catalog_get_agent_history,catalog_run_adhoc_analysis,catalog_get_adhoc_analysis, andcatalog_download_table_profile. Metadata discovery and profiling across the whole Viya environment: search assets with the catalog grammar (free text + facets), resolve a search hit's catalog instance, submit and poll ad-hoc profiling jobs (with NLP enrichment for privacy/semantic tags), download a table's data dictionary + column profile as CSV, and list/run/inspect the discovery agents that populate the catalog. Brings the tool count to 41. upload_inline_datatool — creates a small CAS table from inline csv/tsv text passed as a string (a lookup/mapping table the model builds on the fly, or a quick test table). This is the deliberate "data travels through the model context" path, split out fromupload_dataso the cost is explicit in the tool you pick. Brings the tool count to 42.
Changed — BREAKING
upload_datais now reference-only and no longer takescsv_data. It accepts the data by reference through exactly one offile_path(the server reads it off its own disk) orurl(the server fetches it), so the payload is read server-side and never passes through the calling model's context. Inline text moved to the newupload_inline_datatool.file_pathreads from the host the server runs on (in stdio mode, the user's machine) and can be disabled by operators withALLOW_LOCAL_FILE_UPLOAD=false. Callers that passedcsv_datashould switch toupload_inline_data(for genuinely small tables) or write the data to a file/URL and useupload_data.
Changed
upload_dataaccepts more formats. Beyond CSV it ingests every format the casManagementuploadTableAPI accepts — tsv (csv + tab delimiter), xls, xlsx (single sheet), sas7bdat, and sashdat. The format is auto-detected from thefile_path/urlextension and can be overridden withdata_format;sheet_name(Excel) andcontains_header_rowarguments tune the import. parquet is not accepted by that endpoint (confirmed against the API spec and a liveHTTP 400) and is rejected up front with guidance to load it via a path-based caslib +promote_table_to_memoryor convert it first.catalog_searchandcatalog_search_helperuse the sharedreturn_itemsfield projection for their result shaping (#19).
Fixed
- stdio token resolution is now expiry-aware (#20). The resolver returned the first cached access token it found without checking expiry, so an expired SAS Viya CLI cache (
~/.sas) could shadow a valid helper cache (~/.sas-mcp-server) and make every Viya call fail with 401. A token at or past its expiry (minus a 60s skew) is now skipped so resolution falls through to the next source; when a cache's access token is expired but it still holds a refresh token, it is exchanged for a fresh one using the client that minted it (sas.clifor the CLI cache,vscodefor the helper cache), written back to that cache, and used. Refresh is best-effort — a wrong client, revoked token, or network error falls through cleanly to the next source or the device-code flow — and a missing/unparseable expiry is treated as not-expired, preserving prior behaviour.
Compute Data and Reusable SAS Session
Added
- Compute service discovery tools —
list_compute_contexts,list_compute_libraries,list_compute_tables,list_compute_columns— browse compute contexts and the SAS libraries/tables/columns visible inside a compute session. Brings the tool count to 32. reset_compute_sessiontool — deletes the cached compute session for the caller and compute context, discarding its SAS state (WORK tables, macro variables, assigned librefs) so the next call starts from a fresh session. Defaults to the configured execution context.- Reusable, per-user compute session cache (
_ComputeSessionCacheinviya_utils.py) — one warm compute session is kept per authenticated user and compute context, so repeat calls skip the slow session spin-up. Keyed by the JWTsubclaim (falling back to other identity claims, then a token hash) so multi-user HTTP deployments never share a session. Cached sessions are validated before reuse and transparently recreated if Viya has reaped them for inactivity. - Compute session shutdown cleanup — both server entry points register a FastMCP
lifespanthat deletes all cached compute sessions on shutdown (best effort), so warm sessions don't linger until Viya's idle reaper collects them. - Integration coverage for every new tool —
test_compute_discovery_workflowandtest_compute_session_reuse_and_reset(which proves reuse, deletion, and recreation end to end against a live Viya), wired into thetest_every_tool_has_integration_coverageguard. return_itemshelper (viya_client.py) — shared field-projection used by the compute discovery tools.
Changed — BREAKING
execute_sas_codeis now stateful across calls. It runs in the reusable per-user compute session, so SAS WORK tables, macro variables, and assigned librefs persist between successive calls instead of being discarded with a per-call session. Callreset_compute_sessionto start from a clean session. (Previously every call created and tore down its own session.)
Changed
get_context_idandcreate_sessionnow callraise_for_status(), so an auth/permission failure surfaces as a realHTTPStatusErrorinstead of a misleading "compute context not found" or aKeyError.get_context_idbuilds its query with httpxparams=instead of string interpolation, so compute context names containing reserved characters (&,+,#) are encoded correctly.- The compute session lifecycle (resolve context → create → reuse/reset/teardown) is centralised in
_ComputeSessionCache;run_one_snippetand the compute tools now share it, anddelete_sessionwas extracted as a reusable helper.