ibmi-mcp-serverのロゴ

ibmi-mcp-server

組織
IBM

MCP server for IBM i systems

公開者IBM
リポジトリibmi-mcp-server
言語TypeScript
フォーク
36
スター
81
利用可能なツール
0
通信方式stdio, streamable-http
カテゴリ
ライセンスApache-2.0
リンク
  • ツールをAIワークフローに接続

    ibmi-mcp-serverは、対応するAIクライアントやAIエージェントから利用できるMCP機能を提供します。

  • 0個の利用可能なツール

    呼び出し可能なアクションを以下で確認できます。サーバーから提供されている場合は、名前や説明も表示されます。

  • コピーして使える設定

    セットアップ用の設定例を使って、お好みのMCPクライアントにこのサーバーを設定できます。

  • オープンソースの注目度

    リンク先のリポジトリには81件のスターと36件のフォークがあります。

alt text

TypeScript Model Context Protocol SDK MCP Spec Version License Status Ask DeepWiki NPM Version

MCP server and CLI for IBM i


Overview

The IBM i MCP Server enables AI agents to interact with IBM i systems through the Model Context Protocol (MCP). It provides secure, SQL-based access to Db2 for i databases, allowing AI applications like Claude, VSCode Copilot, Bob, and custom agents to query system information, monitor performance, and execute database operations.

This repo also ships the ibmi CLI (@ibm/ibmi-cli) — a terminal-first sibling that shares the same YAML-driven SQL tool engine, so the same tool definitions work in both the MCP server and the CLI.

MCP Architecture

How it works: AI clients connect via MCP → Server executes YAML-defined SQL tools → Results stream back to the AI agent through Mapepire.

[!TIP] 📚 Official Documentation | ⚠️ Docs are under active development

The Docs are continuously evolving. Please check back frequently for updates and new guides. If there's something missing, feel free to open an issue!

Repository Structure

DirectoryPurposeDocumentation
packages/server/MCP server implementation (TypeScript) — @ibm/ibmi-mcp-server on npmServer README
packages/cli/ibmi command-line interface — @ibm/ibmi-cli on npm, co-versioned with the serverCLI README
tools/YAML-based SQL tool configurationsTools Guide
agents/AI agent examples and integrationsAgents Guide
client/Python client examples for testingClient README
deployment/Docker, Podman, OpenShift configsDeployment Guide
app/Example Full stack Agent app (AgentOS)App README

Quick Navigation


MCP Server

The MCP Server enables AI agents to execute SQL queries on IBM i systems through YAML-defined SQL tools.

Quick Start

Prerequisites:

  • Mapepire running on IBM i (port 8076)
  • Node.js 18+ installed

Get Started:

  1. Clone the repository:

    bash
    git clone https://github.com/IBM/ibmi-mcp-server.git
    cd ibmi-mcp-server
  2. Configure your IBM i connection:

    bash
    cat > .env << 'EOF'
    DB2i_HOST=your-ibmi-host.com
    DB2i_USER=your-username
    DB2i_PASS=your-password
    DB2i_PORT=8076
    DB2i_IGNORE_UNAUTHORIZED=true
    EOF
  3. Start the server:

    bash
    npx -y @ibm/ibmi-mcp-server@latest \
       --transport http \
       --tools ./tools/performance/performance.yaml

    The server will use our pre-configured tools for:

    • 📊 Performance monitoring (system status, memory pools, active jobs)
    • See the Tools Guide for more toolsets.

    The MCP server can also run in a Docker container:

    bash
    docker run --rm --name ibmi-mcp-server \
      -v /path/to/tools/:/tools \
      -v /path/to/.env/:/.env \
      -e MCP_SERVER_CONFIG=/.env \
      -p 3010:3010 ghcr.io/ibm/ibmi-mcp-server:latest

    Replace the volume paths with your actual local paths to the tools directory and .env file.

  4. Verify it's running:

    bash
    # Check server health
    curl http://localhost:3010/healthz
    
    # List available tools
    curl -X POST http://localhost:3010/mcp \
      -H "Content-Type: application/json" \
      -H "Accept: application/json, text/event-stream" \
      -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | \
      grep -o '"name":"[^"]*"' | sed 's/"name":"//g' | sed 's/"//g' | head -20

