SAS
A Model Context Protocol (MCP) server for executing SAS code on SAS Viya environments
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
Maintainer
Works with
Installation
Manual Installation
npx sasConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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)
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-serverInstall Python dependencies
Use uv to synchronize all required Python packages from the project lockfile.
uv syncConfigure 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.comAuthenticate 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-loginStart 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 appConfigure 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.
SAS Alternatives — Similar Data Science & ML Servers
Looking for alternatives to SAS? Here are other popular data science & ml servers you can use with Claude, Cursor, and VS Code.
Ultrarag
★ 5.6kA Low-Code MCP Framework for Building Complex and Innovative RAG Pipelines
RocketRide
★ 3.1k📇 🏠 - MCP server that exposes RocketRide AI pipelines as t
Aix Db
★ 2.1kAix-DB 基于 LangChain/LangGraph 框架,结合 MCP Skills 多智能体协作架构,实现自然语言到数据洞察的端到端转换。
NeMo Data Designer
★ 1.9k🎨 NeMo Data Designer: Generate high-quality synthetic data from scratch or from seed data.
PaperBanana
★ 1.7kOpen source implementation and extension of Google Research’s PaperBanana for automated academic figures, diagrams, and research visuals, expanded to new domains like slide generation.
MiniMax
★ 1.5kBridges MiniMax AI capabilities to the Model Context Protocol, enabling AI agents to perform image understanding, text-to-image generation, and speech synthesis. It provides a standardized interface for accessing MiniMax's core tools via JSON-RPC.
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.
Set Up SAS in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.