Logo di ibmi-mcp-server

ibmi-mcp-server

Organizzazione
IBM

MCP server for IBM i systems

AutoreIBM
Repositoryibmi-mcp-server
LinguaTypeScript
Fork
36
Stelle
81
Strumenti disponibili
0
Tipo di trasportostdio, streamable-http
Categorie
LicenzaApache-2.0
Link
  • Collega gli strumenti ai flussi di lavoro IA

    ibmi-mcp-server mette a disposizione funzionalità MCP utilizzabili da client e agenti IA compatibili.

  • 0 strumenti disponibili

    Esplora le azioni richiamabili qui sotto, con nomi e descrizioni quando forniti dal server.

  • Configurazione pronta da copiare

    Usa gli esempi di installazione per configurare questo server nel tuo client MCP preferito.

  • Indicatori di interesse open source

    81 stelle e 36 fork nel repository collegato.

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.

Installazione

TypingMind
Prerequisiti:

Node.js 18+

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

Usa MCP ibmi-mcp-server con più modelli IA

TypingMind collega gli strumenti MCP a livello di area di lavoro: una volta connesso ibmi-mcp-server, puoi usarlo con diversi modelli IA in TypingMind, senza configurarlo separatamente per ogni modello. Puoi eseguire MCP localmente sul tuo dispositivo o connetterti all'URL di un server MCP remoto.

Opzione 1: usa il connettore locale

Usa questo metodo quando il server MCP deve accedere a file locali, app o risorse private sul tuo computer.

1

Apri le impostazioni MCP

In TypingMind, vai su Impostazioni, Impostazioni avanzate, poi su Model Context Protocol e scegli Configura MCP.

  1. Apri TypingMind nel tuo browser.
  2. Fai clic sull'icona Impostazioni.
  3. Vai a Impostazioni avanzate.
  4. Apri la sezione Model Context Protocol.
  5. Fai clic su Configura MCP e scegli Questo dispositivo.
Schermata di configurazione del connettore MCP di TypingMind con Questo dispositivo selezionato
2

Esegui il comando del connettore

Scegli Questo dispositivo, copia il comando da TypingMind ed eseguilo nel terminale. Lascia il processo in esecuzione mentre usi MCP.

  1. Copia il comando di configurazione mostrato da TypingMind.
  2. Apri Terminale su macOS o Windows Terminal su Windows.
  3. Incolla ed esegui il comando.
  4. Conferma l'installazione del pacchetto se il terminale ti chiede di procedere.
  5. Tieni aperta la finestra del terminale con il processo in esecuzione mentre usi gli strumenti MCP.
3

Aggiungi ibmi-mcp-server come server

Quando lo stato del connettore è Pronto, fai clic su Modifica server e incolla la configurazione del server MCP.

  1. Attendi che lo stato del connettore sia Pronto.
  2. Fai clic su Modifica server.
  3. Incolla la configurazione del server MCP di ibmi-mcp-server.
  4. Salva l'elenco dei server.
  5. Aggiorna per verificare che il connettore sia ancora pronto.
Impostazioni MCP di TypingMind con un server attivo e il pulsante Modifica server
{
  "mcpServers": {
    "ibm-ibmi-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "ibmi-mcp-monorepo"
      ]
    }
  }
}
4

Usa la connessione con diversi modelli

Salva l'elenco dei server, apri Plugin, abilita gli strumenti MCP di ibmi-mcp-server, poi seleziona un modello IA supportato in TypingMind e usa gli strumenti in chat o assegnali a un agente IA.

  1. Apri la pagina Plugin in TypingMind.
  2. Abilita gli strumenti MCP di ibmi-mcp-server.
  3. Avvia una chat e scegli il modello IA che vuoi usare.
  4. Usa gli strumenti MCP in chat o assegnali a un agente IA.
  5. Passa a un altro modello IA quando serve, senza riconnettere MCP.
Chat di TypingMind che usa gli strumenti MCP abilitati con un modello IA selezionato
Puoi usare ibmi-mcp-server per aiutarmi con questa attività?
ibmi-mcp-server
Certo. Ho letto.
Ecco cosa ho trovato con ibmi-mcp-server.

Opzione 2: aggiungi l'URL di un server MCP

Usa questo metodo se ibmi-mcp-server è già ospitato in remoto o se il tuo team vuole un unico connettore condiviso accessibile a più utenti.

1

Apri Connettori MCP

