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.

[!NOTE] 📢 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.0 (03JUL2026)
  • Version 1.1.0 (31MAY2026)
  • Version 1.0.0 (13MAY2026)

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.0.tar.gz (14.4 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.0-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mas_mcp_toolmaker-1.2.0.tar.gz
  • Upload date:
  • Size: 14.4 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.0.tar.gz
Algorithm Hash digest
SHA256 98ffaf257fd55f0ebc56c49d61abd13ad07d2bcc647e6484835151547412463b
MD5 ab1f1e8ed3e7c5f40d62e4fd12185e2f
BLAKE2b-256 1382b16e68494532711d660137874dac901808946148e7c9b49e8fbc5d44f4f9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mas_mcp_toolmaker-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 22f4825cf49804f648212e9522b2714425ca08f5062ec991c91160cc24942194
MD5 9a5eb955f4aa0c13a00a9111aade257b
BLAKE2b-256 a919f3e1d4c38ea41fbabf533f432d1de55cd2a0d3fc974e7bfc4ed028670ae5

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