SAS Viya MCP Server

Official SAS Viya MCP server: run SAS code, train AutoML projects, score models and drive analytics with 115 tools

  • 68 ★ on the repository
  • Last commit
  • Apache-2.0
MCP serverOfficial

Broad access

Why this level

  • Runs arbitrary SAS code in the company compute environment
  • Exposes corporate data and models under the user account
All reasons and checks

sassoftware/sas-mcp-server

Install

Manual install

claude mcp add --transport http sas-viya http://localhost:8134/mcp

Start the server with `uv run app` first.

Access and checks

How we review

Broad accessThe tool can change data, run commands or handle secrets.

  • Runs arbitrary SAS code in the company compute environment
  • Exposes corporate data and models under the user account

This is third-party code. Review the repository files before installing.

What it does

The server connects an agent to a SAS Viya environment. The agent runs SAS code through the compute service, reads logs and tables, trains AutoML projects and scores models. Tools are split into 11 tiers that you enable as needed, so the agent is not flooded with a long tool list. Clients with MCP Apps support (Claude, ChatGPT, Microsoft 365 Copilot, VS Code, Cursor) show interactive panels for data, SAS logs and glossary editing. Prompt templates help improve SAS code. Sign-in uses OAuth2 with PKCE; the server runs over HTTP, stdio or in a container.

Who it is for. Analysts and data scientists who already run SAS Viya and want agent access to it.

Good fit when

  • You want the agent to run and debug SAS code
  • You need to train an AutoML model and score it without clicking through the UI
  • Your team runs SAS Viya on Kubernetes and wants a standard way to expose it to agents
  • You want an interactive panel over SAS tables and logs inside Claude or VS Code
  • Your team wants shared agent access to Viya through Kubernetes and an ingress

Not a fit when

  • You have no SAS Viya environment, the server is useless without one
  • You work with data outside SAS, such as local CSV files
  • Your security policy forbids running code with a token from a local cache

Example request

Run a SAS program in Viya that computes average order value by region and show me the log

MCP

Transport
stdio, http
Authentication
OAuth

Environment variables

VIYA_ENDPOINT required
Address of your SAS Viya environment
COMPUTE_SESSION_ID
Fixed session ID when the environment does not expose /compute/contexts

Limitations

Requires Python 3.12 or newer, uv and a SAS Viya environment with the compute service; tool availability depends on the Viya release (see COMPATIBILITY.md). Some environment setup is done by a Viya administrator. The stdio mode keeps an access token in a local cache and needs a fresh sign-in after it expires. Passing a raw bearer token is enabled by ALLOW_RAW_BEARER and VIYA_AUTH=false disables sign-in checks, so keep those flags off on shared machines.

How to disable. Remove the server entry from your client configuration and stop the process or container; the token cache lives in `~/.sas-mcp-server/credentials.json`.

FAQ

How do I run the server without Python?

Use Docker: image `ghcr.io/sassoftware/sas-mcp-server:latest`, pass the environment address in VIYA_ENDPOINT, port 8134.

How do I sign in with stdio?

Run `sas-viya auth loginCode` or `uv run sas-mcp-login` once: the token is cached locally and the client starts the server itself.

What are the 11 tool tiers?

Tools are grouped by stages of the analytics life cycle, and you enable only the groups you need to keep the agent tool list short.

Does it work with every Viya release?

No, available tools depend on the release, from LTS 2024.09 to Stable 2026.10; the table is in COMPATIBILITY.md.

Where is the token stored?

In stdio mode it goes to `~/.sas/credentials.json` or `~/.sas-mcp-server/credentials.json`; no password is stored.

Discussion

No questions or reviews yet.

vi-sql is a terminal SQL client with a built-in MCP server: the agent sees the schema and drafts queries straight in your editor

MCP serverExtended access213Repository stars

An MCP server for Microsoft SQL Server and Azure SQL: the agent lists tables and runs SQL queries that read and write data

MCP serverBroad access404Repository stars

MCP server and CLI to drive real Microsoft Excel: Power Query, DAX, VBA, PivotTables and charts

MCP serverBroad access887Repository stars

One MCP server for SQLite, SQL Server, PostgreSQL and MySQL: read and change data, edit schemas and export to CSV and JSON

MCP serverBroad access392Repository stars

MCP server for SAP HANA and HANA Cloud: schema browsing, SQL with row caps and 34 tools, with writes blocked by default

MCP serverBroad access75Repository stars
Official

Official Tableau MCP server: the agent finds data sources, sends queries to them and opens dashboards and Pulse metrics

MCP serverBroad access372Repository stars

README in short

The repository covers installation with Python and uv, running in HTTP, stdio, Docker and Kubernetes modes, OAuth2 setup and environment variables. SAS articles on connecting GitHub Copilot and Claude Code are linked.

README badge

Report a problem