Sas Mcp Server

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

LLM Mart 2 views 2 listing impressions
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:

Getting Started

Prerequisites

Installation

  1. Clone the repository:
git clone <repository-url>
cd sas-mcp-server
  1. 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

  1. Configure environment variables:
cp .env.sample .env

Edit .env and set

VIYA_ENDPOINT=https://your-viya-server.com
  1. 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.