Skip to main content
Glama
JayGandhi285

sap-abap-mcp

by JayGandhi285

sap-abap-mcp

一个自定义的 MCP 服务器,通过 SOAP/RFC 和 SAP WebGUI (ITS) 将 IBM Bob 连接到任何 SAP ABAP 系统。

没有硬编码任何 SAP 系统详细信息——所有内容都通过环境变量配置,因此每个用户都使用自己的凭据连接到自己的系统。


先决条件

  • Node.js v18 或更高版本

  • Git(用于克隆)

  • 已安装 IBM Bob IDE 扩展

  • 目标系统上有效的 SAP 用户帐户


Related MCP server: MCP SAP GUI Server

设置(首次)

选项 A — 通过 npx(最简单,无需克隆)

无需安装。只需设置您的环境变量(下面的步骤 3)并在 Bob 中打开文件夹——npx 将自动下载并运行最新版本。

选项 B — 通过 GitHub 克隆(用于开发/离线使用)

git clone https://github.com/JayGandhi285/sap-abap-mcp.git
cd sap-abap-mcp
npm install
npm run build

然后在 .bob/mcp.json 中,将命令从 npx 改为 node,并将参数改为 ["./build/index.js"]

3. 将您的 SAP 连接详细信息设置为环境变量

这五个变量告诉服务器要连接到哪个 SAP 系统以及如何登录。 每个人设置自己的——切勿共享凭据。

变量

必需

描述

示例

SAP_WEBGUI_URL

✅ 是

您的 SAP 系统的完整 WebGUI URL

https://your-sap-host/sap/bc/gui/sap/its/webgui

SAP_CLIENT

✅ 是

SAP 客户端编号

100

SAP_USERNAME

✅ 是

您的 SAP 用户名

JSMITH

SAP_PASSWORD

✅ 是

您的 SAP 密码

MyPass123

SAP_LANGUAGE

❌ 可选

登录语言(默认:EN

EN

Windows PowerShell — 添加到您的 $PROFILE 以持久化:

$env:SAP_WEBGUI_URL = "https://your-sap-host/sap/bc/gui/sap/its/webgui"
$env:SAP_CLIENT     = "100"
$env:SAP_USERNAME   = "your_sap_username"
$env:SAP_PASSWORD   = "your_sap_password"
$env:SAP_LANGUAGE   = "EN"

Mac / Linux — 添加到 ~/.zshrc~/.bashrc

export SAP_WEBGUI_URL="https://your-sap-host/sap/bc/gui/sap/its/webgui"
export SAP_CLIENT="100"
export SAP_USERNAME="your_sap_username"
export SAP_PASSWORD="your_sap_password"
export SAP_LANGUAGE="EN"

⚠️ 如果缺少任何必需变量,服务器将拒绝启动并打印清晰的错误消息。

4. 在 Bob 中打开 sap-abap-mcp 文件夹

Bob 会自动检测工作区根目录中的 .bob/mcp.json 并连接到服务器。 SAP 工具将立即出现在 Bob 的工具列表中。


可用工具

工具

描述

sap_login

通过 SAP WebGUI 登录(建立会话)

sap_navigate

导航到任何 SAP 事务代码(SE16、SM30、SU01 等)

sap_se16_browse

浏览任何透明 SAP 表——无需登录

sap_rfc_read_table

全功能表读取器:字段选择、WHERE 过滤器、分页

sap_run_report

通过 SA38 运行 ABAP 报表/程序

sap_execute_command

向当前 WebGUI 会话发送 OK 代码/事务命令

sap_get_page

获取任何 SAP WebGUI URL 并返回渲染后的页面文本


Bob 中的示例提示

Show me all users in the SAP system
Read table T001 and show the company codes
Show me all failed background jobs
List all transport requests owned by RAJAT

工作原理

  • SOAP/RFCsap_rfc_read_tablesap_se16_browse):通过 SOAP 使用 RFC_READ_TABLE,采用 HTTP 基本认证——无状态,无需登录会话。

  • WebGUI 会话sap_loginsap_navigate 等):通过 SAP ITS WebGUI 执行完整登录,并将会话 cookie 保存在本地临时文件中。


项目结构

sap-abap-mcp/
├── src/
│   └── index.ts          ← MCP server source (TypeScript)
├── build/
│   └── index.js          ← Compiled output (generated — not in Git)
├── .bob/
│   └── mcp.json          ← Bob MCP config (all placeholders — safe to share)
├── .gitignore
├── package.json
├── tsconfig.json
└── README.md

源代码更改后重新构建

npm run build

然后在 Bob 中:设置 → MCP → 重启服务器


更新到最新版本

git pull
npm install
npm run build

安全说明

  • ✅ 源代码中没有任何地方硬编码凭据或系统 URL。

  • .gitignore 排除了 build/node_modules/、会话文件和数据转储。

  • .bob/mcp.json 仅包含 ${ENV_VAR} 占位符——可以安全提交到 Git。

  • ⚠️ 切勿将真实凭据添加到任何会提交到 Git 的文件中。

Install Server
F
license - not found
B
quality
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

Related MCP Servers

  • F
    license
    B
    quality
    -
    maintenance
    An MCP server that enables AI assistants to interact with SAP systems via the ABAP Development Tools (ADT) REST API. It allows users to read ABAP source code, inspect DDIC objects, and execute SQL queries directly.
    66
  • A
    license
    -
    quality
    C
    maintenance
    An MCP server that connects AI assistants to SAP systems via the ADT REST API, enabling read, write, syntax-check, and activation of ABAP code directly from the chat.
    3
    MIT

View all related MCP servers

Related MCP Connectors

  • Self-hosted MCP gateway: turn any API, database or MCP server into AI connectors — no code.

  • MCP server for AI access to Swagger by SmartBear.

  • Hosted Amazon Seller and Vendor MCP server for Claude, ChatGPT, Cursor, Codex, Gemini, Copilot.

View all MCP Connectors

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/JayGandhi285/sap-abap-mcp'

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