Skip to main content

Client Integration Overview

The IBM i MCP Server can be integrated into any MCP-compatible client using either local (stdio) or remote (HTTP) connections. This guide provides an overview of supported clients and helps you choose the right integration approach.
Prerequisites: Before integrating with clients, ensure you have:
  • IBM i MCP Server installed and built (npm install && npm run build)
  • Mapepire running on your IBM i system (see Setup Mapepire)
  • Your IBM i connection details (host, user, password, port)

Supported MCP Clients

The IBM i MCP Server works with popular MCP-compatible clients across different platforms:

Transport Modes

The IBM i MCP Server supports two transport protocols:
Standard Input/Output - Direct process communicationCharacteristics:
  • Runs locally on your machine
  • Lower latency
  • No network configuration needed
  • Each client spawns its own server process
Best for:
  • Desktop applications (Claude Desktop, Cursor)
  • CLI tools (Claude Code)
  • Development and testing
  • Single-user scenarios
Requirements:
  • Server must be installed locally
  • Absolute path to tools directory
  • Environment variables in client config

Client Comparison

ClientPlatformStdioHTTPAuthenticationNotes
Claude DesktopmacOS, WindowsN/AOfficial desktop app (stdio only)
Claude CodeCLIBearer TokenCLI server management
IBM BobIDEBearer TokenIBM’s AI assistant (6,000+ users)
VSCodeEditorBearer TokenVia Copilot Chat
CursorEditorBearer TokenAI-first code editor
Gemini CLICLIBearer TokenGoogle AI integration
ClineVSCode ExtBearer TokenstreamableHttp support

Setup Prerequisites

For Local (Stdio) Setup

For Remote (HTTP) Setup

  1. Configure server for HTTP with authentication:
    # In your .env file
    MCP_TRANSPORT_TYPE=http
    MCP_AUTH_MODE=ibmi
    IBMI_HTTP_AUTH_ENABLED=true
    IBMI_AUTH_ALLOW_HTTP=true  # Development only
    
  2. Generate RSA keypair (for IBM i auth):
    mkdir -p secrets
    openssl genpkey -algorithm RSA -out secrets/private.pem -pkeyopt rsa_keygen_bits:2048
    openssl rsa -pubout -in secrets/private.pem -out secrets/public.pem
    
  3. Start the server:
    npm run start:http
    
  4. Obtain access token:
    node get-access-token.js --verbose
    export IBMI_MCP_ACCESS_TOKEN="your-token-here"
    

Authentication Methods

MCP_AUTH_MODE=none
Use for: Local development, testing, trusted networks⚠️ Warning: Never use in production
MCP_AUTH_MODE=jwt
MCP_AUTH_SECRET_KEY=your-secret-key-min-32-chars
Use for: Custom authentication systems, token-based auth
MCP_AUTH_MODE=oauth
OAUTH_ISSUER_URL=https://your-auth-server.com
OAUTH_AUDIENCE=ibmi-mcp-server
Use for: Enterprise SSO, external identity providers

Common Configuration Patterns

{
  "mcpServers": {
    "ibmi-mcp": {
      "command": "npx",
      "args": ["@ibm/ibmi-mcp-server@latest", "-y", "--tools", "/absolute/path/to/tools"],
      "env": {
        "DB2i_HOST": "your-ibmi-host.com",
        "DB2i_USER": "your-username",
        "DB2i_PASS": "your-password",
        "DB2i_PORT": "8076",
        "MCP_TRANSPORT_TYPE": "stdio"
      }
    }
  }
}

Next Steps

  1. Choose your client from the list above
  2. Follow the specific setup guide for your chosen client
  3. Configure authentication if using remote (HTTP) mode
  4. Test the connection by listing available tools
  5. Start building with SQL tools and agents
For detailed setup instructions, click on any client card above or navigate using the sidebar. Each client has unique configuration requirements and capabilities.

Troubleshooting

  • Verify server is running: ps aux | grep ibmi-mcp-server
  • Check npm link worked: which ibmi-mcp-server
  • Ensure TOOLS_YAML_PATH is an absolute path
  • Verify IBM i credentials are correct
  • Confirm server is running with IBMI_HTTP_AUTH_ENABLED=true
  • Verify token is valid: echo $IBMI_MCP_ACCESS_TOKEN
  • Check server logs for authentication errors
  • Ensure HTTPS is used in production
  • Validate YAML configuration: npm run validate -- --config tools
  • Check file permissions on tools directory
  • Use --list-toolsets to see available tools
  • Review server startup logs for parsing errors
Use direct node path instead:
{
  "command": "node",
  "args": [
    "/absolute/path/to/ibmi-mcp-server/dist/index.js",
    "--tools",
    "/absolute/path/to/tools"
  ]
}

Additional Resources