# SAS Viya [Health: Active]

**Category:** 🧮 Data Science Tools  
**Repository:** https://github.com/sassoftware/sas-mcp-server  
**GitHub Stars:** 66  
**Views:** 2  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/sas-viya

## Description
Execute SAS code and query Compute, CAS, and model APIs on SAS Viya via OAuth 2.0.

## Claude Desktop Quick Installation
Remote MCP endpoint (confidence: high). Install path detected from listing signals. Add as a URL/SSE server in your client:

```json
"mcpServers": {
  "sas-viya": {
    "url": "http://localhost:8134/mcp"
  }
}
```

## Documentation

## What SAS Viya does

SAS Viya provides MCP tools for interacting with SAS Viya analytics environments across the analytics life cycle. Its tool catalog contains 115 tools organized into 11 selectable tiers, allowing a deployment to expose a relevant subset of capabilities rather than one undifferentiated collection.

Core workflows include running SAS code, querying SAS Viya Compute and CAS services, training AutoML projects, scoring models, and working with model APIs. The server also provides prompt templates intended to help clients produce better SAS code. Clients that render MCP Apps can receive interactive views for data, SAS logs, and glossary editing.

## How it works

The server supports two primary MCP transports. In HTTP mode, it runs as a separate service and exposes the MCP endpoint at `/mcp`; the default local address is `http://localhost:8134/mcp`. Authentication uses an OAuth 2.0 PKCE flow that opens in a browser. This mode suits shared or longer-running deployments.

In stdio mode, an MCP client launches the server when needed. Before the first run, authenticate with either the SAS Viya CLI's `sas-viya auth loginCode` command or the included `sas-mcp-login` helper. The resulting access token is stored in a local credentials cache, and the stdio server reads the available token. Authentication must be repeated after the token expires.

HTTP mode can also accept a pre-existing Viya bearer token when `ALLOW_RAW_BEARER=true`. For intentionally unauthenticated development endpoints, `VIYA_AUTH=false` disables the SASLogon and OAuth flows. A fixed Compute session can be selected with `COMPUTE_SESSION_ID` when the deployment does not provide `/compute/contexts`.

## Setup and configuration

A local installation requires Python 3.12 or newer, `uv` 0.8 or newer, and a SAS Viya environment with the Compute service. Clone the repository and run `uv sync` to create the project environment and install dependencies. Copy `.env.sample` to `.env`, then set `VIYA_ENDPOINT` to the SAS Viya URL.

Start HTTP mode with `uv run app`, or configure a client to launch stdio mode with `uv run app-stdio`. Docker and Podman images are also supported for HTTP deployment. Kubernetes deployment examples include manifests and a Helm chart; the remote service is placed behind an ingress and accessed over HTTPS.

## Tools and capabilities

- Execute SAS code through Viya Compute.
- Query Compute, CAS, and model APIs.
- Train AutoML projects.
- Score models.
- Select from 11 tool tiers covering different analytics life-cycle areas.
- Provide interactive data, log, and glossary views in clients that render MCP Apps.
- Supply prompt templates for SAS code generation and improvement.

## Limitations and notes

Gemini CLI requires stdio mode because it does not support HTTP mode or browser-based OAuth. Microsoft 365 Copilot requires a remotely hosted MCP server reachable over HTTPS, such as a Kubernetes deployment. Microsoft Copilot Studio also uses a remote HTTPS deployment and may require `MCP_TOOL_RENAME=catalog_=infocat_` because its agent runtime rejects tool names beginning with `catalog_`.

The server needs a SAS Viya environment with the relevant services and authentication setup. HTTP and container deployments use interactive OAuth by default, while stdio depends on a locally cached access token. Container and Kubernetes deployments avoid requiring Python on the host, but still require the corresponding container or cluster infrastructure.

_Full upstream README: https://allmcps.com/mcp/sas-viya/readme_