[!NOTE] 📖 Full Server Quickstart →

Next Steps:

Additional links:


IBM i CLI

A terminal-first sibling to the MCP server. The ibmi command shares the same YAML-driven SQL tool engine and is designed for local exploration, ad-hoc queries, scripted automation, and CI/CD — no MCP client required.

Quick Start

bash
# Install
npm i -g @ibm/ibmi-cli

# Run a query
ibmi sql "SELECT * FROM SAMPLE.EMPLOYEE FETCH FIRST 5 ROWS ONLY"

# Run a YAML-defined tool
ibmi tool system_status --tools ./tools/work-management.yaml

When to use the CLI vs. the MCP Server

Both tools sit on top of the same YAML tool engine. The MCP Server is the de facto interface for building AI agents and multi-client AI workloads. The CLI covers everything else — and also serves as a lightweight, process-local alternative when a full MCP server is overkill.

Use the CLI when…Use the MCP Server when…
You need developer ergonomics — an interactive terminal experience for querying Db2 for i, exploring schemas, scripting in shell/CI, or piping results into other toolsYou are building AI agents or AI-powered applications that should call IBM i tools conversationally (Claude Desktop, VSCode Copilot, Bob, Agno, LangChain, custom agents)
You are running a local AI agent and want the CLI as a lightweight, in-process alternative to a long-lived MCP server — e.g., a coding agent that shells out to ibmi sql or ibmi tool as part of its loopYou need remote server support over the MCP protocol, including stdio or HTTP transports
You want fast synchronous execution against one or many systems with rich output formats (table, json, csv, markdown, NDJSON) and no server process to manageYou need shared, networked access with auth, rate limiting, structured telemetry, and session handling

See the CLI Agent Integration guide for concrete examples of wiring the ibmi CLI into local AI agents.

[!NOTE] 📖 Full Documentation: CLI Guide →

Additional links:


SQL Tools

YAML-based SQL tool configurations that define what queries AI agents can execute on your IBM i system.

Quick Start

Create a custom tool file tools/my-tools.yaml:

yaml
sources:
  my-system:
    host: ${DB2i_HOST}
    user: ${DB2i_USER}
    password: ${DB2i_PASS}
    port: 8076
    ignore-unauthorized: true

tools:
  system_status:
    source: ibmi-system
    description: "Overall system performance statistics with CPU, memory, and I/O metrics"
    parameters: []
    statement: |
      SELECT * FROM TABLE(QSYS2.SYSTEM_STATUS(RESET_STATISTICS=>'YES',DETAILED_INFO=>'ALL')) X

toolsets:
  performance:
    tools:
      - system_status

Run the server with your tools:

bash
npx -y @ibm/ibmi-mcp-server@latest --tools ./tools/my-tools.yaml --transport http

Available Tool Collections

The tools/ directory includes ready-to-use configurations:

  • Performance Monitoring - System status, active jobs, CPU/memory metrics
  • Security & Audit - User profiles, authorities, security events
  • Job Management - Active jobs, job queues, subsystems
  • Storage & IFS - Disk usage, IFS objects, save files
  • Database - Tables, indexes, constraints, statistics

[!NOTE] 📖 Full Documentation: Tools Guide →

Additional links:


AI Agents

Pre-built AI agent examples using popular frameworks to interact with IBM i systems through the MCP Server.

Available Agent Frameworks

FrameworkLanguageUse CaseDocumentation
AgnoPythonProduction-ready agents with built-in observabilityAgno README
LangChainPythonComplex workflows and tool chainingLangChain README
Google ADKPythonGoogle AI ecosystem integrationGoogle ADK README

