Skip to main content
MCP server CX Codex

SAS Viya — Claude Code MCP server: what it does, how to install

Executes SAS code, orchestrates AutoML pipelines, and queries SAS Viya APIs directly from your AI workspace.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add --env VIYA_ENDPOINT=<VIYA_ENDPOINT> --env SSL_VERIFY=<SSL_VERIFY> --env CLIENT_ID=<CLIENT_ID> --env COMPUTE_CONTEXT_NAME=<COMPUTE_CONTEXT_NAME> --env MCP_TIERS=<MCP_TIERS> --transport stdio sas-viya -- docker run -i --rm -e VIYA_ENDPOINT -e SSL_VERIFY -e CLIENT_ID -e COMPUTE_CONTEXT_NAME -e MCP_TIERS ghcr.io/sassoftware/sas-mcp-server:1.19.0
Open on GitHub

What SAS Viya does

The server connects your LLM client to a SAS Viya analytics deployment. It provides 115 tools split across 11 selectable tiers, covering tasks from basic code execution to model scoring. Assistants can inspect data, fetch execution logs, and monitor CAS compute sessions inside the chat.

Several deployment patterns are supported out of the box: a stdio process, a standalone HTTP service listening on port 8134, or a Docker container. Authentication handles OAuth 2.0 PKCE in the browser, though scripts can also supply an existing bearer token directly.

A functional SAS Viya environment with compute service access is strictly required before configuring the client. Running natively without Docker calls for Python 3.12+ and uv 0.8+.

What it helps with

  • Run SAS scripts and review compute session logs
  • Trigger AutoML model training and evaluate metrics
  • Inspect analytical tables and manage CAS sessions
  • Access SAS Viya endpoints using OAuth 2.0 PKCE authentication

Example prompts for the agent

  • Execute this SAS code block in the default compute context and return the log
  • Start an AutoML training run on the customer metrics dataset
  • Check active CAS sessions and list available data tables

How to install SAS Viya

Platform CLI

claude mcp add --env VIYA_ENDPOINT=<VIYA_ENDPOINT> --env SSL_VERIFY=<SSL_VERIFY> --env CLIENT_ID=<CLIENT_ID> --env COMPUTE_CONTEXT_NAME=<COMPUTE_CONTEXT_NAME> --env MCP_TIERS=<MCP_TIERS> --transport stdio sas-viya -- docker run -i --rm -e VIYA_ENDPOINT -e SSL_VERIFY -e CLIENT_ID -e COMPUTE_CONTEXT_NAME -e MCP_TIERS ghcr.io/sassoftware/sas-mcp-server:1.19.0

Replace <…> with your own values. 4 more environment variables are in the server README

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about SAS Viya

How to install SAS Viya in Claude Code?

Run `claude mcp add --env VIYA_ENDPOINT=<VIYA_ENDPOINT> --env SSL_VERIFY=<SSL_VERIFY> --env CLIENT_ID=<CLIENT_ID> --env COMPUTE_CONTEXT_NAME=<COMPUTE_CONTEXT_NAME> --env MCP_TIERS=<MCP_TIERS> --transport stdio sas-viya -- docker run -i --rm -e VIYA_ENDPOINT -e SSL_VERIFY -e CLIENT_ID -e COMPUTE_CONTEXT_NAME -e MCP_TIERS ghcr.io/sassoftware/sas-mcp-server:1.19.0`. Replace bracketed placeholders with your actual Viya connection details.

What does the SAS Viya MCP server do?

It gives AI assistants 115 tools to execute SAS programs, run AutoML experiments, and interact with Viya CAS and compute APIs.

How is authentication handled?

It relies on OAuth 2.0 with PKCE via browser prompt. For stdio setups, you can pre-authenticate using uv run sas-mcp-login or the official sas-viya auth loginCode command.

Similar MCP servers

All MCP servers for Data and databases →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor