Get the FREE Ultimate OpenClaw Setup Guide →

sas

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

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio sassoftware-sas-mcp-server uvx run app \
  --env VIYA_ENDPOINT="URL to your SAS Viya endpoint (e.g., https://your-viya-server.com)"

How to use

This MCP server provides a HTTP-based interface to execute SAS code on a SAS Viya compute context. It authenticates clients using OAuth2 with PKCE and exposes an MCP endpoint that accepts SAS code submissions and returns execution results, including logs and listing output. The primary tool available through this server is execute_sas_code, which lets clients send SAS snippets and receive the resulting logs and output. Clients can configure an MCP client to point to http://localhost:8134/mcp and use the SAS MCP endpoint to run code against a connected Viya environment.

How to install

Prerequisites:

  • Python 3.12+ installed
  • uv 0.8+ installed
  • SAS Viya environment with a compute service configured for MCP
  • Optional: Docker if you prefer containerized setup

Installation steps:

  1. Clone the repository:
git clone <repository-url>
cd sas-mcp-server
  1. Install dependencies via uv:
uv sync

Note: This will by default create a virtual environment named .venv in the project root. If the virtual environment is not created, run uv venv and then re-run uv sync.

Configuration:

  1. Copy the environment sample and set your Viya endpoint:
cp .env.sample .env

Edit .env and set:

VIYA_ENDPOINT=https://your-viya-server.com

Run the server:

uv run app

The MCP server will be available at http://localhost:8134/mcp by default.

Optional Docker-based setup:

  • If you prefer Docker, follow docker/setup.md in the examples folder (not shown in this README).

Additional notes

Environment variables and configuration:

  • VIYA_ENDPOINT must point to your SAS Viya instance with MCP configuration enabled.
  • The server uses PKCE-based OAuth2 flow for client authentication; ensure your MCP clients are configured accordingly.
  • If you encounter issues starting the server, ensure the .venv is created and dependencies are installed via uv sync.
  • The default MCP URL is http://localhost:8134/mcp; adjust if you change the port or host in configuration.
  • If using Docker, ensure the container has access to the Viya endpoint and proper network permissions.

Related MCP Servers

Sponsor this space

Reach thousands of developers