mcpField
M
mainframe-mcp-server

mainframe-mcp-server

Local
github.com/NotHarshhaaCloud & Infra0Updated 2d ago

About mainframe-mcp-server

MCP server for IBM z/OS jobs, datasets, USS, and operational diagnostics via Zowe SDK.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"notharshhaa-mainframe": {
"command": "npx",
"args": [
"-y",
"@notharshhaa/mainframe-mcp-server"
],
"env": {
"ZOSMF_HOST": "<ZOSMF_HOST>",
"ZOSMF_PORT": "<ZOSMF_PORT>",
"ZOSMF_BASE_PATH": "<ZOSMF_BASE_PATH>",
"ZOSMF_USER": "<ZOSMF_USER>",
"ZOSMF_PASSWORD": "<ZOSMF_PASSWORD>",
"ZOSMF_TOKEN": "<ZOSMF_TOKEN>",
"ZOSMF_TOKEN_TYPE": "<ZOSMF_TOKEN_TYPE>",
"ZOSMF_REJECT_UNAUTHORIZED": "<ZOSMF_REJECT_UNAUTHORIZED>",
"ZOSMF_CERT": "<ZOSMF_CERT>",
"ZOSMF_CERT_KEY": "<ZOSMF_CERT_KEY>",
"ZOSMF_TOKEN_FILE": "<ZOSMF_TOKEN_FILE>",
"ZOSMF_USER_ID": "<ZOSMF_USER_ID>",
"ZOSMF_PASSTICKET_APP": "<ZOSMF_PASSTICKET_APP>",
"ZOWE_TEAM_CONFIG": "<ZOWE_TEAM_CONFIG>",
"ZOSMF_PROFILE": "<ZOSMF_PROFILE>",
"LOG_LEVEL": "<LOG_LEVEL>",
"MCP_TRANSPORT": "<MCP_TRANSPORT>",
"MCP_SSE_PORT": "<MCP_SSE_PORT>",
"MAX_JOB_OUTPUT_LINES": "<MAX_JOB_OUTPUT_LINES>",
"MAX_DATASET_READ_LINES": "<MAX_DATASET_READ_LINES>",
"MAX_JES_SPOOL_FILES": "<MAX_JES_SPOOL_FILES>",
"MAX_AUDIT_LINES": "<MAX_AUDIT_LINES>",
"CMCI_CONTEXT": "<CMCI_CONTEXT>",
"CMCI_HOST": "<CMCI_HOST>",
"CMCI_PORT": "<CMCI_PORT>",
"CMCI_BASE_PATH": "<CMCI_BASE_PATH>",
"DB2_LOCATION": "<DB2_LOCATION>",
"DB2_HOST": "<DB2_HOST>",
"DB2_PORT": "<DB2_PORT>",
"DB2_BASE_PATH": "<DB2_BASE_PATH>",
"SMF_SUMMARY_DATASET": "<SMF_SUMMARY_DATASET>",
"RMF_METRICS_ENABLED": "<RMF_METRICS_ENABLED>",
"RACF_AUDIT_USS_PATH": "<RACF_AUDIT_USS_PATH>",
"RACF_AUDIT_DATASET": "<RACF_AUDIT_DATASET>",
"SECURITY_READ_ONLY": "<SECURITY_READ_ONLY>",
"SECURITY_ALLOWED_TOOLS": "<SECURITY_ALLOWED_TOOLS>",
"SECURITY_BLOCKED_TOOLS": "<SECURITY_BLOCKED_TOOLS>",
"SECURITY_ALLOWED_DATASET_PATTERNS": "<SECURITY_ALLOWED_DATASET_PATTERNS>",
"SECURITY_ALLOWED_USS_PATHS": "<SECURITY_ALLOWED_USS_PATHS>",
"SECURITY_AUDIT_LOGGING": "<SECURITY_AUDIT_LOGGING>",
"SECURITY_MAX_JCL_BYTES": "<SECURITY_MAX_JCL_BYTES>",
"SECURITY_WRITE_APPROVAL": "<SECURITY_WRITE_APPROVAL>",
"SECURITY_JCL_SCAN": "<SECURITY_JCL_SCAN>",
"SECURITY_JCL_SCAN_STRICT": "<SECURITY_JCL_SCAN_STRICT>",
"SECURITY_BLOCKED_PROGRAMS": "<SECURITY_BLOCKED_PROGRAMS>",
"SECURITY_BLOCKED_JOB_CLASSES": "<SECURITY_BLOCKED_JOB_CLASSES>",
"SECURITY_CHANGE_TICKET_PATTERN": "<SECURITY_CHANGE_TICKET_PATTERN>",
"SECURITY_WRITE_WINDOW": "<SECURITY_WRITE_WINDOW>",
"SECURITY_WRITE_DAYS": "<SECURITY_WRITE_DAYS>",
"SECURITY_WRITE_WINDOW_TZ": "<SECURITY_WRITE_WINDOW_TZ>"
}
}
}
}
Run commandnpx -y @notharshhaa/mainframe-mcp-server
Environment variables to set
ZOSMF_HOSTz/OSMF hostname or IP address
ZOSMF_PORTz/OSMF HTTPS port (default 443)
ZOSMF_BASE_PATHOptional API gateway or mediation layer prefix for z/OSMF
ZOSMF_USERz/OS user id (required with ZOSMF_PASSWORD unless ZOSMF_TOKEN is set)
ZOSMF_PASSWORDSecretPassword for basic auth (required with ZOSMF_USER unless ZOSMF_TOKEN is set)
ZOSMF_TOKENSecretAuth token (alternative to user/password)
ZOSMF_TOKEN_TYPESecretToken type when using ZOSMF_TOKEN (e.g. LTPA2)
ZOSMF_REJECT_UNAUTHORIZEDSecretVerify TLS certificates (true in production)
ZOSMF_CERTPEM client certificate file path for mTLS auth
ZOSMF_CERT_KEYSecretPEM client key file path for mTLS auth (required with ZOSMF_CERT)
ZOSMF_TOKEN_FILESecretRead ZOSMF_TOKEN from this file at startup (vault/agent injection)
ZOSMF_USER_IDEnd-user id for PassTicket identity propagation (RACF sees this user, not the service account)
ZOSMF_PASSTICKET_APPRACF PTKTDATA application name for PassTicket generation (default ZOSMF)
ZOWE_TEAM_CONFIGPath to a zowe.config.json to import connection settings from (env vars win)
ZOSMF_PROFILEProfile name inside the Zowe team config (defaults to defaults.zosmf)
LOG_LEVELLog level: fatal, error, warn, info, debug, trace, silent
MCP_TRANSPORTTransport: stdio (IDE) or sse (legacy HTTP+SSE for container/network deployments)
MCP_SSE_PORTListen port when MCP_TRANSPORT=sse
MAX_JOB_OUTPUT_LINESMax lines returned from a single spool DD
MAX_DATASET_READ_LINESMax lines returned from dataset or USS reads
MAX_JES_SPOOL_FILESMax spool files fetched during diagnostics
MAX_AUDIT_LINESMax RACF audit log lines per query
CMCI_CONTEXTCICSplex name or region APPLID (required for CICS tools)
CMCI_HOSTCMCI hostname (defaults to ZOSMF_HOST)
CMCI_PORTCMCI HTTPS port (default 1490)
CMCI_BASE_PATHCMCI REST base path
DB2_LOCATIONDb2 subsystem location name (required for Db2 tools)
DB2_HOSTDb2 REST hostname (defaults to ZOSMF_HOST)
DB2_PORTDb2 REST port (default 50400)
DB2_BASE_PATHDb2 REST base path
SMF_SUMMARY_DATASETOptional SMF summary dataset for offline metrics
RMF_METRICS_ENABLEDQuery z/OSMF RMF metrics when available
RACF_AUDIT_USS_PATHUSS path to RACF audit log file
RACF_AUDIT_DATASETSequential dataset containing RACF audit records
SECURITY_READ_ONLYWhen true (default), blocks write tools such as submit_jcl
SECURITY_ALLOWED_TOOLSComma-separated allowlist of MCP tool names
SECURITY_BLOCKED_TOOLSComma-separated blocklist of MCP tool names
SECURITY_ALLOWED_DATASET_PATTERNSComma-separated dataset patterns (e.g. USERDEV.*,SYS1.*)
SECURITY_ALLOWED_USS_PATHSComma-separated USS path prefixes
SECURITY_AUDIT_LOGGINGLog every tool invocation to stderr (SIEM-friendly JSON)
SECURITY_MAX_JCL_BYTESMaximum inline JCL size for submit_jcl
SECURITY_WRITE_APPROVALHuman-in-the-loop: submit_jcl returns a one-time token and approve_write executes (default false)
SECURITY_JCL_SCANPre-flight scan JCL before submission: IDCAMS DELETE, IEFBR14 DISP DELETE, blocked utilities (default true)
SECURITY_JCL_SCAN_STRICTStrict scan mode: WARN findings also block submissions (default false)
SECURITY_BLOCKED_PROGRAMSComma-separated EXEC programs that may never run (extends ADRDSSU,ICKDSF,IEHINITT)
SECURITY_BLOCKED_JOB_CLASSESComma-separated JES job classes that may never be used
SECURITY_CHANGE_TICKET_PATTERNRegex a changeTicket argument must match on writes, e.g. CHG[0-9]{6}
SECURITY_WRITE_WINDOWAllowed write window, 24h HH:MM-HH:MM (overnight ranges allowed), e.g. 08:00-18:00
SECURITY_WRITE_DAYSWeekdays writes are allowed: 0=Sun..6=Sat, e.g. 1-5
SECURITY_WRITE_WINDOW_TZIANA timezone for the write window (default UTC)

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@notharshhaa/mainframe-mcp-server3.0.0

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

The maintainer has not added details yet. Check the README in the repository.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.