# SAS Viya MCP server

> Run SAS code and work with Compute, CAS, models, reports and decisioning on a SAS Viya environment.

- Listing: https://mcp.tc/i/sas-viya
- Connect: this is a local (stdio) server; install it on your machine (see Install). The listing link is a page, not an MCP endpoint.
- Type: local (stdio)
- Auth: no API key needed
- Category: [Data & Analytics](https://mcp.tc/c/analytics)
- Vendor: SAS Software
- Homepage: <https://www.sas.com/en_us/software/viya/mcp-server.html>
- Repository: <https://github.com/sassoftware/sas-mcp-server>
- Package: oci `ghcr.io/sassoftware/sas-mcp-server:1.18.0`

## About

Connects an assistant to a SAS Viya environment and exposes 92 tools across the analytics lifecycle. Tools are grouped in 10 tiers: Compute, Data Discovery, Data Operations, Reports, Batch Jobs, AutoML, Models, Decisioning, Workbench and Business Glossary. It also offers prompt templates for improving SAS code and interactive views for data, SAS logs and glossary editing in clients that render them.

It is self-hosted: run the container image ghcr.io/sassoftware/sas-mcp-server, or run it from source with Python 3.12+ and uv, in HTTP or stdio mode. It needs the VIYA\_ENDPOINT of your SAS Viya environment with the compute service. Users sign in through SASLogon with OAuth 2.0 PKCE, or a cached token in stdio mode.

## What it can do

- Execute SAS code on a Viya Compute context
- Discover and operate on data in Compute and CAS
- Work with reports and batch jobs
- Train AutoML projects and score models
- Use decisioning and business glossary tools
- Limit exposed tools by tier or read-only mode
- View data and SAS logs in interactive views

## Example prompts

- "Run this SAS code on Viya and show me the log"
- "List the CAS tables available in my Viya environment"
- "Train an AutoML project on my customer churn data"
- "Score this dataset with the model registered in Viya"

## Install

### Claude Code

1. Run this in a terminal, in your project folder:

```bash
claude mcp add --transport stdio sas-viya --env "VIYA_ENDPOINT=<YOUR_VIYA_ENDPOINT>" -- docker run -i --rm ghcr.io/sassoftware/sas-mcp-server:1.18.0
```

2. Start Claude Code and type `/mcp`. **sas-viya** should show as connected.

Add `--scope user` to make it available in every project. Replace the placeholders with your own values.

### Claude Desktop

1. Open **Settings → Developer → Edit Config**. It opens `claude_desktop_config.json`. Add:

`claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "sas-viya": {
      "command": "docker",
      "args": [
        "run",
        "-e",
        "VIYA_ENDPOINT",
        "-i",
        "--rm",
        "ghcr.io/sassoftware/sas-mcp-server:1.18.0"
      ],
      "env": {
        "VIYA_ENDPOINT": "<YOUR_VIYA_ENDPOINT>"
      }
    }
  }
}
```

2. Save the file and restart Claude Desktop. Replace the placeholders with your own values.

Needs Docker on your computer. The file lives in `~/Library/Application Support/Claude/` on macOS and `%APPDATA%\Claude\` on Windows.

### Cursor

[Add to Cursor](<https://cursor.com/install-mcp?name=sas-viya&config=eyJjb21tYW5kIjoiZG9ja2VyIiwiYXJncyI6WyJydW4iLCItZSIsIlZJWUFfRU5EUE9JTlQiLCItaSIsIi0tcm0iLCJnaGNyLmlvL3Nhc3NvZnR3YXJlL3Nhcy1tY3Atc2VydmVyOjEuMTguMCJdLCJlbnYiOnsiVklZQV9FTkRQT0lOVCI6IjxZT1VSX1ZJWUFfRU5EUE9JTlQ%2BIn19>) (opens Cursor)

Or add it by hand to `~/.cursor/mcp.json` (all projects) or `.cursor/mcp.json` (this project):

`mcp.json`:

```json
{
  "mcpServers": {
    "sas-viya": {
      "command": "docker",
      "args": [
        "run",
        "-e",
        "VIYA_ENDPOINT",
        "-i",
        "--rm",
        "ghcr.io/sassoftware/sas-mcp-server:1.18.0"
      ],
      "env": {
        "VIYA_ENDPOINT": "<YOUR_VIYA_ENDPOINT>"
      }
    }
  }
}
```

Needs Docker on your computer. Replace the placeholders with your own values.

### VS Code

[Install in VS Code](<https://vscode.dev/redirect/mcp/install?name=sas-viya&config=%7B%22type%22%3A%22stdio%22%2C%22command%22%3A%22docker%22%2C%22args%22%3A%5B%22run%22%2C%22-e%22%2C%22VIYA_ENDPOINT%22%2C%22-i%22%2C%22--rm%22%2C%22ghcr.io%2Fsassoftware%2Fsas-mcp-server%3A1.18.0%22%5D%2C%22env%22%3A%7B%22VIYA_ENDPOINT%22%3A%22%3CYOUR_VIYA_ENDPOINT%3E%22%7D%7D>) (opens VS Code)

Or from a terminal:

```bash
code --add-mcp '{"name":"sas-viya","type":"stdio","command":"docker","args":["run","-e","VIYA_ENDPOINT","-i","--rm","ghcr.io/sassoftware/sas-mcp-server:1.18.0"],"env":{"VIYA_ENDPOINT":"<YOUR_VIYA_ENDPOINT>"}}'
```

Or commit it to the repo in `.vscode/mcp.json`:

`.vscode/mcp.json`:

```json
{
  "servers": {
    "sas-viya": {
      "type": "stdio",
      "command": "docker",
      "args": [
        "run",
        "-e",
        "VIYA_ENDPOINT",
        "-i",
        "--rm",
        "ghcr.io/sassoftware/sas-mcp-server:1.18.0"
      ],
      "env": {
        "VIYA_ENDPOINT": "<YOUR_VIYA_ENDPOINT>"
      }
    }
  }
}
```

Needs Docker on your computer.

### Devin Desktop

1. Add it to `~/.config/devin/mcp_config.json` (macOS and Linux) or `%APPDATA%\devin\mcp_config.json` (Windows):

`mcp_config.json`:

```json
{
  "mcpServers": {
    "sas-viya": {
      "command": "docker",
      "args": [
        "run",
        "-e",
        "VIYA_ENDPOINT",
        "-i",
        "--rm",
        "ghcr.io/sassoftware/sas-mcp-server:1.18.0"
      ],
      "env": {
        "VIYA_ENDPOINT": "<YOUR_VIYA_ENDPOINT>"
      }
    }
  }
}
```

2. Refresh the MCP server list in Cascade. Replace the placeholders with your own values.

Devin Desktop is the new name for Windsurf.

### Codex

```bash
codex mcp add sas-viya --env "VIYA_ENDPOINT=<YOUR_VIYA_ENDPOINT>" -- docker run -i --rm ghcr.io/sassoftware/sas-mcp-server:1.18.0
```

Or edit `~/.codex/config.toml` directly:

`config.toml`:

```toml
[mcp_servers.sas-viya]
command = "docker"
args = ["run", "-i", "--rm", "ghcr.io/sassoftware/sas-mcp-server:1.18.0"]
env = { VIYA_ENDPOINT = "<YOUR_VIYA_ENDPOINT>" }
```

Needs Docker on your computer. Replace the placeholders with your own values.

### Gemini CLI

```bash
gemini mcp add -e "VIYA_ENDPOINT=<YOUR_VIYA_ENDPOINT>" sas-viya docker -- run -i --rm ghcr.io/sassoftware/sas-mcp-server:1.18.0
```

This adds it to the current project. Add `-s user` to use it everywhere.

### Any client

Most clients that start local servers accept this shape:

```json
{
  "mcpServers": {
    "sas-viya": {
      "command": "docker",
      "args": [
        "run",
        "-e",
        "VIYA_ENDPOINT",
        "-i",
        "--rm",
        "ghcr.io/sassoftware/sas-mcp-server:1.18.0"
      ],
      "env": {
        "VIYA_ENDPOINT": "<YOUR_VIYA_ENDPOINT>"
      }
    }
  }
}
```

Zed puts servers under `context_servers` in its settings, with the same `command`, `args` and `env` fields.

Needs Docker on your computer. Replace the placeholders with your own values.

## Details

- Server version: 1.18.0
- Last checked: 2026-10-04
- Listed: 2026-10-04
- Updated: 2026-10-04

---
Source: https://mcp.tc/i/sas-viya (mcp.tc is an independent directory, not affiliated with this server's publisher). Corrections: https://mcp.tc/report
