Skip to main content

A package containing a Python class and associated methods to create a MCP server script from published SAS Micro Analytic Service (MAS) modules.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mas_mcp_toolmaker-1.2.1.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mas_mcp_toolmaker-1.2.1-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

Details for the file mas_mcp_toolmaker-1.2.1.tar.gz.

File metadata

  • Download URL: mas_mcp_toolmaker-1.2.1.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for mas_mcp_toolmaker-1.2.1.tar.gz
Algorithm Hash digest
SHA256 eb640c2224f47803631259a7120e58ca910540685f5058de5e48708f51183b03
MD5 63f29b4e2b0b80aed65614c536bf9c28
BLAKE2b-256 a1efda407622cb929e708dcb0a95ecd4fc0f19fae3980882606baf5a138e9a85

See more details on using hashes here.

File details

Details for the file mas_mcp_toolmaker-1.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mas_mcp_toolmaker-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 81afc971e65706aca77e35006c360c7bb14794c8fa3dd2e464d5347a02b1c57e
MD5 e0ff0c79461e75d20adecc35dc35616f
BLAKE2b-256 e7aa7251fc50c262c834fbbd51abe376374ee05e8fb59fc3248fbc8e39023ac9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page