zowe-mcp
v0.1.3
Published
MCP server for Zowe CLI - enabling AI-powered mainframe operations
Maintainers
Readme
Zowe MCP Server
An MCP (Model Context Protocol) server that wraps Zowe CLI, enabling AI assistants like Claude to interact with z/OS mainframes through natural language.
What This Does
Instead of learning dozens of Zowe CLI commands, developers can ask an AI assistant questions like:
- "Show me what datasets I have access to"
- "Why did the payroll job fail last night?"
- "Show me the COBOL source for the payroll program"
- "Help me understand this COBOL application"
The MCP server translates these into the right Zowe CLI calls and returns results the AI can explain in plain English.
Architecture
User <-> AI Assistant <-> MCP Protocol <-> This Server <-> Zowe CLI <-> z/OSFeatures
- 19 Tools for interacting with z/OS (datasets, jobs, targeted JES spool extraction, uploads, TSO, console commands, async polling)
- 5 Pre-built Prompts for common workflows (onboarding, diagnostics, code review)
- 5 Reference Resources for z/OS concepts (JCL, COBOL, ABEND codes)
- Safety Guardrails that block destructive commands (DELETE, CANCEL, PURGE)
- Mock Mode for demos and development without a live mainframe
- Automatic Error Analysis that explains ABEND codes and return codes
Quick Start
To develop and customize this MCP view Development Instructions
To learn the full command reference for this MCP view MCP Reference
To run the end-to-end VSAM guided demo Demo Workflow
1) Install and Build
bun install
bun run build2) Zowe Setup
Use these commands once on the machine running this MCP server:
zowe config auto-init --host "Z.SERVER.IP.OR.HOST"
# Enter port (default is 10443 for Liberty Server)
# Enter username and password
# After config is saved, make sure your ~/.zowe/zowe.config.json and selected profile is setup properly
# If using APIML Auth Gateway
zowe auth login apiml
# Verify you can connect to your Z Machine
zowe zosmf check status --rfj
# Optional, but recommended if your TSO profile requires account:
# zowe profiles create tso mytso --account ACCT001
# You can get your account number via `tsocmd "LISTUSER MY_USER_ID TSO NORACF"`If zowe zosmf check status --rfj fails, fix auth/profile first before starting this server.
3) Configure Your MCP Client
For Claude Desktop, use config/mcp.json as your template and copy the zowe-mcp-server entry into:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
For other MCP clients that accept JSON MCP server definitions, use the same config/mcp.json.
Codex using .toml configs which can be seen in config/codex.toml
Both templates are preconfigured to launch from npm with:
command:npxargs:["-y", "@gestell/zowe-mcp"]
Example Conversations
Exploring Datasets
User: Use the zowe-mcp-server tool and show me what datasets I have under DEVUSR1
AI: Uses zowe_list_datasets - I found 8 datasets under DEVUSR1. You have COBOL source libraries, JCL, copybooks, and data files...
Diagnosing a Job Failure
User: Use the zowe-mcp-server tool and look at job JOB00245 failed. Can you tell me why?
AI: Uses zowe_get_job_status and zowe_get_job_output - This job failed with ABEND S0C7, which is a Data Exception. This typically means a packed decimal field contains invalid data. Looking at the spool output, I see the error occurred in STEP020...
Code Understanding
User: Use the zowe-mcp-server tool and help me understand the PAYROLL program
AI: Uses zowe_read_dataset - This COBOL program processes payroll data. It reads an indexed employee master file and calculates weekly pay including tax deductions. Let me walk you through the main sections...
License
MIT
