SASBLOCK
A self-hosted Model Context Protocol (MCP) server that connects to your SAS Viya environment and provides tools across the analytics lifecycle.
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
A Model Context Protocol (MCP) server for executing SAS code, training AutoML projects, scoring models and so much more for SAS Viya environments.
Features
- 92 tools across 10 selectable tiers, spanning the Analytics Life Cycle on SAS Viya
- Interactive views (MCP Apps) for data, SAS logs and glossary editing in clients that render them — Claude, ChatGPT, Microsoft 365 Copilot, VS Code, Cursor
- Prompt Templates for improving your SAS Code
- OAuth2 authentication with PKCE flow
- HTTP-based MCP server compatible with MCP clients
Articles & Videos
Here you can find getting articles on how to use and integrate the SAS MCP Server in different tools and what to build with it:
- From REST APIs to AI Agents: Why the SAS Viya MCP Server Matters
- Connecting GitHub Copilot to SAS Viya with the SAS Viya MCP Server
- Bring Your Own Key: SAS Viya MCP Server with GitHub Copilot CLI
- Putting the SAS Viya MCP Server to Work in GitHub Copilot
- Connecting Claude Code CLI to SAS Viya with the SAS Viya MCP Server
- Putting the SAS Viya MCP Server to Work in Claude Code CLI
- [Integration with SAS Retrieval Agent Manager (RAM)](https://github.com/sassoftware/sas-retrieval-agent-manager
ebc75b95cb95OBSERVED · 2026-10-09Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add sas-mcp-server:1.9.1 -- docker run -i --rm ghcr.io/sassoftware/sas-mcp-server:1.9.1:None app-stdio
Exposed tools (93)
56 read · 28 write · 9 destructive. Blast radius: 9 tools can delete or overwrite — an agent that can be talked into calling a tool can be talked into calling this one.
| Tool | Risk | Description |
|---|---|---|
apply_report_operations | write | Apply an ordered batch of operations to a report — the authoring workhorse. |
assign_glossary_term | read | Assign a business term to a table column — the step that makes a term govern data. |
cancel_job | read | Cancel a running job. |
catalog_download_table_profile | read | Download a catalog table |
catalog_find_instance | read | Resolve the catalog instance for a source-asset URI. |
catalog_get_adhoc_analysis | read | Get the status of an ad-hoc analysis job, and whether its profile is ready. |
catalog_get_agent_history | read | Get the execution history of a catalog agent |
catalog_list_agents | read | List SAS Data Governance discovery agents. |
catalog_run_adhoc_analysis | write | Submit an ad-hoc analysis (profiling) job for a table in the catalog. |
catalog_run_agent | write | Start a catalog discovery agent run (asynchronous). |
catalog_search | read | Search the SAS Data Governance catalog for assets (tables, columns, reports, ...). |
catalog_search_helper | read | Discover how to search the catalog: list facets, or values for one facet. |
copy_report | read | Copy a Visual Analytics report to a new report, returning the copy |
create_business_rule | write | Create a new rule inside an existing SAS Business Rules rule set. |
create_business_ruleset | write | Create a new SAS Business Rules rule set. |
create_decision_flow | write | Create a new SAS Intelligent Decisioning flow chaining rule set steps. |
create_glossary_term | write | Create a business term in the SAS Business Glossary. |
create_glossary_term_type | write | Create a term type — the template that fixes what a term must carry. |
create_ml_project | write | Create a new AutoML pipeline automation project from a CAS table. |
create_report | write | Create a Visual Analytics report and return its id for further edits. |
delete_business_rule | destructive | Permanently delete a rule from a SAS Business Rules rule set. |
delete_business_ruleset | destructive | Permanently delete a SAS Business Rules rule set. |
delete_decision_flow | destructive | Permanently delete a SAS Intelligent Decisioning flow. |
delete_glossary_term | destructive | Permanently delete a business term. |
delete_glossary_term_type | destructive | Delete a term type. |
delete_report | destructive | Delete a Visual Analytics report and its content. |
describe_report_objects | read | Discover what a Visual Analytics report can contain — operations and objects. |
download_file | read | Download file content from the Viya Files Service. |
echo | read | box[ |
execute_sas_code | write | |
export_report | read | Export a Visual Analytics report (or specific report objects) in any |
get_business_rule | read | Fetch a single rule |
get_business_ruleset | write | Fetch a single SAS Business Rules rule set by ID. |
get_castable_columns | read | Get column metadata for a CAS table (names, types, labels, formats). |
get_castable_data | read | Fetch rows from a CAS table with column names. |
get_castable_info | read | Get metadata for a CAS table (row count, column count, size, etc.). |
get_compute_table_data | read | Fetch rows from a table in a SAS library, with column names. |
get_decision_flow | read | Fetch the current state of a SAS Intelligent Decisioning flow. |
get_decision_flow_code | read | Retrieve the generated DS2 execution code for a decision flow. |
get_decision_flow_revision | read | Fetch the content of a specific locked decision revision. |
get_glossary_term | read | Get one business term in full, with its custom attributes named rather than hashed. |
get_glossary_term_type | read | Get a term type and the attribute contract its terms must satisfy. |
get_job_log | read | Retrieve the log of a completed job. |
get_job_status | read | Check the status of a submitted job. |
get_mas_module_step_signature | read | Fetch a MAS module step |
get_report | read | Get a Visual Analytics report |
get_report_outline | read | Read a report |
import_glossary_terms | write | Create many business terms, and their hierarchy, in one call. |
list_business_rules | write | List all rules inside a SAS Business Rules rule set. |
list_business_ruleset_revisions | write | List all locked revisions of a rule set. |
list_business_rulesets | read | List SAS Business Rules rule sets, optionally filtered by name substring. |
list_cas_servers | read | List available CAS servers on the Viya environment. |
list_caslibs | read | List CAS libraries (caslibs) available on a CAS server. |
list_castables | read | List tables in a CAS library. |
list_compute_columns | read | List the columns of a table in a SAS library within a compute context. |
list_compute_contexts | read | List available compute contexts on the Viya environment. |
list_compute_libraries | read | List the SAS libraries (librefs) assigned in a compute context. |
list_compute_tables | read | List the tables in a SAS library within a compute context. |
list_decision_flow_revisions | read | List all locked revisions of a decision flow. |
list_decision_flows | read | List SAS Intelligent Decisioning flows, optionally filtered by name substring. |
list_files | read | List files in the Viya Files Service. |
list_glossary_term_types | read | List the term types defined in the SAS Business Glossary. |
list_glossary_terms | read | List glossary terms by structure — term type, parent, or name fragment. |
list_jobs | read | List recent jobs from the Job Execution service. |
list_mas_modules | read | List published scoring models and decisions (MAS modules). |
list_ml_projects | read | List AutoML pipeline automation projects. |
list_publishing_destinations | read | List available publishing destinations. |
list_registered_models | read | List models in the Model Repository. |
list_reports | read | List Visual Analytics reports. |
list_source_tables | read | List source tables that are NOT yet loaded into memory in a CAS library. |
list_table_terms | read | List the business terms assigned to a table |
list_term_assets | read | List the data assets a business term is attached to — the columns that mean it. |
lock_business_ruleset_revision | write | Lock the current state of a rule set as an immutable revision. |
lock_decision_flow_revision | read | Lock the current state of a decision flow as an immutable revision. |
promote_table_to_memory | read | Load a source table into CAS memory at global scope (visible to all sessions). |
publish_decision_flow | write | Publish a locked decision revision to a Micro Analytic Score (MAS) destination. |
publish_ml_champion_model | write | Publish the champion model from an AutoML pipeline automation project to the Model Repository. |
query_data | write | Run a FedSQL SELECT against CAS or compute data and return the rows. |
register_ml_champion_model | read | Register the champion model from an AutoML pipeline automation project to the Model Repository. |
reset_compute_session | destructive | Reset (delete) the cached compute session for a compute context. |
run_ml_project | write | Run an AutoML pipeline automation project. |
score_data | read | Score data against a published model or decision (MAS module). |
search_glossary_terms | read | Free-text search of the business glossary — the way in when you know a word, not an id. |
submit_batch_job | write | Submit a SAS job for asynchronous execution via the Job Execution service. |
unassign_glossary_term | destructive | Remove a business term |
update_business_rule | write | Update an existing rule inside a SAS Business Rules rule set. |
update_business_ruleset | write | Update an existing SAS Business Rules rule set |
update_decision_flow | write | Update an existing SAS Intelligent Decisioning flow. |
update_glossary_term | write | Update a business term |
update_glossary_term_type | destructive | Change a term type: rename it, or add, edit and remove its attributes. |
upload_data | write | Upload a data file into a CAS table — read **by the server**, not the model. |
upload_file | write | Upload a file to the Viya Files Service, optionally into a Content folder. |
upload_inline_data | write | Create a small CAS table from inline delimited text passed as a string. |
Trust audit
BLOCKgrade D · trust 61/100 Do not install this without reading the findings. The audit found something that could harm you or your machine.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | FAIL |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | WARN |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (2 observation(s))
- Network
- declared (4 observation(s))
- Shell
- declared (1 observation(s))
- Dependencies
- pinned
- Secrets in source
- found
Findings (25)
atob( ... new Function(
# Self-signed Viya certificate (matches SSL_VERIFY=false in the local .env).
# Self-signed Viya certificate (matches SSL_VERIFY=false in the local .env).
"--insecure",
"SSL_VERIFY=false: TLS certificate verification is DISABLED for %s. "
module = importlib.import_module(module_name)
logger.info("Running snippet (token length: %d)", len(token))mock_info.token = "mock-viya-access-token"
delete_business_rule, delete_business_ruleset, delete_decision_flow, delete_glossary_term, delete_glossary_term_type, delete_report, reset_compute_session, unassign_glossary_term, update_glossary_term
.env.sample
.helmignore
digest = hashlib.sha1()
- **Signing in from GitHub Copilot CLI failed before Viya was ever contacted.** (#58) The callback was refused with `Redirect URI 'http://127.0.0.1:52505/' does not match CIMD redirect_uris`. An MCP c
'mcpserver-http://127.0.0.1:8134%',
'http://127.0.0.1:8134%-mcpserver-usages',
redirect_uris=[AnyUrl("http://127.0.0.1:8080/")],assert stored.validate_redirect_uri(AnyUrl("http://127.0.0.1:52505/"))`))}}var Ct;var et=S(()=>{Ct={major:4,minor:3,patch:5}});function Dg(r){if(r==="")return!0;if(r.length%4!==0)return!1;try{return atob(r),!0}catch{return!1}}function $_(r){if(!Fv.test(r))return!1;let ireturn len(base64.b64decode(block.resource.blob))
assert len(base64.b64decode(png.content[0].data)) > 0
- **The server log names the SAS Viya user behind every tool call.** (#65) A shared HTTP deployment serves many people through one process, and its log said which tool ran but not for whom, so a field
- **Opening the MCP endpoint in a browser now shows a landing page instead of a bare `401`** (#46). A person handed `https://<host>/mcp` and curious enough to paste it into a browser used to get FastM
- **The server-side upload sources are no longer unbounded — `MAX_UPLOAD_BYTES`, default 100 MiB** (#44, lint follow-up #45). `upload_data` and `upload_file` with `file_path`/`url` buffer the entire s
- **Kubernetes deployment artifacts** (#41) — a sample manifest (`deploy/k8s/sas-mcp-server.yaml`) and a Helm chart (`deploy/helm/sas-mcp-server/`) that serve the MCP endpoint at `https://<viya-host>/
- **Hardened for a shared endpoint:** `ALLOW_LOCAL_FILE_UPLOAD=false` (the application defaults it *on*, and in a container the `file_path` upload source can only read the pod's own filesystem — inclu
Gates applied: critical_finding, no_behavioural_pass.
ebc75b95cb95full audit observations/trust-audit/mcp-server/sassoftware__sas.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-09 | ebc75b95cb95 | BLOCK | D | 61 | first audit |
Questions
What is the SAS MCP server?
A self-hosted Model Context Protocol (MCP) server that connects to your SAS Viya environment and provides tools across the analytics lifecycle.
What tools does SAS expose?
93 in total: 56 read-only, 28 that write, and 9 that can delete or overwrite (delete_business_rule, delete_business_ruleset, delete_decision_flow, delete_glossary_term, delete_glossary_term_type). Every one is listed on this page with its risk.
Is SAS safe to connect to an agent?
No — not without reading the findings first. The audit graded it D (61/100) and found 5 critical or high issues in the source. Each one is listed on this page with the file and line it is on. Separately from the audit: 9 of its tools can destroy data, so scope the token you give it to what you actually need.
What credentials does SAS need?
It reads AUTH_HELPER_CLIENT_ID, MCP_SIGNING_KEY and VIYA_PASSWORD from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does SAS run?
It speaks stdio and streamable-http, so it runs as a local process your client starts. It is published on PyPI as sas-mcp-server.
How current is this page?
The grade is for one exact copy of the source (ebc75b95cb95), read on 2026-10-09. The repository is watched and re-audited when it changes.