sap-s4hana-odata-mcp
Enables querying SAP S/4HANA Business Partner data via OData V2 API, supporting filtering, sorting, pagination, and field selection.
README
sap-s4hana-odata-mcp
An MCP (Model Context Protocol) server for querying SAP S/4HANA Business Partner data via OData V2 API. Connects directly to on-premise S/4HANA systems using Basic Authentication.
Tools
| Tool | Description |
|---|---|
list_business_partners |
List business partners with OData filtering, sorting, pagination, and field selection |
get_business_partner |
Get a specific business partner by ID with optional $expand for addresses, roles, etc. |
Setup
npm install
cp .env.example .env # then edit with your S/4HANA connection details
npm run build
Configuration
All settings are in .env:
| Variable | Required | Description | Example |
|---|---|---|---|
S4HANA_HOSTNAME |
Yes | S/4HANA application server hostname | s4hana.example.com |
S4HANA_SYSNR |
Yes | SAP system number (00-99) | 50 |
S4HANA_USE_HTTPS |
No | Use HTTPS (default: true) |
true |
S4HANA_USERNAME |
Yes | SAP technical user | TECH_USER |
S4HANA_PASSWORD |
Yes | Password | secret123 |
S4HANA_CLIENT |
No | SAP client number | 001 |
S4HANA_ODATA_PATH |
No | OData service path (default: /sap/opu/odata/sap/API_BUSINESS_PARTNER) |
/sap/opu/odata/sap/API_BUSINESS_PARTNER |
Port Calculation
The HTTP/HTTPS port is derived from the system number:
- HTTPS port =
443+ system number (e.g. sysnr50-> port44350) - HTTP port =
80+ system number (e.g. sysnr50-> port8050)
Finding Your Connection Details
Run transaction SMICM in SAP GUI to find the hostname, system number, and active ports:
- Open SAP GUI and enter tcode
SMICM - Go to Goto > Services to see the list of active HTTP/HTTPS services
- Note the hostname and port numbers — the system number is the last two digits of the port (e.g. port
44350means sysnr50)
Usage with Claude Code
Add to .claude.json:
{
"mcpServers": {
"s4hana-bp": {
"command": "node",
"args": ["/path/to/sap-s4hana-odata-mcp/dist/index.js"]
}
}
}
Example Queries
List first 10 business partners:
Show me the first 10 business partners
Search by name:
Find business partners with "SAP" in the name
Filter by category (1=Person, 2=Organization):
List all person-type business partners
Get details with address:
Get business partner 21 with their address
Tech Stack
- TypeScript
- MCP SDK
- Axios for OData HTTP calls
- Zod for input validation
- dotenv for configuration
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.