Skip to content

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

PriorityRead ThisWhy It Matters
1What is a MCPBuilds the foundation: MCP architecture, tool model, and transport types (http vs stdio).
2MCP Servers in the SAP EcosystemHelps you choose the right SAP-relevant MCP servers (official vs community) for your scenario.
3MCP Server Configuration in SAP EcosystemShows secure and production-friendly configuration patterns, including credential handling and safety flags.

Reading Outcomes

After the reading, you should be able to:

  1. Explain what MCP does in an SAP AI-assisted workflow.
  2. Configure SAP MCP servers without hardcoding credentials.
  3. 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:

Eclipse quick steps (manual)

  1. Open Window -> Preferences -> GitHub Copilot -> MCP Servers.
  2. Add a server entry named arc1.
  3. Use npx as command and -y, arc-1@0.9.11 as arguments.
  4. Set the SAP environment variables.
  5. Save and verify that arc1 is visible/available in Copilot chat tools.
  6. 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
json
{
  "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
  1. Open PowerShell
  2. Create a new folder: mkdir mcp-server-arc-1
  3. Navigate into it: cd mcp-server-arc-1
  4. Install arc-1 locally: npm install -l arc-1@0.9.11
  5. In Eclipse, update the MCP configuration: change command from npx to C:/YOUR_PATH_TO_ARC-1/node_modules/.bin/arc-1.cmd
  6. 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:

text
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.

Copyright © MSG Systems Romania AI Labs