sap-abap-mcp
sap-abap-mcp
IBM Bob を SOAP/RFC および SAP WebGUI (ITS) 経由で任意の SAP ABAP システムに接続するカスタム MCP サーバーです。
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 で、command を npx から node に、args を ["./build/index.js"] に変更します。
3. SAP 接続情報を環境変数として設定する
これら 5 つの変数は、サーバーに対し、どの SAP システムに接続してどのようにログインするかを指示します。 各人が自分の情報を設定してください — 資格情報を共有してはなりません。
Variable | Required | Description | Example |
| ✅ 必須 | お使いの SAP システムの完全な WebGUI URL |
|
| ✅ 必須 | SAP クライアント番号 |
|
| ✅ 必須 | お使いの SAP ユーザー名 |
|
| ✅ 必須 | お使いの SAP パスワード |
|
| ❌ 任意 | ログオン言語(デフォルト: |
|
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"⚠️ 必須の変数が 1 つでも欠けている場合、サーバーは起動を拒否し、明確なエラーメッセージを出力します。
4. Bob で sap-abap-mcp フォルダを開く
Bob はワークスペースのルートにある .bob/mcp.json を自動的に検出し、サーバーに接続します。
SAP ツールは Bob のツールリストにすぐに表示されます。
利用可能なツール
Tool | Description |
| SAP WebGUI 経由でログインします(セッションを確立します) |
| 任意の SAP トランザクションコード (SE16、SM30、SU01、…) に移動します |
| 任意の透過 SAP テーブルを参照します — ログインは不要です |
| 本格的なテーブルリーダー: フィールド選択、WHERE フィルター、ページネーション |
| SA38 経由で ABAP レポート / プログラムを実行します |
| 現在の WebGUI セッションに OK コード / トランザクションコマンドを送信します |
| 任意の 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/RFC(
sap_rfc_read_table、sap_se16_browse): HTTP ベーシック認証による SOAP 経由でRFC_READ_TABLEを使用します — ステートレスで、ログインセッションは不要です。WebGUI セッション(
sap_login、sap_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 にコミットされるファイルに実際の資格情報を決して追加しないでください。
Available Tools
7 toolssap_execute_commandA
Submit an arbitrary command string (OK code / transaction) to the current SAP WebGUI session, as if typed in the command field.
Inputs: command (required).
sap_get_pageC
Fetch any SAP WebGUI URL and return the rendered page text.
Inputs: url_path (required).
sap_loginA
Log in to the SAP system via WebGUI. Must be called before using any other SAP tool. Returns the welcome screen text on success.
Inputs: password, username.
sap_rfc_read_tableA
Read data from any SAP transparent database table using RFC_READ_TABLE over SOAP. Supports field selection, WHERE filters, row limits and offsets. No session required — uses Basic Auth directly.
Inputs: table_name (required), where, fields, max_rows, +1 more.
sap_run_reportC
Run an ABAP report or program via the SA38 / SE38 transaction.
Inputs: program (required), parameters.
sap_se16_browseA
Browse a database table via SE16 (Data Browser). Returns the first page of table contents as text.
Inputs: table_name (required), max_rows.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Several tools have fuzzy boundaries: sap_se16_browse and sap_rfc_read_table both read table data, while sap_navigate, sap_execute_command, and sap_get_page all retrieve rendered SAP pages and can be used to reach transactions. An agent would need to read descriptions very carefully to reliably pick the right tool.
All tools share a sap_ prefix and snake_case style, which helps, but the internal pattern is inconsistent: sap_navigate is a bare verb, sap_se16_browse leads with a transaction code, and sap_rfc_read_table mixes technical context with the action. It is readable but not a uniform verb_noun convention.
Seven tools is a reasonable size for an SAP interaction server and not bloated overall. However, the set could be tightened because some tools are near-duplicates in functionality, such as the two table-reading paths and the multiple page-fetching mechanisms.
Core workflows like login, navigation, table reads, and running reports are covered, but there is no logout or explicit session-management tool, and report output is only exposed as raw page text. Agents can work around some gaps via execute_command or get_page, but the surface is not fully lifecycle-complete.
Maintenance
Related MCP Connectors
Cloud-hosted MCP server for secure AI access to enterprise data sources via CData Connect AI.
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
MCP server that lets your AI assistant build and deploy apps, hosting each one at a live URL.
MCP server providing AI assistants with integration capabilities for QuickBooks Online.
Related MCP Servers
- FlicenseBqualityNot gradedmaintenanceAn 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-
- AlicenseAqualityBmaintenanceAn MCP server that enables AI assistants to interact with SAP GUI for Windows through the SAP GUI Scripting API.61505 PyPI61MIT

dassian-adtofficial
AlicenseNot gradedqualityCmaintenanceMCP server for SAP ABAP development via the ADT API. Connect AI assistants to your SAP system — read, write, test, and deploy ABAP code without SAP GUI.22MIT- AlicenseNot gradedqualityDmaintenanceAn 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.3MIT