We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/lwanger/insperity_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
"""
Utility functions used by Insperity REST API
https://insperity.myisolved.com/rest
Len Wanger
2025
"""
import base64
import os
##############################################################################################################
# Utility routines used by endpoints
##############################################################################################################
def to_mime_base64(input_string: str) -> str:
# Convert a string to RFC2045-MIME variant of Base64.
byte_data = input_string.encode("utf-8")
mime_encoded = base64.b64encode(byte_data)
return mime_encoded.decode("utf-8")
def get_combined_key() -> str:
# create combined key used in header for REST API calls
return to_mime_base64(f"{os.getenv('INSPERITY_CLIENT_ID')}:{os.getenv('INSPERITY_SECRET')}")
def get_headers(access_token: str) -> dict:
# create header dictionary used by requests for REST API calls
return {
'Authorization': f"Bearer {access_token}",
'essScope': "Employee" # ?essScope={Employee|Manager|Supervisor|All*}
}