Skip to main content
Glama

ibmi-mcp

Give your AI Agent terminal access to your IBM i system via TN5250.

ibmi-mcp is an MCP server that lets AI Agents like Claude interact with IBM i the same way a human would through a 5250 green-screen terminal.

Installation

Install and register with Claude Code:

claude mcp add ibmi-5250 -- uvx ibmi-mcp

This requires the connection environment variables to be set in your shell profile. You can also pass them inline with -e flags:

claude mcp add ibmi-5250 \
  -e IBMI_HOST=myhost.example.com \
  -e IBMI_USER=myuser \
  -e IBMI_PASSWORD=mypassword \
  -- uvx ibmi-mcp

Related MCP server: can-see

Configuration

Variable

Description

Required

Default

IBMI_HOST

IBM i hostname or IP

Yes

IBMI_PORT

TN5250 port

No

23

IBMI_SSL

Enable TLS

No

false

IBMI_USER

Username for auto-signon

No

IBMI_PASSWORD

Password for auto-signon

No

IBMI_DEVICE_NAME

Virtual device name

No

IBMI_CODEPAGE

EBCDIC codepage

No

cp037

IBMI_TERMINAL_TYPE

Terminal type

No

IBM-3179-2

IBMI_SSH_TUNNEL

Tunnel TN5250 through SSH

No

false

IBMI_SSH_PORT

SSH port for file transfer and tunneling

No

22

IBMI_SSH_KEY_FILE

Path to SSH private key

No

IBMI_SSH_KNOWN_HOSTS

Path to known_hosts file

No

When IBMI_USER and IBMI_PASSWORD are set, ibmi-mcp will automatically sign on when it detects a login screen after connecting.

Tools

Tool

Description

connect

Connect to an IBM i system via TN5250

disconnect

Disconnect the active session

read_screen

Read the current screen content and input fields

send_keys

Type text into the current input field

send_key

Send a function/attention key (Enter, F1-F24, PageUp, PageDown, Tab, etc.)

set_cursor

Position the cursor at a specific row and column

upload_file

Upload a file from the local system to the IBM i

download_file

Download a file from the IBM i to the local system

Features

  • Auto-signon — Automatically detects sign-on screens and logs in with configured credentials

  • File transfer — Upload and download files to/from the IBM i IFS via SFTP

  • SSH tunneling — Tunnel TN5250 through SSH when port 23 is not directly reachable

  • Full key support — Enter, F1-F24, PageUp, PageDown, Tab, Backtab, Clear, Help, Print, Attn

  • Local editing — Backspace, Delete, Field Exit, Home, and End handled locally for responsive editing

  • Structured screen data — Returns screen text, cursor position, and input field metadata

  • Configurable codepage — Supports EBCDIC codepage translation (default: CP037)

License

BSD 2-Clause. See LICENSE for details.

About Whitehorn Ltd. Co.

ibmi-mcp is developed and maintained by Whitehorn Ltd. Co., a legacy system modernization firm. We specialize in IBM i, RPG, COBOL, and midrange platforms. We help our clients protect what they can't afford to break while building a path forward.

Learn more about how Whitehorn Ltd. Co. can help you modernize your IBM midrange systems at whitehorn.ltd.

Available Tools

8 tools
connectA

Connect to an IBM i system via TN5250.

Args: host: IBM i hostname or IP. Defaults to IBMI_HOST env var. port: TN5250 port. Defaults to IBMI_PORT env var or 23. use_ssl: Enable TLS. Defaults to IBMI_SSL env var.

Returns the initial screen after connection.

ParametersJSON Schema
NameRequiredDescriptionDefault
hostNo
portNo
use_sslNo

TDQS

A4/5.0
Behavior3/5

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

No annotations provided; description discloses return of initial screen but lacks detail on side effects (e.g., session creation) or failure behavior.

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?

Concise docstring format with no wasted words; front-loads purpose and covers args and returns efficiently.

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?

Sufficient for a connection tool; all parameters explained and return described. Lacks error handling info but siblings cover subsequent actions.

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

Parameters4/5

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

Adds meaning beyond schema by explaining each parameter's purpose and default values (e.g., host defaults to env var), despite schema having 0% description coverage.

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?

Clearly states it connects to an IBM i system via TN5250, with verb and resource. Distinguishes from siblings which operate after connection.

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

Usage Guidelines3/5

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

Implied as the entry point before other operations, but no explicit when-to-use or alternatives mentioned.

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

disconnectA

Disconnect the active TN5250 session.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. 'Disconnect' is generally understood as terminating a session, but it does not disclose any side effects (e.g., unsaved data loss) or whether it can be called multiple times safely. Adequate but could be more transparent.

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 a single, well-structured sentence with no extraneous information. Every word is necessary and efficiently conveys the action.

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?

Given the simplicity of the tool (no parameters, no output schema), the description is fairly complete. It could be improved by noting that it only works when a session is active, but the context of a terminal emulator makes that implicit.

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

