Bridging IBM i and Modern AI: Securing the Enterprise Stack with IBM i MCP Server and ContextForge
Almost a year ago, IBM released the IBM i MCP (Model Context Protocol) Server. This powerful addition to the ecosystem fundamentally changes how we interact with fundamental business data by turning your existing SQL expertise directly into AI-actionable tools.
Instead of writing complex integration layers, the IBM i MCP Server provides a zero-code bridge:
● SQL to AI Tools: Simply define your Db2 for i SQL queries in basic YAML configuration files, and they are automatically exposed as structured tools to AI models.
● Zero Custom Code: No TypeScript, no Java, and no custom REST APIs are required. If you can write SQL, you can build an AI tool.
● Secure by Default: The solution natively respects IBM i authorities, utilizes parameter binding to prevent SQL injection, and generates robust audit trails.
● Universal Protocol compatibility: It integrates seamlessly with over 10 leading AI clients and IDEs, including Claude Desktop, Claude Code, VS Code, Cursor, and Goose.

Example: A simple, 10-line YAML file executing a system status query (like checking system ASP or active jobs) instantly becomes a functional tool that AI agents can dynamically discover, execute, and format for the user.
For more details, check out the IBM i MCP Server Documentation.
Smart Infrastructure: Deploying on a Linux LPAR (ppc64le)
While the MCP server can be installed directly inside the IBM i environment, deploying it as a containerized workload on a Linux on Power LPAR (ppc64le) keeps your architecture clean, highly performant, and secure.
Deploying the container on a Linux LPAR provides several distinct architectural advantages:
1. Strict Resource Isolation: AI client requests and runtime traffic are handled entirely on the Linux LPAR, consuming zero CPU or memory overhead on your production IBM i instances.
2. Simplified Dependency Management: You avoid managing Node.js packages, updates, or open-source dependencies directly inside the native IBM i PASE environment.
3. Centralized Multi-LPAR Management: A single containerized MCP server instance can easily communicate with and manage multiple IBM i partitions across your network.
4. Enhanced Security Boundary: AI clients only connect to the Linux LPAR. Your primary IBM i databases remain isolated from direct external exposure.
For this deployment, I utilized the official image: ghcr.io/ibm/ibmi-mcp-server:v1.0.2.
The Secret Sauce: ContextForge AI Gateway
In an enterprise environment, you cannot simply expose every database tool to every AI client without guardrails. To achieve strict access governance, rate limiting, and real-time monitoring, you need a robust control plane.
This is where the ContextForge AI Gateway (an innovative IBM open-source project) enters the picture.

By positioning ContextForge between your AI clients and the IBM i MCP server, you gain complete administrative control. You can precisely manage which users or agents have access to specific SQL tools, enforce rate limits to protect backend system performance, and audit every AI-driven database query in real-time.
For deployment details, review the ContextForge AI Gateway.
For this deployment, I utilized the official image: ghcr.io/ibm/mcp-context-forge:v1.0.4

Our Enterprise Container Architecture
The diagram below outlines the complete containerized infrastructure deployed to support this secure, high-availability architecture:


Architectural Flow:
1. The Entry Point: AI clients and administrators connect directly to the ContextForge MCP Gateway (running on port :4444).
2. The Control Plane: ContextForge utilizes a PostgreSQL database to store metadata/configurations and Valkey (an open-source Redis alternative) to manage session state and caching.
3. The Logic Engine: ContextForge securely routes validated requests to the IBM i MCP Server (running on port :3010), which reads the YAML-defined SQL tool definitions.
4. The Database Connection: The MCP server handles high-performance SQL execution against the backend Db2 for i partitions (QSYS2 and user schemas) via secure Mapepire database connectors (port :8076).
Conclusion
The IBM i MCP Server represents a massive leap forward in integrating reliable, modern IBM i systems with cutting-edge generative AI. By combining this capability with the enterprise-grade governance of the ContextForge AI Gateway, infrastructure teams can confidently deliver secure, scalable, and audit-compliant AI tooling to the modern enterprise.