Skip to main content
Glama

ibmi-docs-mcp

FastMCP server that lets agents search and fetch IBM i documentation via IBM Documentation’s public APIs.

Typical flow: search → pick the best hit’s href → fetch that topic as plain text.

Full tool contracts (parameters, response JSON, errors): docs/TOOLS.md.

Requirements

  • Python 3.13+

  • uv

Related MCP server: mcp-docs

Setup

uv sync --extra dev

Run (stdio MCP)

uv run python server.py

Or: uv run python -m ibmi_docs_mcp

Cursor / Bob mcp.json

{
  "mcpServers": {
    "ibmi-docs": {
      "command": "uv",
      "args": [
        "run",
        "--directory",
        "/absolute/path/to/ibmi-docs-mcp",
        "python",
        "server.py"
      ],
      "env": {
        "IBMI_DOCS_VERSION": "7.5.0"
      }
    }
  }
}

Tools

  1. search_ibm_docs(query, version?, limit?) — ranked candidates (title, snippet, href, url)

  2. fetch_ibm_doc(url_or_href, version?) — plain-text topic body for a chosen href

Prefer short object/command names (e.g. HTTP_GET, WRKACTJOB). Results are IBM-ranked; do not assume hit #1 is always correct.

See docs/TOOLS.md for response shapes and error codes.

Supported versions

IBM i 7.4, 7.5, and 7.6. Accepted forms include:

Form

Example

Semantic

7.5, 7.5.0

Short

75

Product key

ssw_ibm_i_75

Default is IBMI_DOCS_VERSION=7.5.0 (or pass version per tool call).

Env vars

Set via .env or the MCP host env block. Defaults match .env.example.

Variable

Default

Purpose

IBMI_DOCS_VERSION

7.5.0

Default IBM i version for search

IBMI_DOCS_CACHE_PATH

~/.cache/ibmi-docs-mcp/docs_cache.db

SQLite cache file (~ expanded)

IBMI_DOCS_TTL_DAYS

30

Soft TTL; stale rows may still be served on outage

IBMI_DOCS_MAX_CHARS

12000

Max plain-text chars returned by fetch

IBMI_DOCS_HTTP_TIMEOUT

20

HTTP timeout (seconds)

IBMI_DOCS_MAX_RETRIES

3

Retries for transient upstream failures

IBMI_DOCS_MAX_CONCURRENCY

2

Max concurrent IBM HTTP requests

IBMI_DOCS_USER_AGENT

ibmi-docs-mcp/0.1 (+local-agent)

User-Agent sent to IBM

IBMI_DOCS_BASE_URL

https://www.ibm.com

IBM docs API base

IBMI_DOCS_LOG_LEVEL

INFO

Log level (stderr only)

Logging

Logs go to stderr only (stdout is the MCP channel). In Cursor, open the MCP server output / logs panel for lines like search cache hit or fetch miss → IBM.

Troubleshooting

Symptom

What to try

empty_query

Pass a non-blank query

invalid_href

Use an href from search_ibm_docs (e.g. ssw_ibm_i_75/db2/….htm). Human URLs with ?topic= are rejected

version_unknown

Use 7.4 / 7.5 / 7.6 (or 74 / 75 / 76 / ssw_ibm_i_7x)

truncated: true on fetch

Raise IBMI_DOCS_MAX_CHARS, or fetch a more specific topic

upstream_unavailable

Check network; warm cache may still return with stale: true + warning

Cache location

Default ~/.cache/ibmi-docs-mcp/docs_cache.db, or set IBMI_DOCS_CACHE_PATH

Tests

uv run pytest

License

MIT — see LICENSE.

Available Tools

2 tools
fetch_ibm_docA

Fetch one IBM i documentation topic as plain text.

Pass the href (or content API URL) from search_ibm_docs. Returns title, url, text, and truncated/stale flags. Prefer search first so you pick the right page.

Inputs: url_or_href (required), version. Returns: object

search_ibm_docsA

Search IBM i documentation (IBM's own docs search index).

Prefer short object/command names (e.g. HTTP_GET, WRKACTJOB, CHGJRN) over long prose. Results are ranked by IBM relevance — read titles/snippets and pick the best match; do not assume hit #1 is always right. Next step: call fetch_ibm_doc with the chosen result's href.

Inputs: query (required), limit, version. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 2 tools

    Disambiguation5/5

    The two tools have clearly distinct roles: one searches the documentation index, the other fetches a specific page. There is no overlap or ambiguity in their purposes.

    Naming Consistency5/5

    Both tools use a consistent verb_object pattern: 'search_ibm_docs' and 'fetch_ibm_doc'. The slight singular/plural difference is minor and does not affect consistency.

    Tool Count5/5

    Two tools is exactly right for a documentation search and retrieval server. Each tool is essential and there is no redundant functionality.

    Completeness5/5

    The workflow of search-then-fetch is fully covered. A user can find a relevant topic and retrieve its content without dead ends.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      A
      quality
      C
      maintenance
      MCP server for GoHighLevel documentation, enabling agents to search docs, list endpoints, and fetch focused API details without loading large files.
      7
      1
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server for documentation search that automatically indexes web documentation sites and provides semantic, full-text, or hybrid search capabilities.
      2 npm
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      MCP server that exposes one or more documentation folders (Markdown, MDX, TXT) to AI agents, enabling listing, reading, and searching of documentation files.
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server for searching and reading ServiceNow documentation from a local clone, enabling keyword/regex queries and full doc retrieval without external APIs.
      ISC