SAP Commerce MCP Server
Provides tools for interacting with SAP Commerce OCC APIs, enabling management of e-commerce operations including product catalog browsing, cart management, store lookups, customer search through ASM (Assisted Service Module), and various discovery flows for base sites, catalogs, and categories.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@SAP Commerce MCP Servershow me the stock for product code ABC123"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
SAP Commerce MCP Server
This project exposes an MCP server for SAP Commerce Cloud focused on ASM employee workflows: search a customer, impersonate them, bind or manage a cart, and complete OCC-backed commerce actions through task-oriented MCP tools.
The repo is now treated as local-first: the expected default target is https://localhost:9002, with SAP_BASE_URL controlling the actual host. Remote tenants can still be used, but the docs, tests, and validation flow should make the local SAP Commerce runtime truth-first.
What this server does now
ASM-first customer actions: search a customer, impersonate a customer, and continue acting on their behalf
Session-aware cart management: create, inspect, update, remove, and clear carts without manual cart juggling
Checkout flow: delivery address, delivery mode, guest email, and order placement
Product and discovery tools: search products, fetch details, inspect stock, browse base sites/stores/catalogs/categories
Two tool layers: high-level agent-friendly tools plus low-level OCC/ASM wrappers
Session orientation:
get_session_statushelps agents understand the current cart/user/base-site contextFastMCP transport: stdio and SSE transports for local or remote MCP clients
How a request flows
1. Architecture at a glance

Source: docs/diagrams/architecture.mmd
2. Example request swimlane
This is the typical “agent impersonates a customer, then keeps shopping on their behalf” path.

Source: docs/diagrams/example-request.mmd
MCP tools
High-level tools
These are the main contract for ASM employee workflows.
Discovery and products
search_products— keyword product discoveryget_product— fetch one product detailget_session_status— inspect current session state
Customer / ASM
search_customer— find a customer quicklyimpersonate_customer— start acting as customerend_impersonation— return to anonymous mode
Cart and checkout
add_to_cart— add one productget_cart— read current cartupdate_cart_entry— change entry quantityremove_from_cart— delete one entryclear_cart— empty the cartset_delivery_address— attach shipping addressset_delivery_mode— choose shipping methodget_delivery_modes— list shipping optionsset_guest_email— set guest checkout emailplace_order— submit the order
Low-level tools
These expose narrower OCC / ASM primitives for exact control.
basesites.list— list available base sitescatalogs.list— list catalogs for a sitecatalogs.get— fetch one catalogcatalogVersions.get— fetch one catalog versioncategories.products— browse products by categorystores.list— list stores for a sitestores.get— fetch one base storeproducts.get— fetch one OCC productproducts.stock— inspect stock dataproducts.stockCount— count stock locationsasm.customer360— fetch customer 360 fragmentsasm.customers.create— create a customerasm.customers.search— run ASM customer searchasm.customers.suggest— get customer suggestionscarts.list— list cartscarts.create— create or restore cartcarts.get— fetch one cartcarts.delete— delete one cartcartEntries.list— list cart entriescartEntries.add— add one entrycartEntries.get— fetch one entrycartEntries.update— replace entry payloadcartEntries.patch— partially update entrycartEntries.delete— delete one entry
Configuration
Install dependencies:
uv syncCopy the environment template:
cp .env.example .envFor the local SAP Commerce instance, set:
SAP_BASE_URL=https://localhost:9002Keep or adjust these path fragments if your SAP deployment differs:
OCC_API_PATH=/occ/v2OAUTH_PATH=/authorizationserver/oauth/tokenASM_PATH=/assistedservicewebservices
Configure OAuth credentials for the local tenant or remote tenant you are validating against. For the stock local sample-data setup, these are the expected defaults:
OAUTH_CLIENT_ID=mobile_android OAUTH_CLIENT_SECRET=secret OAUTH_USERNAME=asmagent OAUTH_PASSWORD=nimda OAUTH_SCOPE=basic
Running
Stdio:
python -m app.serverSSE:
fastmcp serve app/server.py --sse :8080
Testing
Full verification suite:
uv run ruff check app tests uv run mypy app uv run pytest -qSmoke checks:
uv run pytest tests/integration/test_smoke.py -qLive discovery flow:
uv run pytest tests/integration/test_integration_live.py -s
Note Live tests are intended to validate the current contract against a real SAP Commerce runtime. When
SAP_BASE_URL=https://localhost:9002, the local OCC/ASM instance should be the primary proof target. If OAuth or ASM data is misconfigured, diagnose it locally before broadening scope.
Local SAP caveat Some SAP 2211 local stacks include
messagecentercsocc, whose lateOauth2UserFiltercan overwrite the/users/{customerId}on-behalf context with the authenticated agent again. Ifasmagentcart calls regress toEmployeeModel -> CustomerModelcast errors, patch that filter so it preserves the already-matched customer when the current OCC user differs from the OAuth principal.
Quality gates
Ruff for linting and import hygiene
Mypy for a practical static type gate across
app/Pytest + coverage.xml so SonarQube can consume the same local evidence used in CI
Local SonarQube analysis can be published with:
uv run pytest -q
sonar-scannersonar-project.properties is checked in so local and CI scans use the same project key/source layout.
Documentation
Workflows — practical tool-call sequences
Architecture Mermaid — source for the system diagram
Request Mermaid — source for the swimlane diagram
MCP manifest and tool registration:
app/server.pyContribution guide:
AGENTS.md
Future improvements
add an optional external backing store only if the project later needs multi-process or horizontally scaled session persistence
Supported OCC / ASM coverage
The current server covers the endpoints needed for the flows above, including base sites, catalogs, stores, products, carts, cart entries, checkout address/delivery operations, order placement, and ASM customer search / customer 360 / bind-cart style operations.
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/commerce-cloud-integrations/sap-commerce-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server