In TypingMind, vai su Plugin, apri Connettori MCP e scegli Aggiungi URL.

  1. Apri TypingMind nel tuo browser.
  2. Vai a Plugin.
  3. Apri Connettori MCP.
  4. Fai clic su Aggiungi URL.
Modulo di TypingMind per aggiungere l'URL di un server MCP personalizzato
2

Incolla l'URL del server

Inserisci URL del tuo server nel campo URL del server. Aggiungi un nome per la connessione, una descrizione, un'icona, header HTTP personalizzati o le impostazioni del client OAuth se richiesti dal server.

  1. Incolla URL del tuo server nel campo URL del server.
  2. Inserisci un nome per la connessione a ibmi-mcp-server.
  3. Aggiungi una descrizione e un'icona per riconoscere più facilmente la connessione.
  4. Aggiungi header HTTP personalizzati o i dati del client OAuth se il server richiede l'autenticazione.
3

Crea la connessione

Fai clic su Crea connessione, poi torna all'elenco dei plugin e verifica che la nuova connessione MCP sia attiva.

  1. Fai clic su Crea connessione.
  2. Torna all'elenco dei connettori MCP.
  3. Verifica che la connessione ibmi-mcp-server risulti attiva.
  4. Aggiorna l'elenco dei plugin se la connessione non appare subito.
4

Cambia modello senza riconnetterti

Avvia una chat con il tuo modello preferito, abilita gli strumenti di ibmi-mcp-server dalla sezione Plugin e passa a un altro modello quando serve. La connessione MCP rimane disponibile nell'area di lavoro di TypingMind.

  1. Avvia una nuova chat in TypingMind.
  2. Seleziona il modello IA che vuoi usare.
  3. Abilita gli strumenti di ibmi-mcp-server dalla sezione Plugin.
  4. Chiedi al modello di usare lo strumento quando serve.
  5. Passa a un altro modello IA e riutilizza la stessa connessione MCP.
Chat di TypingMind che usa gli strumenti MCP abilitati con un modello IA selezionato
Puoi usare ibmi-mcp-server per aiutarmi con questa attività?
ibmi-mcp-server
Certo. Ho letto.
Ecco cosa ho trovato con ibmi-mcp-server.

Domande frequenti

A cosa serve il server MCP ibmi-mcp-server?

ibmi-mcp-server è un server MCP che consente ai client IA compatibili di accedere a strumenti e informazioni di contesto esterni. In TypingMind puoi aggiungere questo server MCP una sola volta e rendere disponibili i suoi strumenti nella tua area di lavoro IA.

Posso usare ibmi-mcp-server MCP con più modelli IA in TypingMind?

Sì. TypingMind collega gli strumenti MCP a livello di area di lavoro, quindi puoi usare ibmi-mcp-server con diversi modelli IA come Claude, ChatGPT, Gemini o altri modelli che hai configurato in TypingMind, senza dover configurare il server MCP separatamente per ogni modello.

Perché usare il connettore MCP ibmi-mcp-server con TypingMind?

TypingMind è una delle migliori interfacce per chattare con gli LLM perché riunisce più modelli IA, prompt, plugin, agenti IA, chiavi API e strumenti MCP in un'unica area di lavoro. Collegando ibmi-mcp-server, puoi usare i suoi strumenti MCP con i tuoi modelli preferiti e mantenere organizzato il tuo flusso di lavoro in chat su TypingMind.

Come collego ibmi-mcp-server MCP a TypingMind?

Puoi collegare ibmi-mcp-server a TypingMind con il connettore MCP locale oppure aggiungendo l'URL di un server MCP remoto. Usa il connettore locale quando il server deve accedere a file, app o risorse private sul tuo dispositivo; usa invece l'URL del server quando il server MCP è ospitato in remoto.

Quali strumenti offre ibmi-mcp-server MCP in TypingMind?

ibmi-mcp-server mette a disposizione funzionalità MCP che puoi attivare dalla pagina Plugin di TypingMind e usare in chat o assegnare agli agenti IA.

Devo condividere le mie chiavi API con TypingMind per usare ibmi-mcp-server MCP?

No. TypingMind privilegia il funzionamento in locale e ti permette di mantenere il controllo su fornitori di modelli, chiavi API, prompt e configurazione MCP. Se ibmi-mcp-server richiede l'autenticazione, aggiungi le intestazioni, le impostazioni OAuth o la configurazione locale necessarie per quel server MCP quando crei la connessione.

Server MCP correlati

Vedi tutti

Crea subito la tua area di lavoro IA

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