home / mcp / ibm i mcp server

IBM i MCP Server

MCP server for IBM i systems

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "ibm-ibmi-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@ibm/ibmi-mcp-server@latest",
        "--transport",
        "http",
        "--tools",
        "./tools/performance/performance.yaml"
      ],
      "env": {
        "DB2i_HOST": "YOUR_IBMI_HOST",
        "DB2i_PASS": "YOUR_IBMI_PASSWORD",
        "DB2i_PORT": "8076",
        "DB2i_USER": "YOUR_IBMI_USER",
        "DB2i_IGNORE_UNAUTHORIZED": "true"
      }
    }
  }
}

You can securely access IBM i Db2 for i data and perform SQL operations from AI agents using the IBM i MCP Server. It enables tools and workflows that let agents monitor system health, query databases, and automate administrative tasks through a WebSocket-friendly, YAML-driven tool framework.

How to use

You drive MCP by starting the server with a defined set of YAML-based SQL tools and then connecting your MCP client or AI agent to the server. Start by ensuring the prerequisite software is running, then load your tool configuration and begin querying Db2 for i. You will be able to list available tools, execute a tool, and receive streamed results that you can interpret within your agent’s workflow.

How to install

Prerequisites you need before installing: Mapepire must be running on your IBM i system and listening on port 8076. You also need Node.js version 18 or newer on the machine where you operate the MCP Server.

Step by step install and run flow you can follow exactly as shown:

1. Clone the MCP server repository and navigate into it.

2. Configure your IBM i connection by creating an environment file with your Db2 for i credentials.

3. Start the MCP Server using the recommended runtime command that loads your pre-defined tools.

4. Verify the server is running by checking health and listing available tools.

5. Connect your MCP client or AI agent, authenticate, and begin issuing tool calls.

Configuration and security notes

Mapepire runs on port 8076 by default. Ensure your IBM i firewall allows inbound connections on this port. For production deployments, enable SSL/TLS and follow security best practices for credential management.

Environmental credentials are defined in a dedicated environment file. Example keys include the host, user, password, port, and an option to ignore unauthorized certificates during initial setup.

Examples and workflows

A practical workflow starts with listing the available tools to confirm what you can run. Then you execute a tool like the system status monitor to retrieve CPU, memory, and active job information. The results stream back to your agent for analysis, reporting, or further automation.

Troubleshooting tips

If you cannot reach the MCP Server, verify that Mapepire is running and listening on port 8076. Double-check the environment configuration values for the IBM i connection. Inspect your firewall rules to ensure inbound access. Review the logs produced by the MCP Server for clues about authentication or tool loading failures.

Notes

This MCP Server guide emphasizes practical steps to get you up and running quickly with YAML-defined SQL tools and a straightforward startup command. Keep your tool definitions organized in the tools directory to manage system monitoring, security events, job management, and database queries.

Available tools

system_status

Overall system status with CPU, memory, and I/O metrics

IBM i MCP Server - ibm/ibmi-mcp-server