Skip to main content

Micro Analytic Service (MAS) - Model Context Protocol (MCP) Tool Maker

A Model Context Protocol (MCP) Server Script for your SAS Viya Micro Analytic Service (MAS) modules

This repository contains a Python package that creates a Model Context Protocol (MCP) server script for calling published SAS Micro Analytic Services (MAS) modules discovered in a SAS Viya environment. The output is a Python script (in two flavours) for an MCP server served through stdio, Streamable HTTP (planned) and a format customised for SAS Retrieval Agent Manager (RAM).

Python package at: https://pypi.org/project/mas-mcp-toolmaker/

A wiki of this repo has been generated using DeepWiki and is available here: Ask DeepWiki

Note that this open-source package is provided as a convenient way to interface with a SAS Viya environment over MCP. SAS Viya is proprietary software from SAS Institute available in several offerings. Running SAS Viya requires a license and functioning credentials.

📢 Watch this video to learn more.

Installation & Set up

  1. Requirements: Python 3.12 or later

  2. Access to a SAS Viya environment with SAS Micro Analytic Service (MAS). This is typically a SAS Viya Enterprise or SAS Viya Advanced offering. Refer this page for details.

  3. While not mandatory, we recommended standing up a virtual environment before installing this package. A convenient shell script build.sh is provided for this purpose. Refer this repository for a starter build script. Also read this article for more details.

  4. The simplest way is to pip install this package from pypi.org

pip install mas-mcp-toolmaker
  1. In case you would like to perform a local install,
pip install -e .
  1. Use a .env file (refer sample.env, create a copy and rename to .env) to set environment variables for the following: (Refer this link for more details on obtaining access tokens: Authentication to SAS Viya: a couple of approaches)
    • VIYA_HOST: A URL pointing to your SAS Viya environment
    • VIYA_ACCESS_TOKEN: An access token which helps you authenticate to SAS Viya

Quick Start: Running the notebook

# if using virtual environment (use Windows equivalent where applicable)
cd build
. buildproj/bin/activate
jupyter-lab

The notebook mas-mcp-toolmaker.ipynb contains further details.

Quick Start: Basic Commands

Using this package is very simple. At a fundamental level, there are two operations involved.

  1. Generating a list of MAS modules from a SAS Viya environment
from mas_mcp_toolmaker import MASModule

masm = MASModule()
  1. Writing the extracted modules in tool representation to an MCP server script of your chosen flavour.
masm.script_stdio_server("your_server_file.py")

# or, if you wish to write to a Retrieval Agent Manager file 

masm.script_ram_server("your_ram_server_file.py")

Refer the notebook for other functions.

Contact

  • Sundaresh Sankaran (email)

Version

  • Version 1.2.1 (04JUL2026)
  • Version 1.2.0 (03JUL2026)
  • Version 1.0.0 (13MAY2026)

Refer CHANGELOG.md for a detailed change log.

Metadata

Release files for mas-mcp-toolmaker 1.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mas-mcp-toolmaker 1.2.1
File Size Uploaded Provenance Actions
mas_mcp_toolmaker-1.2.1.tar.gz 14.5 kB Without provenance Details for mas_mcp_toolmaker-1.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mas-mcp-toolmaker 1.2.1
File Interpreter ABI Platform Actions
mas_mcp_toolmaker-1.2.1-py3-none-any.whl Python 3 none any Details for mas_mcp_toolmaker-1.2.1-py3-none-any.whl

Total release size: 31.9 kB

Release files / mas_mcp_toolmaker-1.2.1.tar.gz

Download URL mas_mcp_toolmaker-1.2.1.tar.gz
Size 14.5 kB
Tags Source
SHA-256 checksum
How to use checksums
eb640c2224f47803631259a7120e58ca910540685f5058de5e48708f51183b03
BLAKE2b-256 checksum
How to use checksums
a1efda407622cb929e708dcb0a95ecd4fc0f19fae3980882606baf5a138e9a85
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / mas_mcp_toolmaker-1.2.1-py3-none-any.whl

Download URL mas_mcp_toolmaker-1.2.1-py3-none-any.whl
Size 17.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
81afc971e65706aca77e35006c360c7bb14794c8fa3dd2e464d5347a02b1c57e
BLAKE2b-256 checksum
How to use checksums
e7aa7251fc50c262c834fbbd51abe376374ee05e8fb59fc3248fbc8e39023ac9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for mas-mcp-toolmaker 1.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page