Skip to main content
Glama
sassoftware

SAS MCP Server

Official
by sassoftware

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
VIYA_ENDPOINTYesThe URL of your SAS Viya server

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}
logging
{}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}
extensions
{
  "io.modelcontextprotocol/ui": {}
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
execute_sas_codeA

Executes the provided SAS code in the Viya environment and returns information about the completed Job. This will create a job definition for the SAS code, execute it, and then retrieve the results.

The code runs in a reusable compute session that is kept warm and shared across calls (per user), so SAS state — WORK tables, macro variables, and assigned librefs — persists between successive execute_sas_code calls. Call reset_compute_session to discard that state and start fresh.

list_cas_serversA

List available CAS servers on the Viya environment.

list_caslibsB

List CAS libraries (caslibs) available on a CAS server.

list_castablesB

List tables in a CAS library.

list_source_tablesA

List source tables that are NOT yet loaded into memory in a CAS library.

These are the candidates for promote_table_to_memory — tables that exist on the caslib's data source but are not in CAS memory yet.

get_castable_infoA

Get metadata for a CAS table (row count, column count, size, etc.).

get_castable_columnsB

Get column metadata for a CAS table (names, types, labels, formats).

get_castable_dataB

Fetch rows from a CAS table with column names.

upload_dataB

Upload CSV data into a CAS table.

promote_table_to_memoryA

Load a source table into CAS memory at global scope (visible to all sessions).

Loads the table from its caslib data source and promotes it to global scope via the casManagement updateTableState API. Idempotent: if the table is already loaded in global scope it is left untouched. Use list_source_tables to discover unloaded tables that can be promoted.

list_filesB

List files in the Viya Files Service.

upload_fileB

Upload a file to the Viya Files Service.

download_fileB

Download file content from the Viya Files Service.

list_reportsB

List Visual Analytics reports.

get_reportA

Get a Visual Analytics report's metadata and definition.

get_report_imageB

Render a Visual Analytics report section as an image.

submit_batch_jobB

Submit a SAS job for asynchronous execution via the Job Execution service.

get_job_statusB

Check the status of a submitted job.

list_jobsC

List recent jobs from the Job Execution service.

cancel_jobB

Cancel a running job.

get_job_logB

Retrieve the log of a completed job.

list_ml_projectsC

List AutoML pipeline automation projects.

create_ml_projectA

Create a new AutoML pipeline automation project from a CAS table.

The training table must already be loaded into CAS memory at global scope. This tool verifies that first and returns an actionable error otherwise (use promote_table_to_memory to load + promote a source table, and list_source_tables to find one). The data-table URI is built from server_id/caslib_name/table_name.

run_ml_projectC

Run an AutoML pipeline automation project.

list_registered_modelsB

List models in the Model Repository.

list_models_and_decisionsC

List published scoring models and decisions (MAS modules).

score_dataB

Score data against a published model or decision (MAS module).

list_compute_contextsB

List available compute contexts on the Viya environment.

list_compute_librariesA

List the SAS libraries (librefs) assigned in a compute context.

Runs in the reusable per-user compute session for the context, so it also sees libraries created by prior execute_sas_code calls.

list_compute_tablesA

List the tables in a SAS library within a compute context.

These are SAS/Compute tables (e.g. WORK or an assigned libref), distinct from in-memory CAS tables (see list_castables). Runs in the reusable per-user compute session for the context.

list_compute_columnsA

List the columns of a table in a SAS library within a compute context.

Runs in the reusable per-user compute session for the context.

reset_compute_sessionA

Reset (delete) the cached compute session for a compute context.

The server keeps one reusable SAS compute session per user and compute context so repeat calls skip the slow session spin-up; SAS state (WORK tables, macro variables, assigned librefs) therefore persists across execute_sas_code and list_compute_* calls. Call this to discard that state — the next compute tool call transparently creates a fresh session.

Prompts

Interactive templates invoked by user choice

NameDescription
debug_sas_logAnalyze a SAS log for errors, warnings, and notes with root-cause explanations and suggested fixes.
explore_datasetGenerate comprehensive SAS data-profiling code (CONTENTS, MEANS, FREQ, UNIVARIATE).
data_quality_checkGenerate SAS code for a data quality assessment (completeness, uniqueness, validity).
statistical_analysisSet up a complete SAS statistical analysis workflow with diagnostics.
optimize_sas_codeReview and optimize SAS code for performance, readability, or both.
explain_sas_codeProvide a block-by-block explanation of SAS code, tailored to skill level.
sas_macro_builderBuild a production-quality reusable SAS macro.
generate_reportGenerate SAS ODS/PROC REPORT code for formatted output.

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sassoftware/sas-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server