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
This repository contains a Python package to programmatically create a Model Context Protocol (MCP) server script calling published SAS Micro Analytic Services (MAS) modules discovered in a SAS Viya environment. The output is a Python script (in two flavours) which can be used to stand up an MCP server through stdio, Streamable HTTP (planned) and a format customised for SAS Retrieval Agent Manager (RAM).
A wiki of this repo has been generated using DeepWiki and is available here:
Note that this open-source package is provided as a convenient way to interface with a SAS Viya environment in an MCP context. SAS Viya is proprietary software from SAS Institute through several offerings. Running operations in SAS Viya requires a license and functioning credentials.
Installation & Set up
- Requirements: Python 3.12 or later
- 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.
- While not mandatory, it's recommended to stand up a virtual environment before installing this package. A convenient shell script
build.shis provided for this purpose. Refer this repository for a starter build script. - The simplest way is to pip install this package from pypi.org
pip install mas-mcp-toolmaker
- In case you would like to perform a local install,
pip install -e .
- 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 basic operations involved.
- Generating a list of MAS modules from a SAS Viya environment
from mas_mcp_toolmaker import MASModule
masm = MASModule()
- 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
masm.script_ram_server("your_ram_server_file.py")
Refer the notebook for other functions.
Contact
- Sundaresh Sankaran (email)
Version
- Version 1.1.0 (31MAY2026)
- Version 1.0 (13MAY2026)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mas_mcp_toolmaker-1.1.0.tar.gz.
File metadata
- Download URL: mas_mcp_toolmaker-1.1.0.tar.gz
- Upload date:
- Size: 13.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ccc480011c3fc446f288ca5617d13067a74a89aed10196d359caaefc65ce61d4
|
|
| MD5 |
07b29a1c2c7b6a32238e6e584519d8cc
|
|
| BLAKE2b-256 |
f8c459007aaf9fbf712ca0d5218694fcb5b8c6dfc10ade76348851f11feaeac0
|
File details
Details for the file mas_mcp_toolmaker-1.1.0-py3-none-any.whl.
File metadata
- Download URL: mas_mcp_toolmaker-1.1.0-py3-none-any.whl
- Upload date:
- Size: 17.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e6d7a98a1b6b535706c4efd83964cd424fcd1b7a46f5e61e31c6a4d3510e7a8
|
|
| MD5 |
03ce4f0b7445cab08ea92515ce12ff1b
|
|
| BLAKE2b-256 |
ca6fb4d41e389fdf59a9643550df366ab822c56c33fb3662d6a4a750a86462a3
|