# sassoftware/sas-mcp-server architecture

> Architecture diagram of the GitHub repository sassoftware/sas-mcp-server, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sassoftware/sas-mcp-server
- Repository: https://github.com/sassoftware/sas-mcp-server

## Overview

SAS Viya MCP Server exposes Viya analytics capabilities as tiered MCP tools. An MCP client invokes the server, which registers selected tool tiers; tool handlers use authenticated Viya sessions to perform domain operations against Viya and return results. Separate HTTP and stdio entry points, OAuth/token authentication, prompts, and interactive views round out the product. Edges reflect README statements or source-index references; some unsampled tool implementations are represented by their exact files, with no speculative internal call sequence.

Main entry points: [`src/sas_mcp_server/tools/__init__.py`](https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/tools/__init__.py) (Tier Registration), [`src/sas_mcp_server/viya_client.py`](https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/viya_client.py) (Viya REST Client), [`src/sas_mcp_server/landing.py`](https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/landing.py) (HTTP Entry), [`src/sas_mcp_server/stdio_server.py`](https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/stdio_server.py) (Stdio Entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_server["MCP Server"]
  node_http["HTTP Entry<br/>[landing.py]"]
  node_stdio["Stdio Entry<br/>[stdio_server.py]"]
  node_mcp["MCP Server Core<br/>[mcp_server.py]"]
  node_tool_registry["Tier Registration<br/>[__init__.py]"]
  node_prompts["Prompt Templates<br/>[prompts.py]"]
end

subgraph group_analytics["Analytics Tools"]
  node_compute["Compute and Jobs<br/>[compute.py]"]
  node_discovery["Data Discovery<br/>[discovery.py]"]
  node_data_ops["Data Operations<br/>[data_ops.py]"]
  node_automl["AutoML<br/>[automl.py]"]
  node_scoring["Model Scoring<br/>[model_scoring.py]"]
  node_reports["Reports<br/>[reports.py]"]
  node_report_helpers["Report Authoring"]
end

subgraph group_decision["Decisioning and Governance"]
  node_decision_tools["Decisioning Tools<br/>[decisioning.py]"]
  node_decision_content["Decision Content"]
  node_decision_assets["Decision Assets"]
  node_glossary["Business Glossary<br/>[glossary.py]"]
  node_glossary_helpers["Glossary Operations"]
end

subgraph group_shared["Shared Services"]
  node_config["Configuration<br/>[config.py]"]
  node_sessions["Viya Sessions<br/>[_common.py]"]
  node_viya_client["Viya REST Client<br/>[viya_client.py]"]
end

subgraph group_auth["Authentication and Experience"]
  node_auth["OAuth and Tokens<br/>[auth.py]"]
  node_login["Login Helper<br/>[auth_login.py]"]
  node_views["Interactive Views<br/>[__init__.py]"]
end

node_client(("MCP Client"))
node_viya[("SAS Viya")]

node_client -->|"connects HTTP"| node_http
node_client -->|"starts stdio"| node_stdio
node_http -.->|"serves MCP"| node_mcp
node_stdio -->|"registers tools"| node_tool_registry
node_http -->|"registers tools"| node_tool_registry
node_tool_registry -->|"registers tier"| node_compute
node_tool_registry -->|"registers tier"| node_discovery
node_tool_registry -->|"registers tier"| node_data_ops
node_tool_registry -->|"registers tier"| node_automl
node_tool_registry -->|"registers tier"| node_scoring
node_tool_registry -->|"registers tier"| node_reports
node_tool_registry -->|"registers tier"| node_decision_tools
node_tool_registry -->|"registers tier"| node_decision_content
node_tool_registry -->|"registers tier"| node_glossary
node_stdio -->|"loads prompts"| node_prompts
node_reports -->|"uses authoring"| node_report_helpers
node_decision_tools -->|"uses assets"| node_decision_assets
node_decision_content -->|"uses assets"| node_decision_assets
node_glossary -->|"uses helpers"| node_glossary_helpers
node_sessions -->|"creates clients"| node_viya_client
node_discovery -->|"uses REST client"| node_viya_client
node_data_ops -->|"uses REST client"| node_viya_client
node_reports -->|"uses REST client"| node_viya_client
node_glossary -->|"uses REST client"| node_viya_client
node_decision_assets -->|"uses REST client"| node_viya_client
node_viya_client -->|"calls REST APIs"| node_viya
node_config -->|"configures auth"| node_auth
node_login -->|"reads environment"| node_config
node_http -->|"authenticates users"| node_auth
node_tool_registry -->|"registers views"| node_views

click node_http "https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/landing.py"
click node_stdio "https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/stdio_server.py"
click node_mcp "https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/mcp_server.py"
click node_tool_registry "https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/tools/__init__.py"
click node_prompts "https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/prompts.py"
click node_compute "https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/tools/compute.py"
click node_discovery "https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/tools/discovery.py"
click node_data_ops "https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/tools/data_ops.py"
click node_automl "https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/tools/automl.py"
click node_scoring "https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/tools/model_scoring.py"
click node_reports "https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/tools/reports.py"
click node_report_helpers "https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/helpers/report_authoring_helpers.py"
click node_decision_tools "https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/tools/decisioning.py"
click node_decision_content "https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/tools/decisioning_content.py"
click node_decision_assets "https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/helpers/decisioning_assets.py"
click node_glossary "https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/tools/glossary.py"
click node_glossary_helpers "https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/helpers/glossary_helpers.py"
click node_config "https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/config.py"
click node_sessions "https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/tools/_common.py"
click node_viya_client "https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/viya_client.py"
click node_auth "https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/auth.py"
click node_login "https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/auth_login.py"
click node_views "https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/ui/__init__.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_http,node_stdio,node_mcp,node_tool_registry,node_prompts,node_client toneBlue
class node_compute,node_discovery,node_data_ops,node_automl,node_scoring,node_reports,node_report_helpers,node_viya toneAmber
class node_decision_tools,node_decision_content,node_decision_assets,node_glossary,node_glossary_helpers toneMint
class node_config,node_sessions,node_viya_client toneRose
class node_auth,node_login,node_views toneIndigo
```

## Components

### MCP Server

- [HTTP Entry](https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/landing.py): `src/sas_mcp_server/landing.py`
- [Stdio Entry](https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/stdio_server.py): `src/sas_mcp_server/stdio_server.py`
- [MCP Server Core](https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/mcp_server.py): `src/sas_mcp_server/mcp_server.py`
- [Tier Registration](https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/tools/__init__.py): `src/sas_mcp_server/tools/__init__.py`
- [Prompt Templates](https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/prompts.py): `src/sas_mcp_server/prompts.py`

### Analytics Tools

- [Compute and Jobs](https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/tools/compute.py): `src/sas_mcp_server/tools/compute.py`
- [Data Discovery](https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/tools/discovery.py): `src/sas_mcp_server/tools/discovery.py`
- [Data Operations](https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/tools/data_ops.py): `src/sas_mcp_server/tools/data_ops.py`
- [AutoML](https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/tools/automl.py): `src/sas_mcp_server/tools/automl.py`
- [Model Scoring](https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/tools/model_scoring.py): `src/sas_mcp_server/tools/model_scoring.py`
- [Reports](https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/tools/reports.py): `src/sas_mcp_server/tools/reports.py`
- [Report Authoring](https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/helpers/report_authoring_helpers.py): `src/sas_mcp_server/helpers/report_authoring_helpers.py`

### Decisioning and Governance

- [Decisioning Tools](https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/tools/decisioning.py): `src/sas_mcp_server/tools/decisioning.py`
- [Decision Content](https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/tools/decisioning_content.py): `src/sas_mcp_server/tools/decisioning_content.py`
- [Decision Assets](https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/helpers/decisioning_assets.py): `src/sas_mcp_server/helpers/decisioning_assets.py`
- [Business Glossary](https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/tools/glossary.py): `src/sas_mcp_server/tools/glossary.py`
- [Glossary Operations](https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/helpers/glossary_helpers.py): `src/sas_mcp_server/helpers/glossary_helpers.py`

### Shared Services

- [Configuration](https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/config.py): `src/sas_mcp_server/config.py`
- [Viya Sessions](https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/tools/_common.py): `src/sas_mcp_server/tools/_common.py`
- [Viya REST Client](https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/viya_client.py): `src/sas_mcp_server/viya_client.py`

### Authentication and Experience

- [OAuth and Tokens](https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/auth.py): `src/sas_mcp_server/auth.py`
- [Login Helper](https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/auth_login.py): `src/sas_mcp_server/auth_login.py`
- [Interactive Views](https://github.com/sassoftware/sas-mcp-server/blob/main/src/sas_mcp_server/ui/__init__.py): `src/sas_mcp_server/ui/__init__.py`

### Other components

- **MCP Client**
- **SAS Viya**

## Connections

- MCP Client → HTTP Entry: connects HTTP (evidence: `README.md`)
- MCP Client → Stdio Entry: starts stdio (evidence: `README.md`)
- HTTP Entry → MCP Server Core: serves MCP
- Stdio Entry → Tier Registration: registers tools (evidence: `src/sas_mcp_server/stdio_server.py`)
- HTTP Entry → Tier Registration: registers tools (evidence: `src/sas_mcp_server/landing.py`)
- Tier Registration → Compute and Jobs: registers tier (evidence: `src/sas_mcp_server/tools/__init__.py`)
- Tier Registration → Data Discovery: registers tier (evidence: `src/sas_mcp_server/tools/__init__.py`)
- Tier Registration → Data Operations: registers tier (evidence: `src/sas_mcp_server/tools/__init__.py`)
- Tier Registration → AutoML: registers tier (evidence: `src/sas_mcp_server/tools/__init__.py`)
- Tier Registration → Model Scoring: registers tier (evidence: `src/sas_mcp_server/tools/__init__.py`)
- Tier Registration → Reports: registers tier (evidence: `src/sas_mcp_server/tools/__init__.py`)
- Tier Registration → Decisioning Tools: registers tier (evidence: `src/sas_mcp_server/tools/__init__.py`)
- Tier Registration → Decision Content: registers tier (evidence: `src/sas_mcp_server/tools/__init__.py`)
- Tier Registration → Business Glossary: registers tier (evidence: `src/sas_mcp_server/tools/__init__.py`)
- Stdio Entry → Prompt Templates: loads prompts (evidence: `src/sas_mcp_server/stdio_server.py`)
- Reports → Report Authoring: uses authoring (evidence: `src/sas_mcp_server/helpers/report_authoring_helpers.py`)
- Decisioning Tools → Decision Assets: uses assets (evidence: `src/sas_mcp_server/tools/decisioning.py`)
- Decision Content → Decision Assets: uses assets (evidence: `src/sas_mcp_server/tools/decisioning_content.py`)
- Business Glossary → Glossary Operations: uses helpers (evidence: `src/sas_mcp_server/tools/glossary.py`)
- Viya Sessions → Viya REST Client: creates clients (evidence: `src/sas_mcp_server/tools/_common.py`)
- Data Discovery → Viya REST Client: uses REST client (evidence: `src/sas_mcp_server/tools/discovery.py`)
- Data Operations → Viya REST Client: uses REST client (evidence: `src/sas_mcp_server/tools/data_ops.py`)
- Reports → Viya REST Client: uses REST client (evidence: `src/sas_mcp_server/tools/reports.py`)
- Business Glossary → Viya REST Client: uses REST client (evidence: `src/sas_mcp_server/tools/glossary.py`)
- Decision Assets → Viya REST Client: uses REST client (evidence: `src/sas_mcp_server/helpers/decisioning_assets.py`)
- Viya REST Client → SAS Viya: calls REST APIs (evidence: `src/sas_mcp_server/viya_client.py`)
- Configuration → OAuth and Tokens: configures auth (evidence: `src/sas_mcp_server/config.py`)
- Login Helper → Configuration: reads environment (evidence: `src/sas_mcp_server/auth_login.py`)
- HTTP Entry → OAuth and Tokens: authenticates users (evidence: `README.md`)
- Tier Registration → Interactive Views: registers views (evidence: `src/sas_mcp_server/tools/__init__.py`)