What Agents Can Do

  • System Monitoring: Real-time performance analysis and health checks
  • Troubleshooting: Diagnose issues using natural language queries
  • Reporting: Generate system reports and insights
  • Automation: Execute administrative tasks through conversation

[!NOTE] 📖 Full Documentation: Agents Guide →

Additional links:


Python Clients

Simple Python client examples for testing and interacting with the MCP Server.

python
import asyncio
from mcp import ClientSession
from mcp.client.streamable_http import streamablehttp_client

async def main():
    # Connect to the IBM i MCP server with authentication
    async with streamablehttp_client("http://localhost:3010/mcp") as (
        read_stream,
        write_stream,
        _,
    ):
        # Create a session using the authenticated streams
        async with ClientSession(read_stream, write_stream) as session:
            # Initialize the connection
            await session.initialize()

            # List available tools (now authenticated with your IBM i credentials)
            tools = await session.list_tools()
            for i, tool in enumerate(tools.tools, 1):
                print(f"{i:2d}. {tool.name}")
                print(f"    └─ {tool.description}")

            # Execute a tool with authenticated IBM i access
            print("\n" + "=" * 80)
            print("SYSTEM ACTIVITY RESULT")
            print("=" * 80)
            result = await session.call_tool("system_activity", {})

            print(result)


if __name__ == "__main__":
    asyncio.run(main())

[!NOTE] 📖 Full Documentation: Client README →

Additional links:


Deployment

Production-ready deployment configurations for containerized environments.

Deployment Options

  • Docker & Podman - Complete stack with MCP Context Forge Gateway
  • OpenShift - Kubernetes deployment with S2I builds
  • Production Features - HTTPS, authentication, monitoring, caching

[!NOTE] 📖 Full Documentation: Deployment Guide →


Setup Mapepire

Before you can use the ibmi-mcp-server, you must install and configure Mapepire on your IBM i system.

What is Mapepire?

Mapepire is a modern, high-performance database server for IBM i that provides SQL query execution capabilities over WebSocket connections. It acts as a gateway between modern application architectures (like MCP servers, AI agents, and REST APIs) and IBM i's Db2 for i database.

Why Mapepire Enables AI and MCP Workloads

Traditional IBM i database access methods (ODBC, JDBC) don't align well with modern AI and MCP architectures that require:

  • Fast, lightweight connections: AI agents make frequent, short-lived database queries
  • WebSocket support: Enables real-time, bidirectional communication for streaming results
  • Modern JSON-based protocols: Simplifies integration with TypeScript/JavaScript ecosystems
  • Low-latency responses: Essential for interactive AI conversations and tool executions

Mapepire bridges this gap by providing a modern, WebSocket-based SQL query interface that's optimized for the request/response patterns of AI agents and MCP tools.

Installation

Quick Install (IBM i SSH Session):

bash
# 1. Install Mapepire using yum
yum install mapepire-server

# 2. Install Service Commander (if not already installed)
yum install service-commander

# 3. Start Mapepire service
sc start mapepire

[!NOTE] 📚 Full Documentation: Mapepire System Administrator Guide →

[!IMPORTANT] Important Notes:

  • By default, Mapepire runs on port 8076. You'll need this port number when configuring the DB2i_PORT variable in your .env file.
  • Ensure your IBM i firewall allows inbound connections on port 8076
  • For production deployments, configure SSL/TLS certificates (see official guide)


License

This project is licensed under the Apache License 2.0. See the LICENSE file for details.

インストール

TypingMind
前提条件:

Node.js 18+

{
  "mcpServers": {
    "ibm-ibmi-mcp-server": {
      "command": "",
      "args": []
    }
  }
}

ibmi-mcp-serverのMCPを複数のAIモデルで活用

