ibmi-mcp-server
Enables AI agents to interact with IBM i (AS/400) systems for RPA automation via 37 tools for 5250 navigation, CL commands, DB2 queries, and system management.
README
IBM i (AS/400) MCP Server
AI agent automation for IBM i — 5250 terminal, SSH/CL commands, and DB2 SQL via ODBC.
Quick Start
1. Install uv (one-time)
pip install uv
# or: winget install astral-sh.uv
2. Add MCP config to Amazon Quick
Go to Settings → Capabilities → Connections and add:
{
"name": "IBM i (AS/400)",
"description": "Connect to IBM i for RPA automation — 5250 terminal, SSH commands, and DB2 SQL",
"command": "uv",
"args": ["run", "N:\\Quick\\ibmi_mcp_server\\server.py"],
"env": {
"IBMI_HOST": "your-ibmi-hostname",
"IBMI_USER": "YOUR_USER",
"IBMI_PASSWORD": "YOUR_PASSWORD",
"IBMI_COMMAND_BLOCKLIST": "PWRDWNSYS,DLTLIB,RSTLIB,INZSYS"
}
}
3. Done!
Start chatting with the IBM i RPA Operator agent. It will connect to your system automatically.
How It Works
- Zero setup —
uvresolves all dependencies automatically from inline PEP 723 metadata - Three transports: 5250 terminal (green screen navigation), SSH (CL commands), ODBC (SQL queries)
- Safety built-in: dangerous commands (PWRDWNSYS, DLTLIB, etc.) are blocked by default
Transport Selection
| Scenario | Transport |
|---|---|
| Navigate interactive menus / F-keys | 5250 Terminal |
| Run CL commands (WRKACTJOB, DSPLIB) | SSH |
| Query/update DB2 tables | ODBC |
| Access IBM i Services (QSYS2) | ODBC |
| Call RPG/COBOL programs | ODBC (QCMDEXC) |
Environment Variables
| Variable | Required | Description |
|---|---|---|
IBMI_HOST |
Yes | IBM i hostname or IP |
IBMI_USER |
Yes | User profile |
IBMI_PASSWORD |
Yes | Password |
IBMI_PORT |
No | 5250 port (default: 23) |
IBMI_SSH_PORT |
No | SSH port (default: 22) |
IBMI_USE_SSL |
No | Use SSL for 5250 (default: false) |
IBMI_ODBC_DRIVER |
No | ODBC driver name (default: iSeries Access ODBC Driver) |
IBMI_COMMAND_BLOCKLIST |
No | Comma-separated blocked CL commands |
Prerequisites on IBM i
- SSH: SSHD running (
STRTCPSVR *SSHD) - 5250: Port 23 (or 992 for TLS) accessible
- ODBC: Host server jobs active (
STRHOSTSVR *ALL) + IBM i Access ODBC Driver installed locally
Local Testing (Optional)
A mock server (mock_as400_server.py) is included for offline testing only:
python mock_as400_server.py --port 2323
This simulates basic 5250 sign-on, CL commands, and includes Thai text test data. Not needed for production use.
Security Best Practices
- Use a dedicated user profile with minimal authority
- Set
IBMI_COMMAND_BLOCKLISTfor destructive commands - Enable audit journaling (QAUDJRN) on the IBM i
- Use SSL/TLS when possible
- Never store credentials in code — use environment variables
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.