Skip to main content
Glama

SAP Commerce MCP Server

SAP Commerce MCP Server

This project exposes a Model Context Protocol (MCP) server that wraps a growing subset of the SAP Commerce OCC APIs—covering discovery flows, product lookups, store details, ASM endpoints, and cart management. The server supports both stdio and HTTP+SSE transports so it can be used by local MCP-capable agents or remote services.

Features

  • Discovery suite that lists base sites, store locations, catalogs, catalog versions, and category products.

  • Product detail + stock lookup helpers to support agent-assisted merchandising tasks.

  • Cart and cart-entry operations for both authenticated and anonymous users.

  • ASM Customer 360 and customer search endpoints for support-focused agents.

  • FastMCP transport over stdio (python -m app.server) and SSE (fastmcp serve app/server.py --sse :8080).

  • Configurable base URL, fields, media type, and timeouts via environment variables (see .env.example).

  • Docker and Docker Compose support for containerized deployments.

Getting Started

  1. Initialize the environment

    uv sync
  2. Configuration

    cp .env.example .env
  3. Run in stdio mode

    python -m app.server
  4. Run in SSE mode

    fastmcp serve app/server.py --sse :8080
  5. Docker

    docker build -t sap-commerce-mcp . docker run --env-file .env -p 8080:8080 sap-commerce-mcp
  6. Docker Compose

    docker compose up --build

Testing

  • Run the full suite (includes unit + smoke checks):

    pytest -q
  • Run only the discovery live flow (spins up the MCP server in-process and hits the public OCC API):

    pytest tests/test_integration_live.py -s
  • Run the cart lifecycle flow (creates and mutates an anonymous cart against the live API):

    pytest tests/test_integration_cart_flow.py -s

Note
Both the smoke and live integration tests reach out to the public SAP Commerce OCC endpoint referenced in your .env; they require network access and a working internet connection.

Documentation

  • MCP manifest, resources, and tool registration live under app/server.py.

  • Contribution guide for agents and automation: AGENTS.md

Supported OCC Endpoints

  • Base Sites

    • GET /basesites

  • Stores

    • GET /{baseSiteId}/stores

    • GET /{baseSiteId}/basestores/{baseStoreUid}

  • Catalogs

    • GET /{baseSiteId}/catalogs

    • GET /{baseSiteId}/catalogs/{catalogId}

    • GET /{baseSiteId}/catalogs/{catalogId}/{catalogVersionId}

  • Categories

    • GET /{baseSiteId}/categories/{categoryId}/products

  • Products

    • GET /{baseSiteId}/products/{productCode}

    • GET /{baseSiteId}/products/{productCode}/stock

    • HEAD /{baseSiteId}/products/{productCode}/stock

  • Carts

    • GET /{baseSiteId}/users/{userId}/carts

    • POST /{baseSiteId}/users/{userId}/carts

    • GET /{baseSiteId}/users/{userId}/carts/{cartId}

    • DELETE /{baseSiteId}/users/{userId}/carts/{cartId}

  • Cart Entries

    • GET /{baseSiteId}/users/{userId}/carts/{cartId}/entries

    • POST /{baseSiteId}/users/{userId}/carts/{cartId}/entries

    • GET /{baseSiteId}/users/{userId}/carts/{cartId}/entries/{entryNumber}

    • PUT /{baseSiteId}/users/{userId}/carts/{cartId}/entries/{entryNumber}

    • PATCH /{baseSiteId}/users/{userId}/carts/{cartId}/entries/{entryNumber}

    • DELETE /{baseSiteId}/users/{userId}/carts/{cartId}/entries/{entryNumber}

  • ASM

    • POST /{baseSiteId}/users/{userId}/customer360

    • POST /customers

    • POST /customers/search

    • POST /customers/suggestions/search

-
security - not tested
F
license - not found
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Enables interaction with SAP Commerce systems through OCC APIs, supporting product discovery, cart management, customer support operations, and store information retrieval. Provides both local and remote connectivity options for AI agents to perform e-commerce tasks.

  1. Features
    1. Getting Started
      1. Testing
        1. Documentation
          1. Supported OCC Endpoints

            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