TypingMindはワークスペース単位でMCPツールに接続します。そのため、一度ibmi-mcp-serverに接続すれば、モデルごとに個別に設定することなく、TypingMind内のさまざまなAIモデルで利用できます。 お使いのデバイス上でMCPをローカル実行することも、リモートMCPサーバーのURLに接続することもできます。

方法1:ローカルコネクタを使用

MCPサーバーが、お使いのコンピューター上のローカルファイル、アプリ、非公開リソースにアクセスする必要がある場合は、この方法を使います。

1

MCP設定を開く

TypingMindで「設定」、「詳細設定」、「MCP」の順に進み、「コネクタを設定」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 設定アイコンをクリックしてください。
  3. 「詳細設定」に移動してください。
  4. 「MCP」セクションを開いてください。
  5. 「コネクタを設定」をクリックし、「このデバイス」を選択してください。
「このデバイス」が選択されたTypingMindのMCPコネクタ設定画面
2

コネクタのコマンドを実行

「このデバイス」を選択し、TypingMindからコマンドをコピーしてターミナルで実行してください。MCPの使用中は、プロセスを実行したままにしてください。

  1. TypingMindに表示されるセットアップコマンドをコピーしてください。
  2. macOSではターミナルを、WindowsではWindows Terminalを開いてください。
  3. コマンドを貼り付けて実行してください。
  4. ターミナルで続行の確認を求められた場合は、パッケージのインストールを承認してください。
  5. MCPツールの使用中は、ターミナルウィンドウを開いたまま、プロセスの実行を継続してください。
3

ibmi-mcp-serverをサーバーとして追加

コネクタのステータスが「準備完了」になったら、「サーバーを編集」をクリックし、MCPサーバーの設定を貼り付けてください。

  1. コネクタのステータスが「準備完了」になるまでお待ちください。
  2. 「サーバーを編集」をクリックしてください。
  3. ibmi-mcp-serverのMCPサーバー設定を貼り付けてください。
  4. サーバー一覧を保存してください。
  5. コネクタが引き続き使用可能か確認するには、更新してください。
稼働中のサーバーと「サーバーを編集」ボタンが表示されたTypingMindのMCP設定画面
{
  "mcpServers": {
    "ibm-ibmi-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "ibmi-mcp-monorepo"
      ]
    }
  }
}
4

複数のモデルで同じ接続を使用

サーバー一覧を保存し、「プラグイン」を開いてibmi-mcp-serverのMCPツールを有効にしてください。その後、TypingMindで対応するAIモデルを選択し、チャットでツールを使うか、AIエージェントに割り当ててください。

  1. TypingMindの「プラグイン」ページを開いてください。
  2. ibmi-mcp-serverのMCPツールを有効にしてください。
  3. チャットを開始し、使用するAIモデルを選択してください。
  4. MCPツールをチャットで使うか、AIエージェントに割り当ててください。
  5. MCPに再接続することなく、必要に応じて別のAIモデルに切り替えられます。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
ibmi-mcp-serverを使ってこのタスクを手伝ってもらえますか?
ibmi-mcp-server
はい、読みました。
ibmi-mcp-serverで調べた結果をお伝えします。

方法2:MCPサーバーのURLを追加

ibmi-mcp-serverがすでにリモートでホストされている場合や、チームの複数のユーザーで1つのコネクタを共有したい場合は、この方法を使います。

1

MCPコネクタを開く

TypingMindで「プラグイン」に移動し、「MCPコネクタ」を開いて「URLを追加」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 「プラグイン」に移動してください。
  3. 「MCPコネクタ」を開いてください。
  4. 「URLを追加」をクリックします。
TypingMindの「カスタムMCPサーバーURLを追加」フォーム
2

サーバーURLを貼り付け

