Skip to content
 
 

Repository files navigation

MCP IBM i Docs

Language: English | Deutsch

Note

Repository: thelad-dev/MCP-IBMiDocs
Based on h0w4r/MCP-IBMiDocs, with English as project language, a German docs/CLI overlay, and install from this checkout (not the upstream npm registry).

MCP IBM i Docs - LLM and IBM i documentation for developers

Local MCP server and CLI so LLM agents consult IBM i / AS400 documentation from an indexed corpus before answering about RPGLE, SQLRPGLE, CLLE, DDS, commands, messages, and Db2 for i.

Less “I think it was like this”, more “I checked it against indexed IBM i docs”.

What it does

  • Explains commands such as CRTRPGMOD, CRTSQLRPGI, or SND-MSG
  • Reviews RPGLE, SQLRPGLE, CLLE, or DDS
  • Diagnoses documented messages such as RNF5393
  • Compares docs across IBM i 7.3–7.6
  • Feeds compact evidence into Codex or other MCP clients

No RDi, no Eclipse Help, no local RDi endpoints at runtime. The corpus lives in SQLite with semantic vectors. Default MCP profile is agent-first: the agent only sees ibmi_docs_assist, which returns the final answer (no scores, IDs, or retrieval plans).

Install (this repository)

Prerequisite: Node.js 22 or 24 LTS (CI-validated). Node 26 may work but is outside engines and can warn with EBADENGINE.

PowerShell

git clone https://github.com/thelad-dev/MCP-IBMiDocs.git $HOME\Workspaces\MCP-IBMiDocs
cd $HOME\Workspaces\MCP-IBMiDocs
npm install
npm run build
npm link
ibmi-docs --version

Bash

git clone https://github.com/thelad-dev/MCP-IBMiDocs.git ~/Workspaces/MCP-IBMiDocs
cd ~/Workspaces/MCP-IBMiDocs
npm install
npm run build
npm link
ibmi-docs --version

What that does:

  1. npm install — dependencies + postinstall (assembles Data Pack from data/pack parts and prepares neural models under ~/.ibmi-docs-mcp)
  2. npm run build — compiles TypeScript to dist/
  3. npm link — puts ibmi-docs and ibmi-docs-mcp on your PATH from this checkout

If your npm blocks install scripts (allowScripts), approve and rebuild natives before doctor will work:

npm install-scripts approve better-sqlite3 onnxruntime-node esbuild protobufjs sharp
npm rebuild better-sqlite3 onnxruntime-node
# or: npm install --foreground-scripts

Verify

ibmi-docs doctor
ibmi-docs assist "Explain CRTRPGMOD and when it is preferable to CRTBNDRPG" --language RPGLE --ibmi-version 7.5

doctor should report "ok": true and No RDi, no Eclipse Help, no local RDi endpoint.

CLI language: --locale de or IBMI_DOCS_LOCALE=de (see CLI locale).
Full guide: docs/INSTALLATION.md.

Update

cd ~/Workspaces/MCP-IBMiDocs
git pull
npm install
npm run build
npm link
ibmi-docs doctor

Remove

npm unlink -g @ckirsch94/ibmi-docs-mcp   # npm package id in package.json (link name only)
# optional local data:
rm -rf ~/.ibmi-docs ~/.ibmi-docs-mcp

(@ckirsch94/ibmi-docs-mcp is only the npm package name kept for merge compatibility. This repo is not published under that name.)

Codex / MCP client

After npm link, point the client at the linked binary:

PowerShell

(Get-Command ibmi-docs-mcp.cmd).Source

Bash

command -v ibmi-docs-mcp

Example config.toml (adjust the path to what command -v printed):

[mcp_servers.ibmi-docs]
command = "/home/<user>/.local/bin/ibmi-docs-mcp"
args = []
startup_timeout_sec = 30.0
tool_timeout_sec = 120.0

[mcp_servers.ibmi-docs.env]
IBMI_DOCS_TOOL_PROFILE = "agent"

Or generate a block from the current install:

ibmi-docs codex-config

Optional Skill: skills/ibmi-docs/SKILL.md (German: SKILL.de.md).

Usage

Agent prompts

I am creating an SQLRPGLE program with EXEC SQL and /COPY.
Check the compile guide against IBM i Docs before proposing the command.
I have RNF5393 in an RPGLE listing. Explain it and give me a review checklist.

CLI

ibmi-docs assist "Fix CLLE with RTVJOBA and MONMSG" --language CLLE --ibmi-version 7.5 --depth deep
ibmi-docs assist "How do I compile SQLRPGLE with EXEC SQL" --language SQLRPGLE --depth deep
ibmi-docs search "RNF5393" --category mensajes-rnf --limit 3
ibmi-docs doctor

--version is the CLI version. For IBM i release filtering use --ibmi-version / --release.

Local traces (optional)

No automatic telemetry. Opt in on your machine:

PowerShell

$env:IBMI_DOCS_TRACE = '1'
$env:IBMI_DOCS_TRACE_FILE = "$HOME\Workspaces\MCP-IBMiDocs\data\trace-feedback.ndjson"
ibmi-docs search "DSPFD command" --category dds --limit 3
ibmi-docs trace-report --limit 20 --format markdown --out scope-feedback.md

Bash

export IBMI_DOCS_TRACE=1
export IBMI_DOCS_TRACE_FILE="$HOME/Workspaces/MCP-IBMiDocs/data/trace-feedback.ndjson"
ibmi-docs search "DSPFD command" --category dds --limit 3
ibmi-docs trace-report --limit 20 --format markdown --out scope-feedback.md

MCP tools

Default: IBMI_DOCS_TOOL_PROFILE=agent → only ibmi_docs_assist.

Tool Role
ibmi_docs_assist Full task in → final technical answer out

Maintainer / debug profile:

export IBMI_DOCS_TOOL_PROFILE=full
ibmi-docs-mcp

Then tools such as ibmi_docs_search, ibmi_docs_read, and ibmi_docs_compare_versions appear. Network sync (ibmi_docs_sync) needs full/maintainer and IBMI_DOCS_ALLOW_NETWORK_SYNC=1.

Stack (short)

  • TypeScript MCP over stdio + ibmi-docs CLI
  • Neural retrieval: E5-base embeddings, query→corpus head, mMARCO MiniLM reranker (local)
  • Data Pack: data/pack (manifest.json, HTML/text, SQLite + vectors; ~7k IBM Docs topics)
  • EN/DE: docs under docs/ and docs/de/; CLI/postinstall via locales/ (--locale, IBMI_DOCS_LOCALE)

Details: ARCHITECTURE · DATA_PACKS · AGENT_WORKFLOWS · RECIPES

Contributing

Useful PRs: bad rankings, golden cases, docs, missing categories, recipes.

cd ~/Workspaces/MCP-IBMiDocs
npm ci
npm run build
npm run test
npm run pack:validate
npm run smoke

See CONTRIBUTING.md.

Relation to upstream

This tree tracks h0w4r/MCP-IBMiDocs. The npm name @ckirsch94/ibmi-docs-mcp stays so merges stay simple; do not npm install -g @ckirsch94/ibmi-docs-mcp expecting this fork. Issues and PRs for this line of work: thelad-dev/MCP-IBMiDocs.

Legal

Community, unofficial project. IBM, IBM i, AS/400, RDi, and related names are trademarks of their owners. Not affiliated with or endorsed by IBM. See NOTICE.md and LICENSE (ISC).

About

Community-basiertes MCP zum Abrufen von IBM i/AS400-Dokumenten aus einem lokalen Bestand, ohne auf externe APIs angewiesen zu sein.

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages