Sas Mcp Server
Execute SAS code and query Compute, CAS, and model APIs on SAS Viya via OAuth 2.0.
- Transport
- Not stated
- Package
- —
- Registry id
- io.github.sassoftware/sas-mcp-server
No install snippet on purpose. A working MCP config is a command, its arguments and an environment block — the last two are where API keys live, so this catalogue never stores them and cannot publish them. Follow the link above for the authors' own instructions.
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)
Getting Started
Prerequisites
Required
- Python 3.12+
- uv 0.8+
- SAS Viya environment with compute service
- Setup the Viya environment for MCP
- See configuration.md
Optional
- Docker: refer to container setup
- Kubernetes: sample manifests (Contour or nginx) and a Helm chart in deploy/
Installation
- Clone the repository:
git clone <repository-url>
cd sas-mcp-server
- Install dependencies
uv sync
NOTE: This will by default create a virtual environment called .venv in the project's root directory.
If for some reason the virtual environment is not created, please run uv venv and then re-run uv sync.
Usage
- Configure environment variables:
cp .env.sample .env
Edit .env and set
VIYA_ENDPOINT=https://your-viya-server.com
- Start the MCP server (see Choosing a deployment mode below):
Option A: HTTP mode (pre-run the server, connect from MCP client)
uv run app
The server will be available at http://localhost:8134/mcp by default. Authentication is handled via OAuth2 PKCE flow in the browser.
Option B: Stdio mode (MCP client starts the server on demand)
Authenticate once. Two equivalent options:
# Option B1 — if you have the SAS Viya CLI installed:
sas-viya auth loginCode
# Option B2 — built-in helper, no external CLI needed (Viya 2022.11+):
uv run sas-mcp-login
Both flows write an access token to a local cache (~/.sas/credentials.json and ~/.sas-mcp-server/credentials.json respectively); the stdio server reads whichever it finds. When the token expires, re-run the same command.
From the project's README.