Skip to main content
Glama
thirrukumar

zRobot WSAPI MCP Server

by thirrukumar
README.md
# zRobot WSAPI MCP Server

MCP server for IBM Z Hardware Management Console (HMC) Web Services API integration with Bob AI.

## Features

- **list_systems**: List all configured HMC systems
- **list_partitions**: List all partitions on a CPC/system
- **get_partition**: Get detailed information for a partition
- **create_partition**: Create a new partition
- **update_partition**: Update partition properties
- **delete_partition**: Delete a partition
- **start_partition**: Start a partition
- **stop_partition**: Stop a partition
- **get_api_version**: Get HMC API version information

## Repository Structure

```text
zrobot-wsapi-mcp/
├── .gitignore
├── package.json
├── README.md
├── examples/
│   ├── mcp_settings.json.example
│   └── settings.json.example
├── config/
│   └── systems.yaml.example
├── lib/
│   ├── partition_manager.py
│   └── wsapi_client.py
└── src/
    └── server.py
```

## Installation

This repository packages the WSAPI MCP server into a standalone repo similar to [`jupitr-custom-mcp-server`](jupitr-custom-mcp-server/).

### Python dependencies

Install the required Python packages in your environment:

```bash
pip install mcp requests pyyaml
```

## Configuration

1. Create an MCP folder in your IBM Bob main directory.

2. Create a folder for this repo, for example:

```text
/Users/your-user/Documents/IBM Bob/MCP/zrobot-wsapi-mcp
```

3. Clone or copy this repository into that folder.

4. Copy [`config/systems.yaml.example`](zrobot-wsapi-mcp/config/systems.yaml.example) to `config/systems.yaml` and fill in your HMC details.

The server is configured in **two** locations that should point to the same [`src/server.py`](zrobot-wsapi-mcp/src/server.py) file.

### 1. Bob MCP Settings
File: `~/.bob/settings/mcp_settings.json`

```json
"zrobot-wsapi-mcp": {
  "command": "python",
  "args": ["/Your IBM Bob Main Directory/MCP/zrobot-wsapi-mcp/src/server.py"],
  "env": {}
}
```

### 2. VS Code User Settings
File: `~/Library/Application Support/Code/User/settings.json`

```json
"roo-cline.mcpServers": {
  "zrobot-wsapi-mcp": {
    "command": "python",
    "args": ["/Your IBM Bob Main Directory/MCP/zrobot-wsapi-mcp/src/server.py"],
    "env": {}
  }
}
```

## Systems Configuration

Create `config/systems.yaml` from the example file:

```yaml
systems:
  a248_dpm:
    addr: "9.56.193.224"
    user: "pemode"
    password: "your_password"
    cpc: "A248"
    description: "CEC A248 DPM via HMC"
```

## Usage

Once configured in Bob, you can use prompts like:

- `List all available HMC systems`
- `List all partitions on a248_dpm`
- `Show me details for partition bob1 on a248_dpm`
- `Create a Linux partition named bob2 on a248_dpm with 4096 MB initial memory and 8192 MB maximum memory`
- `Start partition bob2 on a248_dpm`
- `Stop partition bob2 on a248_dpm`
- `What is the API version for a248_dpm?`

## Notes

- Credentials are stored locally in `config/systems.yaml`
- HTTPS is used for HMC communication on port `6794`
- SSL verification is disabled in the current client for test environments
- The repo intentionally mirrors the lightweight standalone style of [`jupitr-custom-mcp-server`](jupitr-custom-mcp-server/)

## License

MIT