Parameters4/5

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

The tool has zero parameters, and the schema coverage is 100%. According to guidelines, baseline is 4 for no parameters. The description adds no param info, which is acceptable as there is nothing to document.

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 the verb 'Disconnect' and the resource 'active TN5250 session', making the tool's purpose unambiguous. It effectively distinguishes itself from siblings like 'connect' and terminal interaction tools.

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

Usage Guidelines3/5

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

The description implies usage when connected, but does not explicitly state when to use vs. alternatives or prerequisites like being connected. No guidance on when not to use.

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

download_fileB

Download a file from the IBM i to the local system.

Args: remote_path: Path to the file on the IBM i (IFS path). local_path: Destination path on the local system.

Returns status with file details, or an error.

ParametersJSON Schema
NameRequiredDescriptionDefault
remote_pathYes
local_pathYes

TDQS

B3.2/5.0
Behavior2/5

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

No annotations provided, so the description must cover behavioral traits. It mentions returns status/error but does not disclose overwrite behavior, file size limits, encoding, or side effects.

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?

Two concise, well-structured sentences: purpose first, then args, then returns. No wasted words.

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

Completeness2/5

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

Given no output schema and low schema coverage, the description omits critical details for a file transfer tool (overwrite behavior, encoding, error types). Not complete enough for robust agent use.

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?

With 0% schema coverage, the description adds meaning by explaining each parameter's purpose. However, it lacks details like path formats, constraints, or examples.

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 'Download a file from the IBM i to the local system.' using a specific verb and resource, and it distinguishes itself from sibling tools like upload_file.

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

Usage Guidelines2/5

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

No explicit guidance on when to use this tool vs alternatives (e.g., upload_file), no prerequisites like requiring a connection, and no exclusions.

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

read_screenA

Read the current 5250 screen content.

Returns structured data with:

  • screen: list of text rows (the visible display)

  • cursor: current cursor position {row, col} (1-based)

  • fields: list of input fields with position, length, value, and type

  • dimensions: screen size {rows, cols}

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.9/5.0
Behavior2/5

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

No annotations provided. The description mentions return structure but does not disclose side-effect behavior (e.g., read-only nature, safety). It lacks explicit transparency beyond output details.

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?

Very concise with bullet-pointed return values. Front-loaded purpose, every sentence adds value. No redundancy.

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

Completeness5/5

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

For a zero-parameter read tool, the description fully explains behavior and return format. No missing details given the simplicity.

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

Parameters4/5

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

No parameters exist, so schema coverage is 100%. Baseline for zero parameters is 4. Description adds no parameter-specific meaning, but none needed.

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 it reads the current 5250 screen content with a specific verb and resource. It distinguishes itself from sibling tools (connect, disconnect, send_key, etc.) which handle connection and input operations.

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

Usage Guidelines3/5

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

The description does not explicitly state when to use this tool versus alternatives, but the purpose is self-explanatory given sibling differentiation. Implicitly requires connection but no explicit guidance.

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

send_keyA

Send an attention/function key and wait for the host response.

Args: key: Key name. Valid values: Enter, F1-F24, PageUp, PageDown, Tab, Backtab, Clear, Help, Print, Attn.

Returns the updated screen after the host processes the key.

ParametersJSON Schema
NameRequiredDescriptionDefault
keyYes

TDQS

A3.8/5.0
Behavior3/5

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

No annotations provided, so description carries full burden. It mentions waiting for host response and returning updated screen, but does not disclose destructiveness, idempotency, or error behavior for invalid keys.

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

Conciseness4/5

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

Three sentences with clear structure; front-loaded with action. The 'Args:' section is slightly verbose but still efficient. No wasted words.

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

Completeness3/5

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

Given low complexity (single param, no output schema) and no annotations, description covers basic behavior and return value. However, it lacks details on handling invalid keys or timeouts, which would improve completeness.

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

Parameters4/5

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

Schema coverage is 0% with a single string parameter 'key'. The description adds valuable semantics by listing all valid values (Enter, F1-F24, etc.) and clarifying it is a key name, compensating for the lack of schema description.

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?

Description clearly states the action ('send an attention/function key') and expected outcome ('wait for the host response'), distinguishing it from sibling tools like send_keys (plural) and read_screen.

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

Usage Guidelines3/5

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

Valid key values are listed, but no explicit guidance on when to use send_key vs. send_keys (plural) or other alternatives. The description implies usage for single key sends but lacks comparative context.

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

send_keysB

Type text into the current input field at the cursor position.

Args: text: The text to type.

Returns the updated screen state.

ParametersJSON Schema
NameRequiredDescriptionDefault
textYes

TDQS

B3.3/5.0
Behavior2/5

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

The description discloses that it 'Returns the updated screen state,' but with no annotations, it fails to explain other behaviors such as whether it works without an active input field, effect on special characters, or idempotency.

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 very concise at three sentences, front-loading the purpose. Every sentence adds value with no wasted words.

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

