Skip to main content
A production-ready Model Context Protocol (MCP) server for IBM i. alt text

What is This?

The IBM i MCP Server transforms your IBM i SQL expertise into AI-accessible tools:
  • SQL → AI Tools: Write SQL in YAML files, get AI-ready tools automatically
  • Zero Code: No TypeScript, no REST APIs—just SQL you already know
  • Secure by Default: IBM i authorities, parameter binding, audit trails built-in
  • Universal Protocol: Works with 10+ AI clients (Claude Desktop, VSCode, Cursor, etc.)
Example: A 10-line YAML file defining a “system status” query becomes a tool that AI agents can discover, understand, and execute—with built-in validation and formatting.

Quick Start Path

1

Understand MCP (5 minutes)

New to the Model Context Protocol? Read What is MCP? to understand how AI agents connect to IBM i.Already familiar? Skip to Step 2.
2

Install Mapepire

Install Mapepire on your IBM i system—the database connectivity layer required for MCP.Already installed? Verify it’s running and note the port (default: 8076).
3

Quick Start (15 minutes)

Follow the Quick Start Guide to install the server, configure your connection, and execute your first tool.Result: A working MCP server connected to your IBM i system.
4

Connect a Client

Choose an AI client and connect it to your server:
Time to First Query: Following this path takes 30-40 minutes from start to your first successful AI-powered IBM i query.

Choose Your Path

Different goals? Jump directly to what you need:

Core Features

Zero-Code SQL Tools

Create database operations in minutesDefine tools using simple YAML—no TypeScript or programming required. Built-in parameter validation, SQL injection prevention, and result formatting.Learn SQL Tools →

Enterprise Security

IBM i security integrationRespects user profiles, object authorities, and audit requirements. Multiple auth modes including IBM i HTTP authentication with RSA encryption.See Configuration →

Multiple AI Clients

Works with your toolsConnect Claude Desktop, VSCode, Cursor, Gemini CLI, Cline, and more. Supports both stdio (development) and HTTP (production) transports.View Clients →

Production Ready

Built for enterprise IBM iOpenTelemetry observability, structured logging, connection pooling, error handling, and comprehensive audit trails.Review Architecture →

Key Concepts

MCP is an open standard that enables AI agents to securely access and interact with your data through a universal interface. Instead of building custom integrations for each AI tool, MCP provides a standardized way for any MCP-compatible agent to access your IBM i systems.Key Benefits:
  • 🔒 Secure, controlled access to enterprise data
  • 🔌 Universal protocol understood by all MCP clients
  • 🛡️ Preserves IBM i security and audit requirements
  • ⚡ Real-time data access without ETL or data exports
Read the full MCP overview →
The IBM i MCP Server’s core innovation is transforming SQL queries into MCP tools that AI agents can discover and use. This approach is ideal for IBM i because:
  • Zero Code Required: Define tools in YAML files
  • IBM i Native: Direct access to DB2, QSYS2 services, stored procedures
  • Security Built-In: Parameter binding prevents SQL injection automatically
  • Rapid Development: Create new tools in minutes
Example: A simple SQL query becomes a discoverable, validated, secure tool that AI agents can call naturally.Learn about SQL Tools →
The server supports multiple authentication modes to fit your deployment:For Development:
  • Shared credentials (stdio): All operations use same Db2i user
  • Fast setup for testing and local development
For Production:
  • Per-user authentication (HTTP): Each user connects with their own credentials
  • IBM i HTTP Auth: RSA-encrypted credential exchange
  • JWT/OAuth: Custom authentication systems
All modes respect IBM i object authorities and maintain audit trails.See authentication setup →
The server enables AI agents to perform any database operation you configure:Common Use Cases:
  • 📊 System monitoring and performance analysis
  • 🔍 Business data queries and reporting
  • 🔐 Security audits and compliance checks
  • 📦 Inventory and resource management
  • 🧪 Development and debugging tools
Example Agents:
  • Performance monitoring agent tracking CPU, memory, jobs
  • Discovery agent analyzing schemas and dependencies
  • Business intelligence agent answering data questions
  • System administration agent managing resources
Explore agent examples →

Common Questions

The server works with any IBM i version that supports:
  • DB2 for i (Db2 for IBM i)
  • QSYS2 system services
  • Mapepire server for WebSocket connectivity
Tested on IBM i 7.3+, but should work on older versions with proper DB2 support.
No! The SQL Tools system uses simple YAML configuration files. You only need SQL knowledge to create database operations.TypeScript is only required if you want to create custom tool types beyond SQL operations.
MCP Advantages:
  • AI agents discover tools automatically (no hardcoded endpoints)
  • Built-in validation and security patterns
  • Universal protocol works with any MCP client
  • Structured responses optimized for AI consumption
REST APIs require:
  • Custom integration code for each AI tool
  • Manual endpoint documentation
  • Custom authentication per client
  • Response parsing and adaptation
Yes! The server includes production-ready features:
  • OpenTelemetry observability
  • Comprehensive audit logging
  • Connection pooling
  • Error handling and categorization
  • Rate limiting and resource protection
  • Multi-environment configuration
Use HTTP transport with IBM i authentication for production deployments.
Resources:

Ready to Start?

More Resources


About This Project: The IBM i MCP Server is an open-source project that brings modern AI agent capabilities to IBM i environments while maintaining enterprise security and operational standards. Contributions and feedback are welcome on GitHub.