kiro-ibmi-mcp-bridge

kiro-ibmi-mcp-bridge

Bridges AI with IBM i systems for source code management, SQL queries, and schema inspection via MCP.

Category
访问服务器

README

<p align="center"> <img src="icon.png" width="120" alt="Kiro IBM i MCP Bridge" /> </p>

Kiro IBM i MCP Bridge

A Kiro (and VS Code) extension that bridges Kiro's AI (via the Model Context Protocol) with IBM i (AS/400) systems, enabling AI-powered development workflows for RPG, COBOL, CL, and other IBM i languages.

Features

  • Read/Write Source Members: AI can read and modify IBM i source code directly
  • Execute SQL: Run queries against DB2 for IBM i
  • Table Schema Inspection: Retrieve column definitions and metadata
  • Intelligent Editing: Partial source edits without full rewrites
  • Standalone MCP Server: A self-contained Node.js MCP server (out/server.js) that connects to IBM i directly over SSH — launched by Kiro (or any MCP client) as a separate process.
  • Editor auto-refresh: The bundled VS Code extension reloads any open source member as soon as the server writes to it.

Prerequisites

  • VS Code 1.85.0 or higher
  • Node.js 18+ (used by Kiro to launch the MCP server)
  • Code for IBM i extension (used to browse/open members and to receive editor auto-refresh)
  • Network/SSH access to your IBM i system

Installation

  1. Install from VS Code Marketplace (search for "IBM i MCP Bridge")
  2. Or download the .vsix file and install manually:
    code --install-extension kiro-ibmi-mcp-bridge-0.3.2.vsix
    

Usage with Kiro

The extension bundles the MCP server and configures Kiro for you — no manual mcp.json editing required.

1. Install prerequisites

  1. Install the Code for IBM i extension in Kiro.
  2. Install this extension (kiro-ibmi-mcp-bridge) from the VSIX (Extensions → ... → Install from VSIX…).

2. Configure your IBM i connection

Open the Command Palette and run IBM i MCP: Configure Connection. Enter host, user, password and SSH port.

The extension then:

  • Saves the credentials locally in its per-user storage (not in mcp.json, not in your repo).
  • Registers the ibmi-bridge MCP server in ~/.kiro/settings/mcp.json, pointing to the server bundled inside the extension.

Reconnect the ibmi-bridge server from the Kiro MCP Servers panel to apply.

The registration only stores a reference to the credentials file (IBMI_CRED_FILE); your password is never written into mcp.json.

Available settings: ibmiMcpBridge.registerScope (global or workspace), ibmiMcpBridge.serverName, ibmiMcpBridge.runtime (kiro or node), ibmiMcpBridge.autoApprove. By default the server runs on Kiro's own bundled Node runtime, so no separate Node.js installation is required. Set ibmiMcpBridge.runtime to node to use a node binary from your PATH instead.

3. Start Using AI with IBM i

Once configured, you can interact with IBM i sources naturally:

You: "Read the source code from MYLIB/QRPGLESRC/MYPGM"
AI: [reads and displays the RPG source]

You: "Add error handling to the SQL statements"
AI: [modifies the source with proper error handling]

You: "Show me the schema for MYLIB/CUSTOMERS"
AI: [displays table columns and types]

Available MCP Tools

Tool Description
get_active_member Read the member currently open in Code for IBM i (automatic context)
read_member_source Read source code from a member
write_member_source Overwrite entire source member
edit_member_source Partial edit using find/replace
run_sql_query Execute SQL (mutations require flag)
get_table_schema Retrieve table column definitions

Automatic context (open member)

You don't have to type library/file/member every time. When you open a source member in Code for IBM i, the extension tracks it (shown in the status bar as IBM i: LIB/FILE(MBR)) and the MCP server uses it automatically. So you can just say:

"Analyze this program"
"Add error handling to the open source"
"Explain what this member does"

The read_member_source, edit_member_source and write_member_source tools fall back to the open member when you omit the coordinates.

Running the server manually

The MCP server communicates via stdio. Kiro normally launches it for you (see config above), but you can also run it directly for testing:

export IBMI_HOST=your-ibm-i-hostname
export IBMI_USER=your-username
export IBMI_PASSWORD=your-password
export IBMI_PORT=22

node out/server.js

Security Notes

  • SQL mutations (INSERT, UPDATE, DELETE) are blocked by default
  • Use allow_mutating: true parameter to enable (use with caution)
  • Credentials are entered via the IBM i MCP: Configure Connection command and stored in the extension's per-user global storage, not in mcp.json and not in your workspace/repo
  • mcp.json only stores a path reference (IBMI_CRED_FILE) to that local credentials file
  • Run IBM i MCP: Clear Saved Credentials to remove the stored credentials

Development

# Clone the repository
git clone https://github.com/dibari62/kiro-ibmi-mcp-bridge
cd kiro-ibmi-mcp-bridge

# Install dependencies
npm install

# Compile TypeScript
npm run compile

# Watch mode for development
npm run watch

# Build standalone server
npm run build

# Package VSIX
npx vsce package

Requirements

  • Node.js 18+
  • TypeScript 5.3+
  • Code for IBM i extension (for VS Code mode)

Known Issues

  • edit_member_source requires exact whitespace matching for fixed-format sources
  • Large source members may take longer to process
  • SQL execution timeout is 30 seconds

Contributing

Contributions welcome! Please open issues or PRs on GitHub.

License

MIT License - see LICENSE file for details

Credits

Built by dibari62 for the IBM i development community.

Powered by:


Enjoy AI-powered IBM i development! 🚀

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选