Completeness3/5

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

For a simple tool with one parameter, the description is adequate but minimal. It does not address edge cases, errors, or differentiation from sibling tools, but it covers the basic purpose and return value.

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?

Schema coverage is 0%, so the description must compensate. It provides a one-line description for the 'text' parameter ('The text to type'), adding minimal meaning beyond the schema's type and title. No additional constraints or format are given.

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 'Type text into the current input field at the cursor position,' specifying the verb ('type') and resource ('text into input field'). It also implicitly distinguishes from the sibling tool 'send_key' by targeting typing of multiple characters vs a single key.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives like 'send_key' or 'set_cursor.' It does not mention prerequisites, context requirements, or scenarios where it should be avoided.

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

set_cursorA

Position the cursor at the specified location.

Args: row: Row number (1-based, top row is 1). col: Column number (1-based, leftmost column is 1).

Returns the updated screen state.

ParametersJSON Schema
NameRequiredDescriptionDefault
rowYes
colYes

TDQS

A4.2/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It states the return value ('updated screen state') but does not mention side effects like clearing selections or error behavior for invalid coordinates.

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 extremely concise: two sentences with a clear docstring-style parameter list. No redundant information.

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?

For a simple setter tool, the description covers purpose, parameters, and return value. It could mention the environment (terminal) but is adequate given siblings provide context.

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

Parameters4/5

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

The schema has 0% description coverage, but the description adds 1-based indexing details for both row and col, which is not in the schema. This adds meaningful guidance, though bounds are missing.

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 the action ('Position') and resource ('cursor'). It distinguishes from sibling tools like send_key and read_screen by specifying it moves the cursor, not sending keys or reading content.

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 implies when to use (to set cursor position) but does not explicitly exclude cases or mention alternatives among siblings. However, the context is clear enough.

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

upload_fileB

Upload a file from the local system to the IBM i.

Args: local_path: Path to the file on the local system. remote_path: Destination path on the IBM i (IFS path).

Returns status with file details, or an error.

ParametersJSON Schema
NameRequiredDescriptionDefault
local_pathYes
remote_pathYes

TDQS

B3.1/5.0
Behavior2/5

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

Annotations are absent, so the description carries full burden for behavioral disclosure. It only states 'Returns status with file details, or an error,' omitting side effects, permission requirements, overwrite behavior, or file size limits.

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

Conciseness4/5

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

Description is concise with two clear sentences and an Args section. No extraneous words, but could incorporate more detail without becoming verbose.

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

Completeness2/5

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

For a file upload tool with 2 params, no output schema, and no annotations, the description is minimal. It lacks critical details like overwrite behavior, path types (absolute/relative), size limits, and error scenarios, making it incomplete for safe usage.

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?

Input schema has 0% description coverage, but the description explains 'local_path' as file on local system and 'remote_path' as IFS path. This adds basic context but no format, restrictions, or examples, so it is marginally helpful.

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?

Description clearly states 'Upload a file from the local system to the IBM i,' providing a specific verb (upload), resource (file), and destination (IBM i). This distinguishes it from the sibling tool 'download_file'.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives. Siblings like 'download_file' exist, but the description does not mention prerequisites, when not to use, or typical scenarios.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 2 tool updatesv1.0.1
    • Addeddownload_file
    • Addedupload_file
  2. 6 tool updatesv1.0.0
    • First observedconnect
    • First observeddisconnect
    • First observedread_screen
    • First observedsend_key
    • First observedsend_keys
    • First observedset_cursor

TDQS

A3.9/5.0
Disambiguation5/5

Each tool targets a distinct operation: session management (connect, disconnect), screen interaction (read_screen, send_key, send_keys, set_cursor), and file transfer (download_file, upload_file). There is no overlap, and agents can easily distinguish which tool to use.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern with underscores (e.g., download_file, send_keys). There is no mixing of camelCase or other conventions, making the naming predictable and easy to remember.

Tool Count5/5

With 8 tools, the server covers the essential operations for IBM i terminal emulation and file transfer without being overly large or minimal. The count is well-scoped for the server's purpose.

Completeness4/5

The tool set covers the core workflow: connect, interact with the screen, transfer files, and disconnect. A minor gap is the lack of a dedicated tool for waiting on screen conditions, but agents can achieve this by combining send_key and read_screen.

Maintenance

ActivityInactive
ResponsivenessUnresponsive

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
    B
    maintenance
    MCP server enabling AI agents to interact with terminal applications through structured Terminal State Tree representation. Works with any AI assistant that supports the Model Context Protocol.
    86
    19
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    MCP server giving AI agents full SSH access with persistent sessions, structured command output, SFTP file transfer, and port forwarding.
    18
    10
    MIT

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/WhitehornLtd/ibmi-mcp'

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