「サーバーURL」欄にお使いのサーバーURLを入力してください。サーバーで必要とされる場合は、接続名、説明、アイコン、カスタムHTTPヘッダー、OAuthクライアント設定を追加してください。

  1. 「サーバーURL」欄にお使いのサーバーURLを貼り付けてください。
  2. ibmi-mcp-serverの接続名を入力してください。
  3. 接続を識別しやすくするには、説明とアイコンを追加してください。
  4. サーバーで認証が必要な場合は、カスタムHTTPヘッダーまたはOAuthクライアントの詳細情報を追加してください。
3

接続を作成

「接続を作成」をクリックし、プラグイン一覧に戻って、新しいMCP接続が有効になっていることを確認してください。

  1. 「接続を作成」をクリックします。
  2. MCPコネクタの一覧に戻ってください。
  3. ibmi-mcp-serverの接続が「有効」と表示されていることを確認してください。
  4. 接続がすぐに表示されない場合は、プラグイン一覧を更新してください。
4

再接続せずにモデルを切り替え

お好みのモデルでチャットを開始し、「プラグイン」でibmi-mcp-serverのツールを有効にしてください。必要に応じて別のモデルに切り替えられます。MCP接続は、TypingMindのワークスペースで引き続き利用できます。

  1. TypingMindで新しいチャットを開始してください。
  2. 使用するAIモデルを選択してください。
  3. 「プラグイン」でibmi-mcp-serverのツールを有効にしてください。
  4. 必要に応じて、ツールを使うようモデルに依頼してください。
  5. 別のAIモデルに切り替えて、同じMCP接続を再利用してください。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
ibmi-mcp-serverを使ってこのタスクを手伝ってもらえますか?
ibmi-mcp-server
はい、読みました。
ibmi-mcp-serverで調べた結果をお伝えします。

よくある質問

ibmi-mcp-server MCPサーバーは何に使いますか?

ibmi-mcp-serverは、対応するAIクライアントを外部ツールやコンテキストに接続するためのMCPサーバーです。TypingMindでは、このMCPサーバーを一度追加するだけで、AIワークスペース内でそのツールを利用できるようになります。

TypingMindでibmi-mcp-server MCPを複数のAIモデルと併用できますか?

はい。TypingMindはワークスペース単位でMCPツールに接続するため、モデルごとにMCPサーバーを設定する必要はありません。Claude、ChatGPT、Geminiや、TypingMindで設定したその他のAIモデルでibmi-mcp-serverを利用できます。

TypingMindでibmi-mcp-server MCPを使うメリットは何ですか?

TypingMindは、複数のAIモデル、プロンプト、プラグイン、AIエージェント、APIキー、MCPツールを1つのワークスペースにまとめられる、LLMチャット向けの優れたフロントエンドです。ibmi-mcp-serverを接続すると、TypingMindでチャットのワークフローを整理しながら、お好みのモデルでそのMCPツールを利用できます。

ibmi-mcp-server MCPをTypingMindに接続するにはどうすればよいですか?

ibmi-mcp-serverは、ローカルMCPコネクタを使うか、リモートMCPサーバーのURLを追加することでTypingMindに接続できます。サーバーがデバイス上のファイル、アプリ、プライベートリソースにアクセスする必要がある場合はローカルコネクタを、MCPサーバーがリモートでホストされている場合はサーバーURLを使用してください。

TypingMindでibmi-mcp-server MCPのどのようなツールを利用できますか?

ibmi-mcp-serverはMCP機能を提供しています。TypingMindのプラグインページで有効にすると、チャットで使用したり、AIエージェントに割り当てたりできます。

ibmi-mcp-server MCPを使うには、APIキーをTypingMindと共有する必要がありますか?

いいえ。TypingMindはローカルファーストの設計で、モデルプロバイダー、APIキー、プロンプト、MCP設定をご自身で管理できます。ibmi-mcp-serverで認証が必要な場合は、接続の作成時に、そのMCPサーバーに必要なヘッダー、OAuth設定、またはローカル設定を追加してください。

関連するMCPサーバー

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