SAS

v1.0.0Data Science & MLstable

A Model Context Protocol (MCP) server for executing SAS code on SAS Viya environments

sas-aiml
Share:
16
Stars
0
Downloads
0
Weekly
0/5

What is SAS?

SAS is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to model context protocol (mcp) server for executing sas code on sas viya environments

A Model Context Protocol (MCP) server for executing SAS code on SAS Viya environments

This server falls under the Data Science & ML category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • A Model Context Protocol (MCP) server for executing SAS code

Use Cases

Execute SAS code on SAS Viya environments.
sassoftware

Maintainer

LicenseApache-2.0
Languagepython
Versionv1.0.0
UpdatedMay 20, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx sas

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use SAS

The SAS MCP Server connects AI assistants to SAS Viya environments, enabling them to execute SAS code, manage CAS tables, run batch jobs, build machine learning projects, and retrieve reports directly through natural language. It exposes 27 tools covering the full SAS Viya compute lifecycle, from uploading raw data files to scoring models and fetching report images. Data scientists and analysts use it to write, debug, and run SAS programs without switching between tools.

Prerequisites

  • Python 3.12+ and uv 0.8+ installed
  • Access to a SAS Viya environment with the compute service enabled
  • SAS Viya endpoint URL (e.g., https://your-viya-server.com)
  • Valid SAS Viya user credentials for OAuth2 authentication
  • An MCP-compatible client (Claude Desktop, VS Code, Claude Code)
1

Clone the repository

Clone the sas-mcp-server repository from GitHub and enter the project directory.

git clone https://github.com/sassoftware/sas-mcp-server.git
cd sas-mcp-server
2

Install Python dependencies

Use uv to synchronize all required Python packages from the project lockfile.

uv sync
3

Configure the environment

Copy the sample environment file and set your SAS Viya endpoint. This is the only required configuration variable for basic operation.

cp .env.sample .env
# Edit .env and set:
# VIYA_ENDPOINT=https://your-viya-server.com
4

Authenticate with SAS Viya (stdio mode)

If using stdio mode (where the client spawns the server), run the login command once to store credentials. For HTTP mode, authentication happens via OAuth2 PKCE in the browser.

uv run sas-mcp-login
5

Start the server in HTTP mode

Start the MCP server in HTTP mode. It will be available at http://localhost:8134/mcp and authenticate via browser OAuth2 flow.

uv run app
6

Configure your MCP client

Add the SAS MCP server to your AI client configuration. Use the HTTP URL for clients that support streaming HTTP, or configure stdio mode for clients that spawn processes.

SAS Examples

Client configuration

VS Code / Claude Code HTTP configuration and stdio configuration for Claude Desktop.

{
  "mcpServers": {
    "sas-execution-mcp": {
      "url": "http://localhost:8134/mcp",
      "type": "http"
    }
  }
}

// Stdio mode (Claude Desktop):
{
  "mcpServers": {
    "sas-execution-mcp": {
      "command": "uv",
      "args": ["run", "app-stdio"],
      "cwd": "/path/to/sas-mcp-server"
    }
  }
}

Prompts to try

Example prompts that exercise the 27 available SAS Viya tools.

- "Execute this SAS code and show me the log: proc means data=sashelp.cars; run;"
- "List all available CAS servers and caslibs"
- "Upload my CSV file and promote it to CAS memory as a table"
- "Create an AutoML project using the HMEQ dataset and run it"
- "Show me the status of the last batch job I submitted"
- "Debug my SAS log and explain any errors"

Troubleshooting SAS

Authentication fails or OAuth2 browser flow does not open

Verify VIYA_ENDPOINT in your .env file is correct and reachable. For stdio mode, run 'uv run sas-mcp-login' again to refresh credentials. For HTTP mode, ensure port 8134 is not blocked by a firewall.

execute_sas_code returns an error about the compute service

Confirm your SAS Viya user has the 'Compute Service User' role assigned in SAS Environment Manager. The compute service must be running and your user must have permission to start compute sessions.

uv sync fails with Python version errors

The server requires Python 3.12 or higher. Run 'python --version' to check. Install Python 3.12+ via pyenv or your system package manager, then re-run 'uv sync'.

Frequently Asked Questions about SAS

What is SAS?

SAS is a Model Context Protocol (MCP) server that model context protocol (mcp) server for executing sas code on sas viya environments It connects AI assistants to external tools and data sources through a standardized interface.

How do I install SAS?

Follow the installation instructions on the SAS GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with SAS?

SAS works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is SAS free to use?

Yes, SAS is open source and available under the Apache-2.0 license. You can use it freely in both personal and commercial projects.

Browse More Data Science & ML MCP Servers

Explore all data science & ml servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "sas": { "command": "npx", "args": ["-y", "sas"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use SAS?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides