midasol/sap-mcp-server
A Python MCP server for SAP Gateway with four read-only tools that authenticate, query, fetch one entity and list services, and one of the few here that publishes its test results.
Gateway integration rather than a generic OData bridge: the tools are organised per operation against SAP Gateway's OData surface for agents that need to read business data through it — its four tools authenticate, query, fetch one entity and list services, and none of them writes. The repository states 44 of 45 tests passing and 56% coverage in its own badges — a modest number, and more than most of this corner reports at all.
Facts
Where it sits
Who is behind it
In the atlas: maintains 1, contributes to 1@midasolmaintainer
Before choosing this
Conditions
PolicySAP API Policy 4.2026a§ 1.1, 1.2, 2.2.2from Agent access to your systemsAn MCP server uses SAP APIs to supply tools, resources or data to an agent.
- § 1.1 Published APIs. Published APIs are made available for the documented purposes identified by SAP, including integration, extensions and data exchange.
- § 1.2 Non-Published APIs. Customer and third-party applications must not access non-published APIs except where documentation permits it or SAP otherwise authorizes it.
- § 2.2.2 AI call sequences and data extraction. Outside SAP-endorsed architectures, data services or expressly identified pathways, the policy prohibits specified agentic API use and systematic or large-scale extraction.
MCP does not replace the API's documented-use boundary. Check that every endpoint is published for the intended use and whether the policy's AI-call or extraction provisions apply to the design.
SAP API Policy 4.2026a →What it declares
Every artifact
- Type
- MCP server
- Origin
- Independently maintained
As an MCP server
- Runs as
- local process
- Transport
- stdio
- Authentication
- user and password
- Tools
- 4
- Guardrails
5 quoted from README show all
OData syntax, SQL injection prevention
Always enable in production (
SAP_VERIFY_SSL=true)Sensitive data excluded from logs
Restrict file permissions:
chmod 600 .env.serverincludeTools: Only allow specific tools (whitelist)
Connections
Giving an AI agent access to the systems you run over MCP
SAP's ERP suite, run on-premise or as a private cloud edition, with its business data and processes reached over OData, RFC and the ABAP platform. For the things here it is the system a tool reads from or writes to. The public cloud edition is its own entry.
Download
Architecture
Download
README
quoted from midasol/sap-mcp-server under MIT, readSAP MCP - SAP Gateway Integration via Model Context Protocol
Complete MCP server for SAP Gateway integration, providing modular tools for SAP OData operations with AI agents.
📑 Table of Contents
- 🎯 Project Overview
- ⚡ Quick Start
- 📐 Architecture
- 📦 Repository Structure
- ✨ Features
- 🎓 SAP SFLIGHT Demo Scenario
- 🚀 Getting Started
- 🤖 Integration with Gemini CLI
- 🔧 Available Tools
- 📚 Usage Examples
- 🔒 Security
- 📖 Documentation
- 📝 License
- 🙏 Acknowledgments
🎯 Project Overview
Production-ready MCP (Model Context Protocol) server that enables AI agents and applications to interact with SAP Gateway systems through a clean, modular architecture. Built for reliability, security, and developer experience.
Current Status: ✅ Production Ready (All 5 phases completed)
Key Highlights
- 🔐 Secure SAP Integration: Enterprise-grade authentication and SSL/TLS support
- 🛠️ 4 Modular Tools: Authentication, query, entity retrieval, service discovery
- 🚀 Stdio Transport: Production-ready MCP server
- 📊 Structured Logging: JSON and console formats with performance metrics
- ✅ Validated Inputs: Comprehensive OData and security validation
- 🧪 Well-Tested: 56% coverage, 44/45 tests passing (98% success rate)
⚡ Quick Start
Get up and running with SAP MCP in 5 minutes:
# 1. Clone and navigate to project
git clone <repository-url>
cd sap-mcp
# 2. Create virtual environment and install
python3 -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
cd packages/server
pip install -e .
# 3. Configure SAP connection
cd ../..
cp .env.server.example .env.server
# Edit .env.server with your SAP credentials
# 4. Configure services
cp packages/server/config/services.yaml.example packages/server/config/services.yaml
# Edit services.yaml with your SAP services
# 5. Run the server
sap-mcp-server-stdio
Next Steps:
- 📖 See Getting Started for detailed installation instructions
- 🤖 Check Integration with Gemini CLI to connect with AI agents
- 🔧 Explore Available Tools for API documentation
📐 Architecture
System Overview
📊 Click to view System Overview Diagram
Component Details
🔧 Click to view Component Details Diagram
Data Flow: Order Query Example
🔄 Click to view Data Flow Diagram
Tool Execution Flow
⚡ Click to view Tool Execution Flow Diagram
Security Architecture
🔒 Click to view Security Architecture Diagram
📦 Repository Structure
sap-mcp/
├── packages/
│ └── server/ ✅ Production-Ready MCP Server
│ ├── src/sap_mcp_server/
│ │ ├── core/ # SAP client & auth (4 files)
│ │ │ ├── __init__.py # Module initialization
│ │ │ ├── sap_client.py # OData operations
│ │ │ ├── auth.py # Credential management
│ │ │ └── exceptions.py # Custom exceptions
│ │ ├── config/ # Configuration (4 files)
│ │ │ ├── __init__.py # Module initialization
│ │ │ ├── settings.py # Environment config
│ │ │ ├── loader.py # YAML loader
│ │ │ └── schemas.py # Pydantic models
│ │ ├── protocol/ # MCP protocol (2 files)
│ │ │ ├── __init__.py # Module initialization
│ │ │ └── schemas.py # Request/Response schemas
│ │ ├── tools/ # 4 modular SAP tools (6 files)
│ │ │ ├── __init__.py # Tool registry
│ │ │ ├── base.py # Tool base class
│ │ │ ├── auth_tool.py # Authentication
│ │ │ ├── query_tool.py # OData queries
│ │ │ ├── entity_tool.py # Entity retrieval
│ │ │ └── service_tool.py # Service discovery
│ │ ├── transports/ # Transport layer (2 files)
│ │ │ ├── __init__.py # Module initialization
│ │ │ └── stdio.py # Stdio transport ✅
│ │ ├── utils/ # Utilities (3 files)
│ │ │ ├── __init__.py # Module initialization
│ │ │ ├── logger.py # Structured logging
│ │ │ └── validators.py # Input validation
│ │ └── __init__.py # Package initialization
│ ├── config/ # Server configuration
│ │ ├── services.yaml # SAP services config
│ │ └── services.yaml.example # Configuration template
│ ├── tests/ # Test suite (7 files, 56% coverage)
│ │ ├── __init__.py # Test package initialization
│ │ ├── conftest.py # Pytest fixtures
│ │ ├── unit/ # Unit tests
│ │ │ ├── __init__.py # Unit test package
│ │ │ ├── test_base.py # Base tool tests
│ │ │ └── test_validators.py # Validator tests
│ │ └── integration/ # Integration tests
│ │ ├── __init__.py # Integration test package
│ │ └── test_tool_integration.py # Tool integration tests
│ ├── pyproject.toml # Package configuration
│ └── README.md # Server package documentation
│
├── docs/ # Documentation
│ ├── architecture/ # Architecture documentation
│ │ └── server.md # Server architecture
│ └── guides/ # User guides
│ ├── configuration.md # Configuration guide
│ ├── deployment.md # Deployment guide
│ ├── troubleshooting.md # Troubleshooting guide
│ ├── odata-service-creation-flight-demo.md # OData service creation
│ └── sfight-demo-guide.md # SFLIGHT demo guide
│
├── examples/ # Example applications
│ ├── basic/ # Basic examples
│ │ └── stdio_client.py # Stdio client example
│ ├── chatbot/ # Chatbot examples
│ │ └── order_inquiry_chatbot.py # Order inquiry chatbot
│ └── README.md # Examples documentation
│
├── scripts/ # Development scripts
│ ├── create_structure.sh # Project structure creation
│ ├── migrate_code.sh # Code migration script
│ └── update_imports.py # Import update script
│
├── .env.server.example # Environment template
├── README.md # Main documentation (English)
├── README.ja.md # Japanese documentation
├── README.ko.md # Korean documentation
├── README.th.md # Thai documentation
├── README.zh-TW.md # Traditional Chinese documentation
└── README.zh-CN.md # Simplified Chinese documentation
✨ Features
Core Capabilities
🛠️ Tools
|
🚀 Transport
|
📊 Logging & Monitoring
|
🔒 Security
|
Developer Experience
- ✅ Modular Architecture: One tool per file
- ✅ Type Safety: Full type hints
- ✅ Documentation: Comprehensive guides
- ✅ Easy Setup:
pip install -e . - ✅ Hot Reload: Development mode
- ✅ Example Apps: 3 working examples
🎓 SAP SFLIGHT Demo Scenario
Scenario Overview
For convenience, this project is based on the SAP SFLIGHT Demo dataset.
The SFLIGHT dataset is a sample database provided by SAP that includes data for flight schedules, airlines, airports, and bookings. It's an excellent resource for testing and demonstrating data modeling and service creation.
This guide assumes you have an OData service exposing this dataset. The goal is to connect our SAP MCP server to this service and interact with it using AI agents or other clients.
Official SAP Documentation:
OData Service Creation Guide
This guide provides a step-by-step walkthrough for creating an OData service in an SAP system using the SAP Gateway Service Builder (SEGW) to expose the Flight scenario data available in SAP S/4HANA Fully Activated Appliance (FAA) version.
Scenario Overview
- Goal: Expose flight schedules, bookings, and related master data via an OData service.
- Scenario Data Needs: Flight schedules, dates, times, airport details, airline details, passenger details, pricing, etc.
- SAP Tables Involved:
SFLIGHT,SPFLI,SCARR,SAIRPORT,SBOOK,SCUSTOM.
Steps to Create the OData Service in SEGW
1. Access SAP Gateway Service Builder
Navigate to the SAP transaction code SEGW.
2. Create a New Project
- Click the "Create Project" button.
- Project Name: Assign a name (e.g.,
Z_TRAVEL_RECOMMENDATIONS_SRV). - Description: Provide a meaningful description.
- Package: Assign to a package (e.g.,
$TMPfor local development or a transportable package).
3. Import Data Model from DDIC Structures
This step defines your OData entities based on the underlying SAP tables.
- Right-click on the "Data Model" folder within your project.
- Select "Import" -> "DDIC Structure".
- Repeat the import process for each required table, specifying the Entity Type Name and selecting the necessary fields.
Action Required: Ensure the Key fields are correctly marked during the import process.
| DDIC Structure | Entity Type Name | Recommended Key Fields | Relevant Payload Fields (Examples) |
|---|---|---|---|
SFLIGHT | Flight | CARRID, CONNID, FLDATE | PRICE, CURRENCY, PLANETYPE, SEATSMAX, SEATSOCC |
SPFLI | Connection | CARRID, CONNID | COUNTRYFR, CITYFROM, AIRPFROM, COUNTRYTO, CITYTO, AIRPTO, DEPTIME, ARRTIME, DISTANCE |
SCARR | Airline | CARRID | CARRNAME, CURRCODE, URL |
SAIRPORT | Airport | ID | NAME, CITY, COUNTRY |
SBOOK | Booking | CARRID, CONNID, FLDATE, BOOKID | CUSTOMID, CUSTTYPE, SMOKER, LUGGWEIGHT, WUNIT, INVOICE, CLASS, FORCURAM, ORDER_DATE |
SCUSTOM | Passenger | ID | NAME, FORM, STREET, POSTCODE, CITY, COUNTRY, PHONE |
4. Define Associations and Navigation Properties
Associations link entities based on key fields. Navigation Properties allow client applications to easily traverse these relationships (e.g., using $expand).
Logical Relationships:
- 1:N: Airline <-> Flights, Airline <-> Connections, Connection <-> Flights, Flight <-> Bookings, Passenger <-> Bookings.
- N:1: Connection <-> Origin Airport, Connection <-> Destination Airport.
Steps to Create an Association:
- Right-click on "Data Model" -> "Create" -> "Association".
- Define the Association Name, Principal Entity (the 'one' side), Dependent Entity (the 'many' side), and Cardinality (e.g., 1:N).
- On the next screen, Specify Key Mapping by matching the key fields between the Principal and Dependent entities.
Specific Associations to Create:
| No. | Association Name | Principal:Dependent | Cardinality | Key Mapping |
|---|---|---|---|---|
| 1 | Assoc_Airline_Flights | Airline : Flight | 1:N | Airline.CARRID <-> Flight.CARRID |
| 2 | Assoc_Airline_Connections | Airline : Connection | 1:N | Airline.CARRID <-> Connection.CARRID |
| 3 | Assoc_Connection_Flights | Connection : Flight | 1:N | CARRID & CONNID (both ways) |
| 4 | Assoc_Flight_Bookings | Flight : Booking | 1:N | CARRID, CONNID, FLDATE (all three ways) |
| 5 | Assoc_Passenger_Bookings | Passenger : Booking | 1:N | Passenger.ID <-> Booking.CUSTOMID |
| 6 | Assoc_Connection_OriginAirport | Connection : Airport | N:1 | Connection.AIRPFROM <-> Airport.ID |
| 7 | Assoc_Connection_DestAirport | Connection : Airport | N:1 | Connection.AIRPTO <-> Airport.ID |
Navigation Properties to Create:
| Entity | Navigation Property Name | Target Entity | Used Association |
|---|---|---|---|
| Airline | ToFlights, ToConnections | Flight, Connection | Assoc_Airline_Flights, Assoc_Airline_Connections |
| Flight | ToAirline, ToConnection, ToBookings | Airline, Connection, Booking | Assoc_Airline_Flights, Assoc_Connection_Flights, Assoc_Flight_Bookings |
| Connection | ToAirline, ToFlights, ToOriginAirport, ToDestinationAirport | Airline, Flight, Airport, Airport | Assoc_Airline_Connections, Assoc_Connection_Flights, Assoc_Connection_OriginAirport, Assoc_Connection_DestAirport |
| Booking | ToFlight, ToPassenger | Flight, Passenger | Assoc_Flight_Bookings, Assoc_Passenger_Bookings |
| Passenger | ToBookings | Booking | Assoc_Passenger_Bookings |
5. Generate Runtime Objects
- Click the "Generate Runtime Objects" button (magic wand icon).
- This generates the ABAP classes: Model Provider Class (MPC) and Data Provider Class (DPC).
- Accept or adjust the default class names.
6. Implement Data Provider Class (DPC) Methods
The generated DPC extension class (e.g., ZCL_Z_TRAVEL_RECOM_DPC_EXT) is used for custom logic.
- If direct table mapping is sufficient, the base implementation may suffice.
- For custom filtering, joins, calculations, or complex Read/Create/Update/Delete (CRUD) operations, you must redefine methods like
*_GET_ENTITY(single record) and*_GET_ENTITYSET(collection) in the DPC extension class.
Here is an example of method AIRLINESET_GET_ENTITYSET:
METHOD airlineset_get_entityset.
DATA: lt_airlines TYPE TABLE OF scarr,
ls_airline TYPE scarr,
lv_filter_string TYPE string.
TRY.
lv_filter_string = io_tech_request_context->get_filter( )->get_filter_string( ).
CATCH cx_sy_itab_line_not_found.
CLEAR lv_filter_string.
ENDTRY.
" TODO: Apply filtering based on lv_filter_string"
IF lv_filter_string IS NOT INITIAL.
SELECT * FROM scarr INTO TABLE lt_airlines WHERE (lv_filter_string).
ELSE.
SELECT * FROM scarr INTO TABLE lt_airlines.
ENDIF.
LOOP AT lt_airlines INTO ls_airline.
APPEND ls_airline TO et_entityset.
ENDLOOP.
ENDMETHOD.
7. Register the Service
- Go to transaction
/IWFND/MAINT_SERVICE. - Click "Add Service".
- Enter the System Alias for your backend system (e.g.,
LOCAL). - Search for your service by the Technical Service Name (e.g.,
Z_TRAVEL_RECOMMENDATIONS_SRV). - Select the service and click "Add Selected Services".
- Assign a package and confirm.
8. Activate and Test the Service
- In
/IWFND/MAINT_SERVICE, find your newly registered service. - Ensure the ICF node is active (green light). If not, select the service, go to "ICF Node" -> "Activate".
- Select the service and click the "SAP Gateway Client" button.
- Testing in Gateway Client:
- Test entity collection retrieval: Click "EntitySets", select an EntitySet (e.g.,
AirlineCollection), and click "Execute". - Test OData features: Try query options like
$filter, and especially$expandto verify the navigation properties are working (e.g.,/FlightSet(key)?$expand=ToAirline).
- Test entity collection retrieval: Click "EntitySets", select an EntitySet (e.g.,
9. Note the Service URL
The final OData service URL will be visible in the Gateway Client. It typically follows the structure:
/sap/opu/odata/sap/Z_TRAVEL_RECOMMENDATIONS_SRV/. This URL is what client applications (like Fiori or custom mobile apps) will use to consume the SFLIGHT data.
🚀 Getting Started
Prerequisites for MCP Server
System Requirements
- Python 3.11 or higher
- pip (Python package installer)
- Git (for cloning repository)
- SAP Gateway access credentials
- Virtual environment support
Installing Python
🪟 Windows
Option 1: Microsoft Store (Recommended for Windows 10/11)
# Search for "Python 3.11" or "Python 3.12" in Microsoft Store
# Or download from python.org
Option 2: Python.org Installer
- Download from python.org/downloads
- Run installer
- ✅ Check "Add Python to PATH"
- Click "Install Now"
Verify installation:
python --version
# Should show: Python 3.11.x or higher
pip --version
# Should show: pip 23.x.x or higher
Common Issues:
- If
pythoncommand not found, usepython3orpy - If
pipnot found, install with:python -m ensurepip --upgrade
🍎 macOS
Option 1: Homebrew (Recommended)
# Install Homebrew if not installed
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install Python
brew install python@3.11
# or
brew install python@3.12
Option 2: Python.org Installer
- Download from python.org/downloads/macos
- Open the
.pkgfile - Follow installation wizard
Verify installation:
python3 --version
# Should show: Python 3.11.x or higher
pip3 --version
# Should show: pip 23.x.x or higher
Note: macOS may have Python 2.7 pre-installed. Always use python3 and pip3 commands.
🐧 Linux
Ubuntu/Debian:
# Update package list
sudo apt update
# Install Python 3.11+
sudo apt install python3.11 python3.11-venv python3-pip
# Or for latest Python
sudo apt install python3 python3-venv python3-pip
Fedora/RHEL/CentOS:
# Install Python 3.11+
sudo dnf install python3.11 python3-pip
# Or
sudo yum install python3 python3-pip
Arch Linux:
sudo pacman -S python python-pip
Verify installation:
python3 --version
# Should show: Python 3.11.x or higher
pip3 --version
# Should show: pip 23.x.x or higher
1. Installation
Step-by-Step Installation
🪟 Windows (PowerShell/Command Prompt)
# Clone repository
git clone <repository-url>
cd sap-mcp
# Create virtual environment
python -m venv .venv
# Activate virtual environment
.venv\Scripts\activate
# Or in PowerShell:
# .venv\Scripts\Activate.ps1
# If you get execution policy error in PowerShell:
# Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
# Verify activation (you should see (.venv) in prompt)
# (.venv) PS C:\path\to\sap-mcp>
# Install server package
cd packages\server
pip install -e .
# Install development dependencies (optional)
pip install -e ".[dev]"
# Verify installation
sap-mcp-server-stdio --help
Common Windows Issues:
pythonnot found: Trypython3orpy- Permission denied: Run PowerShell as Administrator
- Execution policy: Run
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser - Long path support: Enable long paths in Windows (Settings > System > About > Advanced system settings)
🍎 macOS (Terminal)
# Clone repository
git clone <repository-url>
cd sap-mcp
# Create virtual environment
python3 -m venv .venv
# Activate virtual environment
source .venv/bin/activate
# Verify activation (you should see (.venv) in prompt)
# (.venv) user@macbook sap-mcp %
# Install server package
cd packages/server
pip install -e .
# Install development dependencies (optional)
pip install -e ".[dev]"
# Verify installation
sap-mcp-server-stdio --help
# Check installation path (useful for Gemini CLI setup)
which sap-mcp-server-stdio
# Example output: /Users/username/sap-mcp/.venv/bin/sap-mcp-server-stdio
Common macOS Issues:
pythonnot found: Usepython3insteadpipnot found: Usepip3instead- Permission denied: Don't use
sudowith virtual environments - Command not found after install: Ensure virtual environment is activated
🐧 Linux (Bash/Zsh)
# Clone repository
git clone <repository-url>
cd sap-mcp
# Create virtual environment
python3 -m venv .venv
# Activate virtual environment
source .venv/bin/activate
# Verify activation (you should see (.venv) in prompt)
# (.venv) user@linux:~/sap-mcp$
# Install server package
cd packages/server
pip install -e .
# Install development dependencies (optional)
pip install -e ".[dev]"
# Verify installation
sap-mcp-server-stdio --help
# Check installation path (useful for Gemini CLI setup)
which sap-mcp-server-stdio
# Example output: /home/username/sap-mcp/.venv/bin/sap-mcp-server-stdio
Common Linux Issues:
python3-venvnot found: Install withsudo apt install python3-venv- Permission denied: Don't use
sudowith virtual environments - SSL errors: Install certificates:
sudo apt install ca-certificates - Build dependencies missing: Install with
sudo apt install build-essential python3-dev
2. Configuration
The SAP MCP server requires two configuration files:
.env.server: SAP connection credentials (one SAP system)services.yaml: SAP Gateway Services and authentication settings
2.1. SAP Connection Configuration (.env.server)
⚠️ IMPORTANT: As of v0.2.0,
.env.serverhas been consolidated to the project root directory only. The previouspackages/server/.env.serverlocation is no longer supported.
File Location: .env.server must be in the project root directory.
sap-mcp/
├── .env.server ← Configuration file (ONLY location - create here)
├── .env.server.example ← Example template
├── packages/
│ └── server/
└── README.md
Setup Steps:
🪟 Windows (PowerShell/Command Prompt)
# Navigate to project root
cd C:\path\to\sap-mcp
# Copy environment template
copy .env.server.example .env.server
# Edit configuration with your SAP credentials using Notepad
notepad .env.server
# Or use your preferred editor:
# code .env.server (VS Code)
# notepad++ .env.server (Notepad++)
# Note: File permissions are managed differently on Windows
# Ensure the file is not in a public folder
# Right-click .env.server > Properties > Security to restrict access
Windows-Specific Notes:
- Use backslashes (
\) for paths in Windows - PowerShell execution policies may block scripts (see installation section)
- Store
.env.serverin a user folder with restricted access - Use Windows Defender exclusions if antivirus blocks the file
🍎 macOS (Terminal)
# Navigate to project root
cd /path/to/your/sap-mcp
# Copy environment template
cp .env.server.example .env.server
# Edit configuration with your SAP credentials
nano .env.server
# Or use your preferred editor:
# vim .env.server
# code .env.server (VS Code)
# open -a TextEdit .env.server
# Set proper permissions (recommended for security)
chmod 600 .env.server
# Verify permissions
ls -la .env.server
# Should show: -rw------- (only owner can read/write)
macOS-Specific Notes:
- File permissions are Unix-based (same as Linux)
chmod 600ensures only your user can read/write the file- macOS may have additional security prompts for first-time access
- Store in your home directory for best security
🐧 Linux (Bash/Zsh)
# Navigate to project root
cd /path/to/your/sap-mcp
# Copy environment template
cp .env.server.example .env.server
# Edit configuration with your SAP credentials
nano .env.server
# Or use your preferred editor:
# vim .env.server
# code .env.server (VS Code)
# gedit .env.server (GNOME)
# Set proper permissions (REQUIRED for security)
chmod 600 .env.server
# Verify permissions
ls -la .env.server
# Should show: -rw------- (only owner can read/write)
# Optional: Verify file is not world-readable
stat .env.server
Linux-Specific Notes:
chmod 600is critical for security (only owner can access)- SELinux/AppArmor may require additional configuration
- File must be owned by the user running the server
- Never use
sudoto edit or run with this file
Required Environment Variables:
# SAP System Connection (Single SAP System)
SAP_HOST=your-sap-host.com # SAP Gateway hostname
SAP_PORT=443 # HTTPS port (usually 443 or 8443)
SAP_USERNAME=your-username # SAP user ID
SAP_PASSWORD=your-password # SAP password
SAP_CLIENT=100 # SAP client number (e.g., 100, 800)
# Security Settings
SAP_VERIFY_SSL=false # Enable SSL certificate verification (recommended)
SAP_TIMEOUT=30 # Request timeout in seconds
# Optional: Connection Pooling
SAP_MAX_CONNECTIONS=10 # Maximum concurrent connections (optional)
SAP_RETRY_ATTEMPTS=3 # Number of retry attempts on failure (optional)
Security Best Practices:
- ✅ Never commit
.env.serverto version control (already in.gitignore) - ✅ Use strong, unique passwords
- ✅ Enable SSL verification in production (
SAP_VERIFY_SSL=true) - ✅ Restrict file permissions:
chmod 600 .env.server
2.2. SAP Gateway Services Configuration (services.yaml)
Configure SAP Gateway Services (OData services) that the MCP server can access.
Location: packages/server/config/services.yaml
# Copy example configuration
cp packages/server/config/services.yaml.example packages/server/config/services.yaml
# Edit service configuration
vim packages/server/config/services.yaml
Basic Configuration Example:
# Gateway URL configuration
gateway:
# Base URL pattern for OData services
base_url_pattern: "https://{host}:{port}/sap/opu/odata"
# Metadata endpoint suffix
metadata_suffix: "/$metadata"
# Service catalog path
service_catalog_path: "/sap/opu/odata/IWFND/CATALOGSERVICE;v=2/ServiceCollection"
# Authentication endpoint configuration
auth_endpoint:
# RECOMMENDED: Use catalog metadata (works without specific service)
use_catalog_metadata: true
# Optional: Use specific service for authentication (if catalog unavailable)
# use_catalog_metadata: false
# service_id: Z_TRAVEL_RECOMMENDATIONS_SRV
# entity_name: AirlineSet
# SAP OData Services
services:
# SFLIGHT Demo Service (Travel Recommendations)
- id: Z_TRAVEL_RECOMMENDATIONS_SRV
name: "Travel Recommendations Service (SFLIGHT)"
path: "/SAP/Z_TRAVEL_RECOMMENDATIONS_SRV"
version: v2
description: "OData service for the SFLIGHT demo dataset."
entities:
- name: AirlineSet
key_field: CARRID
description: "Airlines (e.g., LH, AA)"
default_select:
- CARRID
- CARRNAME
- CURRCODE
- URL
- name: AirportSet
key_field: ID
description: "Airports (e.g., FRA, JFK)"
default_select:
- ID
- NAME
- CITY
- COUNTRY
- name: FlightSet
key_field: "CARRID='{CARRID}',CONNID='{CONNID}',FLDATE=datetime'{FLDATE}'"
description: "Specific flights on a given date"
- name: BookingSet
key_field: "CARRID='{CARRID}',CONNID='{CONNID}',FLDATE=datetime'{FLDATE}',BOOKID='{BOOKID}'"
description: "Individual flight bookings"
# Optional: Custom headers for this service
custom_headers: {}
2.3. Authentication Endpoint Options
The auth_endpoint configuration controls how the MCP server authenticates with SAP.
Option 1: Catalog Metadata (Recommended)
gateway:
auth_endpoint:
use_catalog_metadata: true
Advantages:
- ✅ Works without requiring specific SAP Gateway Services
- ✅ More flexible and portable across SAP systems
- ✅ Service-independent authentication
- ✅ No dependency on custom service deployment
Authentication Flow:
- CSRF Token:
/sap/opu/odata/IWFND/CATALOGSERVICE;v=2/ServiceCollection - Validation:
/sap/opu/odata/IWFND/CATALOGSERVICE;v=2/$metadata
Note:
/sap/opu/odata/IWFND/CATALOGSERVICEshould be activated in Tcode SICF
Option 2: Service-Specific Authentication
gateway:
auth_endpoint:
use_catalog_metadata: false
service_id: Z_TRAVEL_RECOMMENDATIONS_SRV # Must match a service ID below
entity_name: AirlineSet # Must be an entity in that service
Advantages:
- ✅ Explicit service-based authentication
- ✅ Works when catalog service is unavailable (rare)
Disadvantages:
- ❌ Requires the specified service to be deployed
- ❌ Less flexible if service changes
- ❌ Must update config if service name changes
Authentication Flow:
- CSRF Token:
/SAP/Z_TRAVEL_RECOMMENDATIONS_SRV/AirlineSet - Validation:
/sap/opu/odata/IWFND/CATALOGSERVICE;v=2/$metadata
Recommendation: Use Option 1 (Catalog Metadata) unless you have a specific reason to use a particular service for authentication.
3. Run Server
🪟 Windows (PowerShell/Command Prompt)
# Activate virtual environment
.venv\Scripts\activate
# Or in PowerShell:
# .venv\Scripts\Activate.ps1
# Run stdio server (recommended)
sap-mcp-server-stdio
# Or directly with Python
python -m sap_mcp_server.transports.stdio
# To deactivate when done
deactivate
Windows-Specific Notes:
- Use backslash (
\) for paths - PowerShell may require execution policy change
- Server runs in current terminal window
- Press
Ctrl+Cto stop the server
🍎 macOS (Terminal)
# Activate virtual environment
source .venv/bin/activate
# Run stdio server (recommended)
sap-mcp-server-stdio
# Or directly with Python
python3 -m sap_mcp_server.transports.stdio
# To deactivate when done
deactivate
macOS-Specific Notes:
- Use
python3instead ofpython - Server runs in current terminal session
- Press
Cmd+CorCtrl+Cto stop the server - Terminal must remain open while server runs
🐧 Linux (Bash/Zsh)
# Activate virtual environment
source .venv/bin/activate
# Run stdio server (recommended)
sap-mcp-server-stdio
# Or directly with Python
python3 -m sap_mcp_server.transports.stdio
# To deactivate when done
deactivate
Linux-Specific Notes:
- Use
python3instead ofpython - Server runs in current terminal session
- Press
Ctrl+Cto stop the server - Can run in background with
nohuporsystemdservice
🤖 Integration with Gemini CLI
📖 Official Documentation: For more information about Gemini CLI, visit https://geminicli.com/
Prerequisites
- Node.js 18+ and npm installed
- SAP MCP Server installed (see Quick Start above)
- Google Account for Gemini API access
1. Install Gemini CLI
# Install Gemini CLI globally
npm install -g @google/gemini-cli
# Verify installation
gemini --version
2. Authenticate Gemini CLI
Option A: Using Gemini API Key (Recommended for Getting Started)
- Get your API key from Google AI Studio
- Set the environment variable:
export GEMINI_API_KEY="your-api-key-here"
Option B: Using Google Cloud (For Production)
# Install Google Cloud CLI first
gcloud auth application-default login
# Set your project
export GOOGLE_CLOUD_PROJECT="your-project-id"
export GOOGLE_CLOUD_LOCATION="us-central1"
3. Register SAP MCP Server
Method A: Using Absolute Path (Recommended for Virtual Environments)
If you installed the server in a virtual environment, use the absolute path to the executable:
- Find the absolute path:
# Navigate to your SAP MCP directory
cd /path/to/your/sap-mcp
# Get the absolute path
pwd
# Example output: /path/to/your/sap-mcp
- Edit
~/.gemini/settings.json:
{
"mcpServers": {
"sap-server": {
"command": "/path/to/your/sap-mcp/.venv/bin/sap-mcp-server-stdio",
"cwd": "/path/to/your/sap-mcp",
"description": "SAP Gateway MCP Server for OData integration",
"timeout": 30000,
"trust": false
}
}
}
Replace /path/to/your/sap-mcp with your actual project path.
📝 Note: The
cwd(current working directory) parameter is ABSOLUTELY CRITICAL for.env.serverfile discovery. You MUST set this to your project root directory (e.g.,/Users/username/projects/sap-mcp). If omitted or incorrect, the server will fail to load your credentials.
- Verify the path:
# Test the command works
/path/to/your/sap-mcp/.venv/bin/sap-mcp-server-stdio --help
# Verify registration
gemini mcp list
# Expected: ✓ sap-server: ... (stdio) - Connected
Method B: Using CLI Command (If installed globally)
If sap-mcp-server-stdio is in your system PATH:
# Register the server
gemini mcp add sap-server sap-mcp-server-stdio
# Verify registration
gemini mcp list
Note: This method only works if you added the virtual environment to your PATH or installed the package globally.
Method C: Using Python Module Path
Alternative approach using Python module:
{
"mcpServers": {
"sap-server": {
"command": "/path/to/your/sap-mcp/.venv/bin/python",
"args": ["-m", "sap_mcp_server.transports.stdio"],
"cwd": "/path/to/your/sap-mcp/packages/server",
"description": "SAP Gateway MCP Server",
"timeout": 30000,
"trust": false
}
}
}
4. Start Using SAP MCP with Gemini CLI
# Start Gemini CLI
gemini
# Check MCP server status
> /mcp
# View available SAP tools
> /mcp desc
# Example: Query SAP airlines
> Use the SAP tools to authenticate and show me all airlines
# Example: List available SAP services
> What SAP services are available?
# Example: Get airport details
> Retrieve details for Frankfurt airport (FRA)
Advanced Configuration
Enable Auto-Approval for Trusted Server
{
"mcpServers": {
"sap-server": {
"command": "/path/to/your/sap-mcp/.venv/bin/sap-mcp-server-stdio",
"trust": true,
"timeout": 30000
}
}
}
Note: Set "trust": true to skip approval prompts for each tool call. Only enable for trusted servers.
Filter Specific Tools
{
"mcpServers": {
"sap-server": {
"command": "/path/to/your/sap-mcp/.venv/bin/sap-mcp-server-stdio",
"includeTools": ["sap_authenticate", "sap_query"],
"excludeTools": ["sap_list_services"],
"timeout": 30000
}
}
}
Use Cases:
includeTools: Only allow specific tools (whitelist)excludeTools: Block specific tools (blacklist)- Cannot use both simultaneously
Add Environment Variables (Optional)
{
"mcpServers": {
"sap-server": {
"command": "/path/to/your/sap-mcp/.venv/bin/sap-mcp-server-stdio",
"env": {
"SAP_HOST": "${SAP_HOST}",
"SAP_USERNAME": "${SAP_USERNAME}",
"SAP_PASSWORD": "${SAP_PASSWORD}"
},
"timeout": 30000
}
}
}
Note: Environment variables in settings.json override values from .env.server. Not recommended for security reasons - prefer using .env.server file instead.
Increase Timeout for Slow Networks
{
"mcpServers": {
"sap-server": {
"command": "/path/to/your/sap-mcp/.venv/bin/sap-mcp-server-stdio",
"timeout": 60000, // 60 seconds (default: 30000)
"trust": false
}
}
}
When to increase:
- Slow network connections
- Large data queries
- Complex SAP operations
- Frequent timeout errors
Troubleshooting
Problem: Server shows "Disconnected" status
# Check MCP server status
gemini mcp list
# If you see: ✗ sap-server: sap-mcp-server-stdio (stdio) - Disconnected
Solution 1: Use absolute path (Most Common)
The command is likely in a virtual environment. Update ~/.gemini/settings.json:
{
"mcpServers": {
"sap-server": {
"command": "/path/to/your/sap-mcp/.venv/bin/sap-mcp-server-stdio",
"description": "SAP Gateway MCP Server",
"timeout": 30000,
"trust": false
}
}
}
Find your absolute path:
# Navigate to SAP MCP directory
cd /path/to/your/sap-mcp
# Get full path
pwd
# Example: /path/to/your/sap-mcp
# Verify command exists
ls -la .venv/bin/sap-mcp-server-stdio
Problem: Command not found in PATH
# Test server directly
sap-mcp-server-stdio
# Error: command not found
# Check if command exists
which sap-mcp-server-stdio
# Returns: command not found
Solution 2: Check virtual environment
# Check if virtual environment exists
ls -la .venv/bin/sap-mcp-server-stdio
# If exists, use absolute path in settings.json
# If not exists, reinstall:
cd packages/server
pip install -e .
Problem: Authentication Errors or .env.server not found
# Verify .env.server exists in PROJECT ROOT (not in packages/server/)
cat .env.server
# Required fields:
# SAP_HOST=your-host
# SAP_PORT=443
# SAP_USERNAME=your-username
# SAP_PASSWORD=your-password
# SAP_CLIENT=100
Solution 3: Verify file location and credentials
# 1. Check if .env.server is in project root
ls -la .env.server
# Should exist in: /path/to/sap-mcp/.env.server
# 2. Ensure Gemini CLI settings.json has "cwd" parameter
cat ~/.gemini/settings.json
# Must include: "cwd": "/path/to/sap-mcp"
# 3. Test authentication manually
source .venv/bin/activate
python -c "from sap_mcp_server.config.settings import get_connection_config; print(get_connection_config())"
Common Issues:
-
"Field required" errors:
.env.serveris not being loaded. Verify:- File exists in project root:
/path/to/your/sap-mcp/.env.server - Gemini CLI
settings.jsonhas correctcwdparameter - File has proper permissions:
chmod 600 .env.server
- File exists in project root:
-
401 Unauthorized errors: Fixed in v0.2.1 (2025-01-22)
- Previous Issue: SAP Gateway was rejecting requests without
sap-clientparameter - Current Status: Automatically handled - all requests include
sap-clientparameter - Verification: Ensure you have updated to v0.2.1 or later
- Manual Check: Authentication should now succeed with valid credentials
- Previous Issue: SAP Gateway was rejecting requests without
Problem: Need to re-register server
# Remove existing server configuration
rm ~/.gemini/settings.json
# Or edit manually to remove sap-server entry
Solution 4: Clean re-registration
# Method 1: Edit settings directly
vim ~/.gemini/settings.json
# Method 2: Use absolute path (recommended)
# Follow "Method A: Using Absolute Path" in section 3 above
Quick Diagnostic Steps
- Check server executable:
/path/to/sap-mcp/.venv/bin/sap-mcp-server-stdio --help
# Should show server startup messages
- Check Gemini CLI settings:
cat ~/.gemini/settings.json | grep -A 5 "sap-server"
# Verify "command" path is correct
- Test connection:
gemini mcp list
# Should show: ✓ sap-server: ... - Connected
- Test in Gemini CLI:
gemini
> /mcp
> /mcp desc
# Should list SAP tools
Available SAP Tools in Gemini CLI
Once registered, you can use these SAP tools through natural language:
| Tool | Description | Example Prompt |
|---|---|---|
| sap_authenticate | Authenticate with SAP Gateway | "Authenticate with SAP" |
| sap_query | Query SAP entities with OData filters | "Show me all airlines using the travel recommendations service" |
| sap_get_entity | Retrieve specific entity by key | "Get details for Frankfurt airport (FRA)" |
| sap_list_services | List available SAP services | "What SAP services are available?" |
Example Workflows
1. Flight Inquiry Workflow
gemini
> Connect to SAP and find all Lufthansa flights
# Gemini will:
# 1. Call sap_authenticate
# 2. Call sap_query on FlightSet with filter "CARRID eq 'LH'"
# 3. Format and present the results
2. Airport Analysis
> Get details for Frankfurt airport and show me available connections
# Gemini will:
# 1. Authenticate
# 2. Call sap_get_entity for 'FRA' on AirportSet
# 3. Call sap_query on ConnectionSet
# 4. Present insights
3. Service Discovery
> What SAP services and entity sets are available in the system?
# Gemini will:
# 1. Call sap_list_services
# 2. Format the service catalog
🔧 Available Tools
1. SAP Authenticate
Authenticate with SAP Gateway system using credentials from .env.server.
Request:
{
"name": "sap_authenticate",
"arguments": {}
}
Response:
{
"success": true,
"session_id": "abc123...",
"message": "Successfully authenticated with SAP Gateway",
"host": "example.sap.corp",
"client": "100"
}
2. SAP Query
Query SAP entities with OData filters, selection, pagination.
Request:
{
"name": "sap_query",
"arguments": {
"service": "Z_TRAVEL_RECOMMENDATIONS_SRV",
"entity_set": "AirlineSet",
"filter": "CARRID eq 'LH'",
"select": "CARRID,CARRNAME,CURRCODE",
"top": 10,
"skip": 0,
"format": "json_compact"
}
}
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
service | string | ✅ | OData service name |
entity_set | string | ✅ | Entity set name to query |
filter | string | ❌ | OData filter expression |
select | string | ❌ | Comma-separated list of fields to select |
top | integer | ❌ | Maximum number of records to return |
skip | integer | ❌ | Number of records to skip |
format | string | ❌ | Output format: json or json_compact (default: json_compact) |
Output Format Options:
| Format | Description | Token Efficiency |
|---|---|---|
json | Raw SAP OData response (includes metadata) | Low |
json_compact | Removes __metadata and __deferred navigation links | ~83% reduction ✅ |
Response (format: "json_compact" - default):
{
"results": [
{
"CARRID": "LH",
"CARRNAME": "Lufthansa",
"CURRCODE": "EUR"
}
],
"count": 1
}
Response (format: "json" - raw):
{
"d": {
"results": [
{
"__metadata": {
"id": "...",
"uri": "...",
"type": "Z_TRAVEL_RECO_SRV.Airline"
},
"CARRID": "LH",
"CARRNAME": "Lufthansa",
"CURRCODE": "EUR",
"ToFlight": { "__deferred": { "uri": "..." } }
}
]
}
}
💡 Recommendation: When integrating with AI agents, use the
json_compactformat (default) to significantly reduce token usage.
3. SAP Get Entity
Retrieve a specific entity by key.
Request:
{
"name": "sap_get_entity",
"arguments": {
"service": "Z_TRAVEL_RECOMMENDATIONS_SRV",
"entity_set": "AirportSet",
"entity_key": "'FRA'"
}
}
Response:
{
"success": true,
"service": "Z_TRAVEL_RECOMMENDATIONS_SRV",
"entity_set": "AirportSet",
"entity_key": "'FRA'",
"key_field": "ID",
"data": {
"d": {
"ID": "FRA",
"NAME": "Frankfurt International",
"CITY": "Frankfurt",
"COUNTRY": "DE",
"TIME_ZONE": "CET"
}
}
}
4. SAP List Services
List all available SAP services from configuration.
Request:
{
"name": "sap_list_services",
"arguments": {}
}
Response:
{
"success": true,
"count": 1,
"services": [
{
"id": "Z_TRAVEL_RECOMMENDATIONS_SRV",
"name": "Travel Recommendations Service (SFLIGHT)",
"path": "/SAP/Z_TRAVEL_RECOMMENDATIONS_SRV",
"version": "v2",
"description": "OData service for the SFLIGHT demo dataset.",
"entities": [
{
"name": "AirlineSet",
"key_field": "CARRID",
"description": "Airlines (e.g., LH, AA)"
},
{
"name": "AirportSet",
"key_field": "ID",
"description": "Airports (e.g., FRA, JFK)"
}
]
}
],
"source": "services.yaml configuration"
}
5. Adding a New Tool
- Create Tool File:
packages/server/src/sap_mcp_server/tools/my_tool.py
from .base import MCPTool
class MyNewTool(MCPTool):
@property
def name(self) -> str:
return "my_new_tool"
@property
def description(self) -> str:
return "Description of my new tool"
@property
def input_schema(self) -> dict:
return {
"type": "object",
"properties": {
"param": {"type": "string"}
},
"required": ["param"]
}
async def execute(self, params: dict) -> dict:
# Implementation
return {"result": "success"}
- Register Tool: Update
packages/server/src/sap_mcp_server/tools/__init__.py
from .my_tool import MyNewTool
# Add to registry
tool_registry.register(MyNewTool())
- Add Tests:
tests/unit/test_my_tool.py
import pytest
from sap_mcp_server.tools.my_tool import MyNewTool
@pytest.mark.asyncio
async def test_my_tool():
tool = MyNewTool()
result = await tool.execute({"param": "value"})
assert result["result"] == "success"
📚 Usage Examples
Using the Tool Registry
from sap_mcp_server.tools import tool_registry
from sap_mcp_server.protocol.schemas import ToolCallRequest
# List available tools
tools = tool_registry.list_tools()
for tool in tools:
print(f"- {tool.name}: {tool.description}")
# Call a tool
request = ToolCallRequest(
name="sap_list_services",
arguments={}
)
result = await tool_registry.call_tool(request)
print(result)
MCP Client Example
from mcp import StdioServerParameters
from mcp.client.session import ClientSession
from mcp.client.stdio import stdio_client
async def main():
# Connect to MCP server
server_params = StdioServerParameters(
command="python",
args=["-m", "sap_mcp_server.transports.stdio"]
)
async with stdio_client(server_params) as (read, write):
async with ClientSession(read, write) as session:
# Initialize session
await session.initialize()
# Authenticate
auth_result = await session.call_tool("sap_authenticate", {})
# Query airlines
entity_result = await session.call_tool(
"sap_query",
{
"service": "Z_TRAVEL_RECOMMENDATIONS_SRV",
"entity_set": "AirlineSet",
"filter": "CARRID eq 'LH'"
}
)
print(entity_result)
Structured Logging
from sap_mcp_server.utils.logger import setup_logging, get_logger
# Production (JSON logs)
setup_logging(level="INFO", json_logs=True)
# Development (colored console)
setup_logging(level="DEBUG", json_logs=False)
# Use logger
logger = get_logger(__name__)
logger.info("Server started", port=8080, transport="stdio")
logger.error("Query failed", error=str(e), query=params)
Input Validation
from sap_mcp_server.utils.validators import (
validate_odata_filter,
validate_entity_key,
sanitize_input
)
# Validate OData filter
if validate_odata_filter("CARRID eq 'LH'"):
# Safe to execute
pass
# Sanitize user input
safe_input = sanitize_input(user_data, max_length=1000)
# Validate entity key
if validate_entity_key(key):
# Fetch entity
pass
🔒 Security
Defense in Depth
| Layer | Implementation | Status |
|---|---|---|
| Input Validation | OData syntax, SQL injection prevention | ✅ |
| Authentication | Credential validation, session management | ✅ |
| Authorization | Service access control | ✅ |
| Transport Security | SSL/TLS, certificate verification | ✅ |
| Audit Logging | Structured logs, no sensitive data | ✅ |
Best Practices
- Credentials: Store in
.env.server, never commit to git - SSL/TLS: Always enable in production (
SAP_VERIFY_SSL=true) - Validation: All inputs validated before SAP calls
- Logging: Sensitive data excluded from logs
- Error Handling: Generic error messages to clients
📖 Documentation
📚 Guides
- Configuration Guide: Complete guide for YAML and environment configuration
- Deployment Guide: Production deployment best practices
- Troubleshooting Guide: Common issues and solutions
- OData Service Creation Guide: Step-by-step SFLIGHT OData service creation
- SFLIGHT Demo Guide: Working with SFLIGHT demo scenario
🏗️ Architecture
- Server Architecture: Detailed system architecture and design patterns
📦 Package Documentation
- Server Package README: Server package specific documentation
🌐 Multi-Language Support
- English: Main documentation (this file)
- 日本語 (Japanese): Japanese documentation
- 한국어 (Korean): Korean documentation
- ไทย (Thai): Thai documentation
- 繁體中文 (Traditional Chinese): Traditional Chinese documentation
- 简体中文 (Simplified Chinese): Simplified Chinese documentation
- Español (Spanish): Spanish documentation
📝 License
MIT License - see LICENSE file for details.
🙏 Acknowledgments
- MCP Protocol: Anthropic's Model Context Protocol
- SAP Gateway: OData v2/v4 integration
- Community: Contributors and testers
Others providing
Compare all 39 on the Agent access to your systems page →- mcp-integration-suitemcp-integration-suiteAn experimental Node MCP server covering the general CPI functions of the Integration Suite, which its author recommends running alongside the TPM server for Trading Partner Management.independent, btpMCP server for the general Integration Suite functionsfrom BTP/BAIP
- mcp-is-tpmmcp-is-tpmA Java MCP server for Trading Partner Management in the Integration Suite, where trading partners, their agreements and their B2B configuration live, paired by its author with the general server.independent, btpJava MCP server for Integration Suite Trading Partner Managementfrom BTP/BAIP
- @abap2ui5/mcp-server@abap2ui5/mcp-serverAn MCP server that puts the abap2UI5 development loop on the machine an agent runs on: check the view the ABAP builds, photograph it, deploy the class into a sandbox, boot the app headless and read the errors.community org, abapMCP server for the abap2UI5 check, deploy and run loopfrom ABAP
- abap2UI5 for VS Codeabap2UI5 for VS CodeA VS Code extension for abap2UI5 apps: F9 starts the app class in a preview beside the source, Ctrl+F3 activates the class and reloads it, and the abap2UI5 linter runs in the editor while you type.community org, abapVS Code extension to preview, activate and lint abap2UI5 appsfrom ABAP
- SF-MCPSF-MCPSixty-two purpose-built tools over SAP SuccessFactors' OData APIs — employee data, permissions, compliance reports and HR administration, asked for in plain language.independent, successfactorsMCP server with 62 tools over SAP SuccessFactors OData APIsfrom SAP SuccessFactors
- hybris-mcp-litehybris-mcp-liteA read-only MCP server that answers questions about a local SAP Commerce Cloud instance by calling HAC, so types, beans, configuration, cronjobs, logs and FlexibleSearch come back in the editor.independent, commerceRead-only MCP server over a local SAP Commerce Cloud's HACfrom SAP Commerce
- calmcpcalmcpAn MCP server in front of the SAP Cloud ALM APIs: four read tools over tasks, projects, features, documents, tests and analytics, run over stdio locally or Streamable HTTP on Cloud Foundry.independent, btpMCP server with read tools over the SAP Cloud ALM APIsfrom BTP/BAIP
- CostingGeek/sap-mcpCostingGeek/sap-mcpA Python server that fetches sales orders from SAP's business data graph and hands them to Claude Desktop — the only entry here pointed at that API rather than at one system's own services.independent, btpPython MCP server fetching sales orders from SAP's business data graphfrom BTP/BAIP
- mcp-sap-focusedrunmcp-sap-focusedrunSAP Focused Run's Landscape Management Database as MCP tools — hosts, systems, databases, cloud tenants, technical instances, ABAP clients, software components and product versions.independent, btpMCP tools over SAP Focused Run's Landscape Management Databasefrom BTP/BAIP
- abapsmithabapsmithAn MCP server that lets an LLM develop in ABAP on a live system over ADT, with writes off by default and every mutation recorded in a local journal that can undo it.independent, abapABAP MCP server over ADT with a local journal that can undo writesfrom ABAP
- cloud-alm-itsm-mcpcloud-alm-itsm-mcpQueries installations through SAP Cloud ALM's ITSM API — filtered by system type or customer number, with OAuth token handling and caching done for you.independent, btpMCP server querying installations via the SAP Cloud ALM ITSM APIfrom BTP/BAIP
- hana-mcp-serverhana-mcp-serverSchema discovery and guard-railed SQL against SAP HANA and HANA Cloud, with an optional layer of business metadata so an agent reads a coded column the way the business does.independent, btpMCP server for schema discovery and guarded SQL on SAP HANAfrom BTP/BAIP
- sap_analytics_cloud_mcpsap_analytics_cloud_mcpThe SAP Analytics Cloud REST API as ninety tools across eleven service areas — content, data import and export, user management, transport, scheduling and translation.independent, btpMCP server for the SAP Analytics Cloud REST APIfrom BTP/BAIP
- mcp-sap-cpimcp-sap-cpiThe runtime half of Cloud Integration: failed messages with their full processing logs and traces, artifact deployment, security material, and a health summary.independent, btpMCP server for Cloud Integration runtime: messages, logs, deploymentfrom BTP/BAIP
- AI Core MCP ServerAI Core MCP ServerAn MCP server that exposes SAP AI Core's APIs as tools, defined entirely in one JSON config file for a proxy, so deployments, configurations and scenarios are managed through an assistant.independent, btpSAP AI Core APIs as MCP tools from one JSON config filefrom BTP/BAIP
- BTP CF MCP ServerBTP CF MCP ServerThe Cloud Foundry V3 API on SAP BTP as MCP tools — apps, orgs, spaces, services, routes and quotas — declared in one JSON config file and run by odata-mcp-proxy.independent, btpCloud Foundry V3 API on SAP BTP as MCP toolsfrom BTP/BAIP
- BTP MCP ServerBTP MCP ServerBTP Core Services as MCP tools, and the only server in this corner that renders dashboards inside the chat — a subaccount overview with drill-down, a geomap of data-centre locations, consumption and users.independent, btpBTP Core Services as MCP tools with in-chat dashboardsfrom BTP/BAIP
- btp-sap-odata-to-mcp-serverbtp-sap-odata-to-mcp-serverExposes every OData service on an S/4HANA or ECC system as MCP tools, in three discovery levels so a large catalogue does not have to be loaded at once.independent, btpExposes S/4HANA or ECC OData services as MCP toolsfrom BTP/BAIP
- CI MCP ServerCI MCP ServerAn MCP server that exposes SAP Cloud Integration's OData APIs as tools, defined entirely in one JSON config file, so an assistant works integration content, logs and configurations in natural language.independent, btpSAP Cloud Integration OData APIs as MCP toolsfrom BTP/BAIP
- odata-mcp-proxyodata-mcp-proxyA config-driven proxy that turns OData and REST endpoints into MCP tools from a JSON file — no code — and runs on BTP Cloud Foundry against BTP Destinations.independent, btpConfig-driven proxy turning OData and REST endpoints into MCP toolsfrom BTP/BAIP
- sap-pi-mcp-serversap-pi-mcp-serverThe only entry pointed at SAP PI and PO rather than at Cloud Integration — monitoring and Integration Directory metadata from the middleware that came before.independent, btpMCP server for SAP PI and PO monitoring and directory metadatafrom BTP/BAIP
- sap-bdc-mcp-serversap-bdc-mcp-serverAn MCP server over SAP's BDC Connect SDK that creates, validates, publishes and deletes Databricks Delta shares as data products in SAP Business Data Cloud.independent, btpMCP server managing Delta shares in SAP Business Data Cloudfrom BTP/BAIP
- @mariodefe/sap-datasphere-mcp@mariodefe/sap-datasphere-mcpForty-five tools across a Datasphere tenant — discovery, metadata, analytics, ETL extraction, database users, lineage and column profiling — with config-driven PII masking applied before anything reaches the model.independent, btpMCP server with forty-five tools across a Datasphere tenantfrom BTP/BAIP
- odata_mcp_goodata_mcp_goA Go binary that bridges any OData v2 or v4 service to MCP — and can collapse the whole service into one tool when the generated tool list is too large to be usable.independent, btpGo binary bridging any OData v2 or v4 service to MCPfrom BTP/BAIP
- odata_mcpodata_mcpThe Python original: reads an OData v2 service's metadata and generates MCP tools from it, with the SAP-specific conversions the raw protocol leaves to you.independent, btpPython bridge generating MCP tools from OData v2 metadatafrom BTP/BAIP
- sap-bdc-mcpsap-bdc-mcpDiscovery and contract tooling for SAP Business Data Cloud — ORD discovery, CSN contract checks and non-executing share planning — behind redaction, policy gates and bounded output.independent, btpMCP tooling for SAP Business Data Cloud discovery and contractsfrom BTP/BAIP
- mcp-sap-datasphere-servermcp-sap-datasphere-serverThe read-only Datasphere server: explore spaces, list assets, preview rows, profile columns and summarise analytical models — and nothing that changes anything, by design.independent, btpRead-only MCP server for exploring SAP Dataspherefrom BTP/BAIP
- sap-mcp-serversap-mcp-serverReads SAP ECC and S/4HANA for an agent over Gateway OData and RFC, with a Node bridge that speaks the RFC protocol without the proprietary SAP NetWeaver RFC SDK.independent, abapReads SAP ECC and S/4HANA for an agent over Gateway OData and RFC, with a Node bridge that speaks the RFC protocol without the proprietary SAP NetWeaver RFC SDK.from ABAP
- cap-mcp-bridgecap-mcp-bridgePoints at a running CAP or OData V4 service, reads its $metadata, and turns what it finds into MCP tools — list, describe, query with validated filters, expand, and invoke functions and actions.independent, capMCP server generating tools from a CAP or OData V4 service's metadatafrom CAP
- MCP Server for SAP BTP AdministrationMCP Server for SAP BTP AdministrationSAP-hosted MCP endpoint that exposes BTP account administration — accounts, security, services and connectivity — as tools an AI client discovers and calls on your behalf.sap official, btpSAP-hosted MCP endpoint for BTP account administrationfrom BTP/BAIP
- SAP LeanIX MCP ServerSAP LeanIX MCP ServerHosted MCP endpoint onto an SAP LeanIX instance, exposing selected enterprise-architecture APIs as tools — fact sheets, applications, completeness and custom reports.sap official, btpHosted MCP endpoint onto an SAP LeanIX instancefrom BTP/BAIP
- SAP-samples/hana-cli-claude-pluginSAP-samples/hana-cli-claude-pluginA Claude Code plugin that registers the MCP server of hana-cli, so Claude Code can work on SAP HANA Cloud and on-premise SAP HANA databases.sap official, btpClaude Code plugin registering hana-cli's MCP serverfrom BTP/BAIP
- SAP-samples/hana-developer-cli-tool-exampleSAP-samples/hana-developer-cli-tool-exampleA developer-centric command line for SAP HANA, built for local development outside SAP tooling and connecting to a local, cloud or remote HANA instance the same way.sap official, btpDeveloper-centric command line for SAP HANAfrom BTP/BAIP
- Skybuffer AI MCP serverSkybuffer AI MCP serverAn ABAP add-on that serves SAP business data, transactions and development context as MCP tools from an ICF node inside SAP ECC and S/4HANA, each call running as the signed-in user under PFCG authorization checks.independent, abapABAP add-on serving business data and transactions as MCP toolsfrom ABAP
- sap-security-mcpsap-security-mcpAn entirely read-only security analysis surface: nineteen tools, five resources and eight prompts for audits, SOX and segregation-of-duties review, behind OAuth 2.0 with PKCE. The vendor hosts an endpoint, and the README documents running it yourself.independent, abapRead-only security analysis MCP server for SAP audits and SoD reviewfrom ABAP
- cpi-mcp-servercpi-mcp-serverA Go server over Cloud Integration's design-time content — integration packages and integration flows, listed and searched by id, version, name, vendor or mode.independent, btpGo MCP server over Cloud Integration packages and integration flowsfrom BTP/BAIP
- KlystronKlystronAn MCP server written in ABAP that runs inside the application server behind an ICF service and exposes typed tools for ABAP development, quality, transports, customizing, roles, Basis operations and integration, with a client-side plugin of SAP skills.independent, abapMCP server in ABAP inside the application server, with agent skillsfrom ABAP
- pyrfc-mcppyrfc-mcpAn MCP server for calling an SAP system's RFC-enabled function modules from an agent, built so that discovering a function does not authorise calling it: a read or a write is denied unless the function name matches an allowlist the server is configured with.independent, abapMCP server calling RFC-enabled function modules behind an allowlistfrom ABAP
Details
Sources
Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.
Compatibility and provenance
History in the atlas
- The whole paragraph was the policy, which Agent access to your systems carries as a condition sourced to the policy.
- The concern it answers is reaching into an SAP system from outside, split out of MCP servers on this day; the sentence on the edge is unchanged.
- corrected against the README
- Triaged out of data/crawled/mcp-candidates.json, the sap-ai-mcp-servers sweep. Written from the repository's own README; the catalogue is credited as where it was found and its words are not reused.
- First seen.
For your agent
- Ref
artifact:midasol-sap-mcp-server- JSON
- /artifacts/midasol-sap-mcp-server.json
- MCP
- Connecting an agent