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 hreffetch that topic as plain text.

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

Requirements

  • Python 3.13+

  • uv

Related MCP server: ghl-api-mcp

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
versionNo
url_or_hrefYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It discloses the return payload ('title, url, text, and truncated/stale flags') and implies a read-only operation via 'Fetch.' It also mentions 'truncated/stale flags' which is a useful behavioral nuance. However, it lacks explicit statements about side effects (or lack thereof), error handling, or prerequisites beyond the search step.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the core purpose, and includes only essential information. Every sentence adds value—first the action, then the usage pattern, then the return summary. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple, has an output schema (though not shown in the prompt), and the description covers the return structure. The navigation hint from search is a useful context. The only gap is the undocumented 'version' parameter and lack of explicit error or timeout behavior, but these are not critical for a simple fetch tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has no parameter descriptions (0% coverage), so the description must clarify. It clarifies 'url_or_href' by tying it to the search output, but it doesn't explain 'version' at all, leaving that parameter ambiguous. The parameter names themselves are somewhat self-explanatory, but the description only partially compensates for the gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description begins with 'Fetch one IBM i documentation topic as plain text,' which clearly identifies the action (fetch), the resource (IBM i documentation topic), and the output format (plain text). This distinguishes it from the sibling tool 'search_ibm_docs' by focusing on retrieval of a specific topic rather than searching.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly instructs to 'Pass the href (or content API URL) from search_ibm_docs' and advises to 'Prefer search first so you pick the right page.' This provides clear when-to-use guidance and names the alternative workflow, leaving no ambiguity about ordering.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
queryYes
versionNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the transparency burden. It discloses two key behaviors: results are ranked by IBM relevance, and the top hit may not be correct, advising to 'read titles/snippets.' It also reveals the output includes hrefs for the next step. This is significant added context beyond the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two concise sentences, front-loaded with the core purpose, followed by actionable usage tips. Every sentence adds value: the first states what it does, the second covers query style, ranking behavior, and the next step. No fluff or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the essential search workflow, including result ranking caveat and the follow-up fetch step. With an output schema present, the description doesn't need to detail return structure. However, the lack of parameter definitions for limit/version slightly reduces completeness for a tool with three parameters.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It only addresses the query parameter by recommending short names, but offers no explanation for 'limit' or 'version'. Although their defaults are in the schema, their meaning and usage are not clarified, leaving a clear gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Search IBM i documentation (IBM's own docs search index)', specifying the exact verb and resource. It also distinguishes the tool from its sibling by stating the next step to call fetch_ibm_doc, making the search vs. fetch difference explicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear guidance on how to use the tool: 'Prefer short object/command names' and 'call fetch_ibm_doc with the chosen result's href.' This establishes the workflow and query strategy, though it doesn't explicitly state when not to use it or enumerate exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A4.4/5.0
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

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A local-first MCP server that provides fast access to OpenEMR wiki pages, users guide, and selected API documentation through tools like search, page retrieval, and category listing.
    MIT
  • F
    license
    A
    quality
    D
    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.
    11
    MIT
  • F
    license
    Not graded
    quality
    B
    maintenance
    MCP server that exposes one or more documentation folders (Markdown, MDX, TXT) to AI agents, enabling listing, reading, and searching of documentation files.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wyattmog/ibmi-docs-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server