# SAS Viya

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

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 66
- Author: sassoftware
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/sassoftware/sas-mcp-server
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/mcp/sas-viya

## What it 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+.

## Requirements
- Needs: Docker
- Environment variables: `VIYA_ENDPOINT`, `SSL_VERIFY`, `CLIENT_ID`, `COMPUTE_CONTEXT_NAME`, `MCP_TIERS`, `MCP_READ_ONLY`, `MCP_APPS`, `MCP_STATELESS_HTTP`, `VIYA_CLIENT_TIMEOUT` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
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

### Codex

**Platform CLI**
```bash
codex mcp add sas-viya --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> -- 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

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "sas-viya": {
            "command": "docker",
            "args": [
                "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"
            ],
            "env": {
                "VIYA_ENDPOINT": "<VIYA_ENDPOINT>",
                "SSL_VERIFY": "<SSL_VERIFY>",
                "CLIENT_ID": "<CLIENT_ID>",
                "COMPUTE_CONTEXT_NAME": "<COMPUTE_CONTEXT_NAME>",
                "MCP_TIERS": "<MCP_TIERS>"
            }
        }
    }
}
```
Replace <…> with your own values. 4 more environment variables are in the server README

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "sas-viya": {
            "type": "stdio",
            "command": "docker",
            "args": [
                "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"
            ],
            "env": {
                "VIYA_ENDPOINT": "<VIYA_ENDPOINT>",
                "SSL_VERIFY": "<SSL_VERIFY>",
                "CLIENT_ID": "<CLIENT_ID>",
                "COMPUTE_CONTEXT_NAME": "<COMPUTE_CONTEXT_NAME>",
                "MCP_TIERS": "<MCP_TIERS>"
            }
        }
    }
}
```
Replace <…> with your own values. 4 more environment variables are in the server README

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e VIYA_ENDPOINT=<VIYA_ENDPOINT> -e SSL_VERIFY=<SSL_VERIFY> -e CLIENT_ID=<CLIENT_ID> -e COMPUTE_CONTEXT_NAME=<COMPUTE_CONTEXT_NAME> -e MCP_TIERS=<MCP_TIERS> 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

## When to use it
- 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
- 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

## Similar
- [World Monitor](https://affpapa.org/en/nevibecode/mcp/world-monitor.md) — MCP server · ★ 89408
- [Scrapling MCP Server](https://affpapa.org/en/nevibecode/mcp/scrapling-mcp-server.md) — MCP server · ★ 89433
- [MCP Toolbox for Databases](https://affpapa.org/en/nevibecode/mcp/googleapis-mcp-toolbox-for-databases.md) — MCP server · ★ 16717
- [PostHog MCP Server](https://affpapa.org/en/nevibecode/mcp/posthog-mcp-server.md) — MCP server · ★ 40409
- [dbx](https://affpapa.org/en/nevibecode/mcp/dbx.md) — MCP server · ★ 27669
- [Metabase](https://affpapa.org/en/nevibecode/mcp/metabase.md) — MCP server · ★ 49845

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
