MCP ABAP ADT
mcp-abap-adt: ABAP 開発ツール (ADT) へのゲートウェイ
このプロジェクトは、モデルコンテキストプロトコル(MCP)を使用してSAP ABAPシステムと連携できるサーバーを提供します。これは、 Cline (VS Codeの拡張機能)などのツールがABAPシステムと通信し、ソースコードやテーブル構造などの情報を取得するためのブリッジと考えてください。まるでABAP開発環境をリモコンで操作できるようなものです。
このガイドは初心者向けに設計されているため、ステップバイステップですべてを解説します。以下の内容をカバーします。
**前提条件:**開始する前に必要なもの。
**インストールとセットアップ:**すべてを稼働させます。
**サーバーの実行:**さまざまなモードでサーバーを起動します。
**Cline との統合:**このサーバーを Cline VS Code 拡張機能に接続します。
**トラブルシューティング:**一般的な問題と解決策。
**使用可能なツール:**使用できるコマンドのリスト。
1. 前提条件
始める前に、いくつか必要なものがあります:
**SAP ABAP システム:**このサーバーは既存の ABAP システムに接続します。以下のものが必要です。
システムの URL (例:
https://my-sap-system.com:8000)そのシステムの有効なユーザー名とパスワード。
SAP クライアント番号 (例:
100)。SAPシステムがADT(ABAP開発ツール)経由の接続を許可していることを確認してください。通常、必要なサービスがトランザクション
SICFで有効化されていることを確認する必要があります。この作業は、Basis管理者にご相談ください。具体的には、以下のサービスが有効化されている必要があります。/sap/bc/adt
GetTableContentsツールを使用するには、カスタムサービス/z_mcp_abap_adt/z_tablecontentの実装が必要です。 こちらのガイドに従ってください。
**Git(またはGitHub Desktop):**プロジェクトコードのダウンロードにはGitを使用します。以下の2つの方法があります。
**Git:**コマンドラインツール。Gitをダウンロードしてください。お使いのオペレーティングシステム(Windows、macOS、Linux)のバージョンを選択してください。インストール手順に従ってください。
GitHub Desktop: Gitのグラフィカルユーザーインターフェース。初心者にも使いやすくなりました! GitHub Desktopをダウンロードしてください。インストール手順に従ってください。
Node.js と npm: Node.js は、Web ブラウザーの外部で JavaScript コードを実行できる JavaScript ランタイムです。npm (Node Package Manager) は Node.js に含まれており、パッケージ (コードのライブラリ) をインストールするために使用されます。
Node.js をダウンロードしてください。LTS **(長期サポート)バージョンを選択してください。**これは最も安定したバージョンです。お使いのオペレーティングシステムのインストール手順に従ってください。インストールには必ず npm を含めてください(通常はデフォルトで含まれています)。
インストールの確認: Node.js をインストールした後、新しいターミナル (Windows の場合はコマンド プロンプト、macOS/Linux の場合はターミナル) を開き、次のように入力します。
node -v npm -vNode.jsとnpmの両方のバージョン番号が表示されます。エラーが表示される場合は、Node.jsが正しくインストールされていないか、システムのPATHに存在しない可能性があります。(下記のトラブルシューティングをご覧ください。)
Related MCP server: ABAP-ADT-API MCP-Server
2. インストールとセットアップ
それでは、プロジェクト コードを取得して設定してみましょう。
Smithery経由でインストール
Smithery経由で Cline 用の MCP ABAP 開発ツール サーバーを自動的にインストールするには:
npx -y @smithery/cli install @mario-andreschak/mcp-abap-adt --client cline手動インストール
リポジトリをクローンします。
Git の使用 (コマンドライン):
ターミナル (コマンド プロンプトまたはターミナル) を開きます。
プロジェクトを保存したいディレクトリに移動します。例えば、デスクトップに保存する場合は以下の手順を実行します。
cd Desktopリポジトリをクローンします。
git clone https://github.com/mario-andreschak/mcp-abap-adtプロジェクト ディレクトリに変更します。
cd mcp-abap-adt # Or whatever the folder name is
GitHub デスクトップの使用:
GitHub デスクトップを開きます。
「ファイル」→「リポジトリのクローン作成...」をクリックします。
「URL」タブにリポジトリの URL を貼り付けます。
ローカル パス (コンピューター上でプロジェクトを保存する場所) を選択します。
「クローン」をクリックします。
**依存関係のインストール:**プロジェクトに必要なすべてのライブラリをダウンロードします。ターミナルのルートディレクトリで以下を実行します。
npm installこれには数分かかる場合があります。
**プロジェクトをビルドします。**これにより、コードが実行可能形式にコンパイルされます。
npm run build**
.envファイルを作成します。**このファイルには、SAP 認証情報などの機密情報が保存されます。このファイルを安全に保管することは非常に重要です。ルート ディレクトリに、
.env(拡張子なし) という名前の新しいファイルを作成します。テキスト エディター (メモ帳、VS Code など) で
.envファイルを開きます。次の行を追加し、プレースホルダーを実際の SAP システム情報に置き換えます。重要: パスワードに「#」文字が含まれている場合は、パスワードを引用符で囲んでください。
SAP_URL=https://your-sap-system.com:8000 # Your SAP system URL SAP_USERNAME=your_username # Your SAP username SAP_PASSWORD=your_password # Your SAP password SAP_CLIENT=100 # Your SAP client重要:
.envファイルを他のユーザーと共有したり、Git リポジトリにコミットしたりしないでください。
3. サーバーの実行
公平を期すために言うと、このサーバーを単独で「実行」することは通常ありません。ClineやClaude DesktopなどのMCPクライアントに統合されることを想定しています。ただし、主に2つの方法で手動でサーバーを実行できます。
**スタンドアロンモード:**サーバーを直接実行し、ターミナルにメッセージを出力します。サーバーは起動してクライアント接続を待機するため、起動を確認する以外は役に立たない可能性があります。
開発/デバッグモード: MCPインスペクターを使ってサーバーを実行します。出力されたURLをブラウザで開いて、実際に操作してみましょう。
3.1 スタンドアロンモード
サーバーをスタンドアロン モードで実行するには、ターミナル (ルート ディレクトリから) で次のコマンドを使用します。
npm run startターミナルにサーバーが起動していることを示すメッセージが表示されます。サーバーはMCPクライアントからの接続を待機します。サーバーは停止するまで(通常はCtrl+Cで停止します)、起動し続けます。
3.2 開発/デバッグモード(インスペクター付き)
このモードはデバッグに役立ちます。
サーバーをデバッグモードで起動します。
npm run devこれによりサーバーが起動し、次のようなメッセージが出力されます:
🔍 MCP Inspector is up and running at http://localhost:5173 🚀。これは、ブラウザでMCPインスペクターを開くために使用するURLです。
4. Clineとの統合
Clineは、MCPサーバーを使用して言語サポートを提供するVS Code拡張機能です。このABAPサーバーをClineに接続する方法は次のとおりです。
**Cline をインストールします。**まだインストールしていない場合は、VS Code に「Cline」拡張機能をインストールします。
Cline 設定を開きます:
VS Code 設定を開きます ([ファイル] -> [設定] -> [設定]、または Ctrl+,)。
「Cline MCP 設定」を検索します。
「settings.jsonで編集」
cline_mcp_settings.jsonクリックします。cline_mcp_settings.jsonファイルが開きます。フルパスは通常、C:\Users\username\AppData\Roaming\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json(usernameWindowsユーザー名に置き換えてください)のようになります。
サーバー設定の追加:
cline_mcp_settings.jsonファイルのservers配列にエントリを追加する必要があります。以下に例を示します。{ "mcpServers": { "mcp-abap-adt": { "command": "node", "args": [ "C:/PATH_TO/mcp-abap-adt/dist/index.js" ], "disabled": true, "autoApprove": [] } // ... other server configurations ... } }接続をテストします:
Clineは自動的にサーバーに接続します。「MCPサーバー」パネルにサーバーが表示されます(Cline拡張機能では、上部に別のボタンがあります)。
Clineにプログラムのソースコードを取得するように依頼すると、MCPサーバーについて言及され、対応するツールを使用するように求められる。
5. トラブルシューティング
node -vまたはnpm -v実行するとエラーが発生します:Node.jsが正しくインストールされていることを確認してください。再インストールしてみてください。
Node.jsのインストールディレクトリがシステムのPATH環境変数に含まれていることを確認してください。Windowsでは、システムプロパティから環境変数を編集できます(スタートメニューで「環境変数」を検索してください)。
npm installが失敗します:インターネット接続があることを確認してください。
node_modulesフォルダを削除して、npm install再度実行してみてください。プロキシを使用している場合は、npm でプロキシを使用するように設定する必要があるかもしれません。「npm proxy 設定」でオンライン検索してください。
Cline がサーバーに接続できません:
cline_mcp_settings.jsonの設定を再確認してください。root-serverディレクトリへの正しい絶対パスを指定し、Windowsの場合は二重のバックスラッシュを使用する必要があります。サーバーが実行中であることを確認します (確認するには
npm run startを使用します)。VS Code を再起動します。
あるいは:
エクスプローラーでmcp-abap-adtのルートフォルダに移動し、Shiftキーを押しながら右クリックして「Powershellをここで開く」を選択します。(またはPowershellを開き、
cd C:/PATH_TO/mcp-abap-adt/使用してフォルダに移動します。「npm install」を実行します
「npm run build」を実行します
「npx @modelcontextprotocol/inspector node dist/index.js」を実行します。
出力されたURLでブラウザを開き、左側の「接続」をクリックします。
上部の「ツール」をクリックし、「ツール一覧」をクリックします
GetProgramをクリックし、右側のプログラム名として「SAPMV45A」またはその他のレポート名を入力します。
テストして出力を確認する
SAP 接続エラー:
.envファイルで SAP 資格情報を確認します。SAP システムが実行中であり、ネットワークからアクセスできることを確認します。
SAP ユーザーが ADT サービスにアクセスするために必要な権限を持っていることを確認してください。
トランザクション
SICFで必要な ADT サービスが有効化されていることを確認します。自己署名証明書を使用している場合、または SAP システムの http 構成に問題がある場合は、上記のように TLS_REJECT_UNAUTHORIZED を必ず設定してください。
6. 利用可能なツール
このサーバーは、Cline (またはその他の MCP クライアント) を通じて使用できる次のツールを提供します。
ツール名 | 説明 | 入力パラメータ | 使用例(Cline の場合) |
| ABAP プログラムのソース コードを取得します。 |
|
|
| ABAP クラスのソースコードを取得します。 |
|
|
| ABAP 関数グループのソース コードを取得します。 |
|
|
| ABAP ファンクション モジュールのソース コードを取得します。 |
|
|
| ABAP 構造を取得します。 |
|
|
| ABAP テーブル構造を取得します。 |
|
|
| ABAP テーブルの内容を取得します。 |
|
|
| ABAP パッケージの詳細を取得します。 |
|
|
| ABAP 型情報を取得します。 |
|
|
| ABAPインクルードソースコードを取得する |
|
|
| クイック検索を使用して ABAP オブジェクトを検索します。 |
|
|
| ABAP インターフェースのソースコードを取得します。 |
|
|
| ABAP トランザクションの詳細を取得します。 |
|
|
Available Tools
13 toolsGetClassB
Retrieve ABAP class source code
Inputs: class_name (required).
GetFunctionB
Retrieve ABAP Function Module source code
Inputs: function_name (required), function_group (required).
GetFunctionGroupC
Retrieve ABAP Function Group source code
Inputs: function_group (required).
GetIncludeB
Retrieve ABAP Include Source Code
Inputs: include_name (required).
GetInterfaceC
Retrieve ABAP interface source code
Inputs: interface_name (required).
GetPackageB
Retrieve ABAP package details
Inputs: package_name (required).
GetProgramB
Retrieve ABAP program source code
Inputs: program_name (required).
GetStructureC
Retrieve ABAP Structure
Inputs: structure_name (required).
GetTableB
Retrieve ABAP table structure
Inputs: table_name (required).
GetTableContentsC
Retrieve contents of an ABAP table
Inputs: table_name (required), max_rows.
GetTransactionC
Retrieve ABAP transaction details
Inputs: transaction_name (required).
GetTypeInfoC
Retrieve ABAP type information
Inputs: type_name (required).
SearchObjectC
Search for ABAP objects using quick search
Inputs: query (required), maxResults.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Every tool has a clearly distinct purpose targeting specific ABAP object types or operations. The 'Get' tools each retrieve different ABAP artifacts (class, function, interface, etc.), while SearchObject provides a distinct search capability. No ambiguity exists between tools.
All tools follow a consistent verb_noun pattern with 'Get' prefix for retrieval operations and 'SearchObject' as the only exception that still maintains clear verb_noun structure. The naming is perfectly predictable and readable throughout the set.
13 tools is well-scoped for an ABAP development tool server, providing comprehensive coverage of different ABAP object types. Each tool earns its place by addressing a specific retrieval need in the ABAP domain without being overwhelming.
The server provides excellent retrieval coverage for ABAP development objects, but lacks modification capabilities (create, update, delete). For a read-only development tool interface, this is reasonable, though agents cannot perform full lifecycle operations.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
The Remote MCP server acts as a standardized bridge between LLM applications (like Claude, ChatGPT, and Cursor) and external services, enabling AI agents to access external tools and resources. Its primary capability is providing a centralized search tool to discover other MCP servers and their respective tools. Unlike local implementations, it runs remotely with OAuth authentication and permission controls for security.
The Mercado Pago MCP Server implements the Model Context Protocol to provide AI agents and LLMs with access to Mercado Pago's APIs and tools within compatible development environments. It acts as an intermediary that translates Mercado Pago resources into executable functions (tools) that AI applications can invoke to perform actions and automate flows. The server simplifies integration, enables using documentation to implement or improve code, and optimizes operations through natural language interactions without manual implementations.
Related MCP Servers
- AlicenseCqualityCmaintenanceA Model Context Protocol server that facilitates communication between ABAP systems and MCP clients, providing tools for managing ABAP objects, handling transport requests, and performing code analysis to enhance ABAP development workflows.100220 npm215MIT
- AlicenseCqualityNot gradedmaintenanceAn MCP server that facilitates seamless interaction with SAP ABAP systems to manage development objects, transport requests, and source code. It provides a comprehensive suite of tools for performing syntax checks, object searches, and code modifications via the ADT API.100-
- AlicenseCqualityNot gradedmaintenanceA Model Context Protocol server that facilitates seamless communication between ABAP systems and MCP clients for managing ABAP objects, transport requests, and code analysis. It acts as a wrapper for the ABAP ADT API to enhance the efficiency of ABAP development workflows.100-
- AlicenseCqualityDmaintenanceAn MCP server that enables seamless communication between ABAP systems and MCP clients using the ABAP Development Tools (ADT) API. It provides tools for managing ABAP objects, handling transport requests, and performing code analysis directly through MCP-compatible interfaces.100MIT