Chapter 2 - MCP Server
Connect an AI agent to SAP via MCP, query live data, and handle controlled failure scenarios.
- Reading time: 20 minutes
- Practical time: 20 minutes
Reading
Read these materials before starting the hands-on part:
Briefs
| Priority | Read This | Why It Matters |
|---|---|---|
| 1 | What is a MCP | Builds the foundation: MCP architecture, tool model, and transport types (http vs stdio). |
| 2 | MCP Servers in the SAP Ecosystem | Helps you choose the right SAP-relevant MCP servers (official vs community) for your scenario. |
| 3 | MCP Server Configuration in SAP Ecosystem | Shows secure and production-friendly configuration patterns, including credential handling and safety flags. |
Reading Outcomes
After the reading, you should be able to:
- Explain what MCP does in an SAP AI-assisted workflow.
- Configure SAP MCP servers without hardcoding credentials.
- Describe core safety controls before enabling write operations.
Practical
For this chapter, use ARC-1 as the required MCP server.
IMPORTANT
This lab step is considered complete only when arc-1 is configured and available in your IDE.
Exercise 1 - Add an MCP Server to your IDE
Goal: add and validate arc1 in your IDE MCP configuration.
Option A - Eclipse (primary path)
Use Eclipse if you are following the ABAP-first workflow in this lab.
Official setup documentation:
- Manual configuration: Configuring MCP servers manually (Eclipse)
- Registry-based configuration: Configuring MCP servers from your MCP registry (Eclipse)
Eclipse quick steps (manual)
- Open Window -> Preferences -> GitHub Copilot -> MCP Servers.
- Add a server entry named
arc1. - Use
npxas command and-y,arc-1@0.9.11as arguments. - Set the SAP environment variables.
- Save and verify that
arc1is visible/available in Copilot chat tools. - If you want to test it via the copilot you need to change it from Ask to Agent Mode
How to find your SAP URL and port
- Run T-Code SICF > Find service
/DEFAULT_HOST/SAP/BC/ADT - Right-click the service → Test Service
- Copy the host and port from the URL that opens in the browser — use that as your
SAP_URL
{
"servers": {
"arc1": {
"type": "stdio",
"command": "npx",
"args": ["-y", "arc-1@0.9.11"],
"env": {
"SAP_URL": "<YOUR_SAP_URL>",
"SAP_CLIENT": "<YOUR_CLIENT>",
"SAP_USER": "<YOUR_USERNAME>",
"SAP_PASSWORD": "<YOUR_PASSWORD>",
"SAP_LANGUAGE": "EN"
}
}
}
}If you have issues accessing arc-1 via npx, install the MCP server locally instead.
How to install arc-1
- Open PowerShell
- Create a new folder:
mkdir mcp-server-arc-1 - Navigate into it:
cd mcp-server-arc-1 - Install
arc-1locally:npm install -l arc-1@0.9.11 - In Eclipse, update the MCP configuration: change
commandfromnpxtoC:/YOUR_PATH_TO_ARC-1/node_modules/.bin/arc-1.cmd - Restart Windows
Option B - VS Code
Work in Progress...
Exercise 2 - Explain RAP Behavior Definition with MCP
After configuring arc1, ask Copilot to explain the RAP Behavior Definition of I_CompanyCode by reading it from the SAP system through MCP tools.
Use this prompt in chat:
Using the configured ARC-1 MCP server, fetch and explain the RAP Behavior Definition of I_CompanyCode.
Summarize: behavior type, operations (create/update/delete), determinations/validations, actions, and authorization handling.
If dependencies are needed, fetch them via MCP and include them in the explanation.IMPORTANT
During this exercise, Copilot will request permission to execute MCP tool calls. Approve the tool requests so it can fetch the required SAP metadata.
NOTE
You can configure multiple instances of the same server for different systems by using distinct server names, e.g. vsp-abap-s4d and vsp-abap-s4h.
What's Next
Continue with Chapter 3 - Agentic AI to apply MCP-enabled workflows in end-to-end SAP development scenarios.