sap-sd-mcp-validation
Provides tools for validating sales orders in SAP SD, including material verification, pricing, credit limit checks, and order creation, before impacting the ERP system.
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-sd-mcp-validationvalidate order for customer CUST-500, material MAT-1001, quantity 5"
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 SD Order Validation Agent — MCP Protocol
Autor: Fabian Andrés Acevedo R. | Bogotá, Colombia Certificaciones: C_S4CPB_2602 · C_LCNC_2601 LinkedIn: fabian-acevedo-sap-cloud-data
🎯 ¿Qué hace este proyecto?
Un agente de inteligencia artificial que valida órdenes de venta SAP SD (Order-to-Cash) antes de impactar el ERP, utilizando el Model Context Protocol (MCP) de Anthropic como capa de comunicación entre Claude/Joule y SAP S/4HANA Cloud Public Edition.
El problema que resuelve
En SAP SD, los errores de pricing, crédito y disponibilidad de material generan correcciones manuales costosas:
Métrica | Sin agente | Con agente MCP |
Error rate en órdenes | ~3-5% | < 0.5% |
Tiempo de corrección/error | 30-45 min | 0 min |
Costo estimado/error | ~$400 USD | $0 |
Ahorro mensual (500 órdenes) | — | ~$5,400 USD |
Related MCP server: SAP OData to MCP Server
🏗️ Arquitectura Clean Core
Usuario / Comprador
↓
MCP Client
(Our Server / App)
↓
SAP SD MCP Server ← Este repositorio
(sap_sd_server.py)
↓ ↓
Claude / Joule S/4HANA Cloud API
Agent (API_SALES_ORDER_SRV)Principio Clean Core: Toda la lógica de validación corre en la periferia del ERP a través de MCP. El core de SAP S/4HANA no es modificado — extensibilidad 100% vía BTP.
🛠️ Tools expuestas al agente
Tool | Descripción | Equivalente SAP |
| Verifica existencia y stock | Verificación ATP |
| Calcula precio total de la orden | Esquema de cálculo |
| Valida cupo financiero del cliente | Control de crédito FI |
| Crea la orden si todo es válido | VA01 / API_SALES_ORDER_SRV |
Resources disponibles
sap://materials— Catálogo de materialessap://customers— Maestro de clientessap://orders— Órdenes creadas en sesión
Prompt pre-configurado
validate_full_order— Orquesta el flujo completo O2C con auditoría
🚀 Cómo probarlo
Opción A — Google Colab (recomendado, sin instalación)
Haz clic en el badge Open In Colab al inicio de este README
Ve al panel izquierdo → ícono 🔑 Secrets → agrega
ANTHROPIC_API_KEYMenú → Ejecutar todo
Opción B — Local
# Clonar repositorio
git clone https://github.com/TU_USUARIO/sap-sd-mcp-validation.git
cd sap-sd-mcp-validation
# Crear entorno virtual
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
# Instalar dependencias
pip install -r requirements.txt
# Configurar API key
echo "ANTHROPIC_API_KEY=sk-ant-tu-key" > .env
# Correr el servidor MCP directamente
python sap_sd_server.py🧪 Casos de prueba incluidos
Escenario | Cliente | Material | Cantidad | Resultado |
✅ Happy path | CUST-500 | MAT-1001 | 5 | Orden SO-1001 creada |
❌ Sin stock | CUST-500 | MAT-1003 | 1 | Falla: stock = 0 |
❌ Crédito insuficiente | CUST-501 | MAT-1001 | 10 | Escala a Build Process Automation |
❌ Material inválido | CUST-500 | MAT-9999 | 1 | Falla: material no existe |
📋 Audit Log integrado
Cada llamada del agente queda registrada con trazabilidad completa:
[1] 2026-06-18T10:30:01
Evento : TOOL_CALL
Tool : validate_material_number
Input : {"material_id": "MAT-1001"}
Output : {"stock_disponible": 42, "disponible": true}
[2] 2026-06-18T10:30:02
Evento : TOOL_CALL
Tool : check_pricing_conditions
Input : {"material_id": "MAT-1001", "quantity": 5}
Output : {"total_price_usd": 6250.0}🗺️ Roadmap
Versión | Feature | Stack adicional |
V1 ✅ | Material · Pricing · Crédito · Creación | FastMCP + Mock data |
V2 |
| Scheduling logic |
V3 |
| Supply Chain logic |
V4 |
| SAP Build Process Automation |
V5 | APIs reales S/4HANA Cloud via Communication Arrangement | httpx + OAuth2 + BTP Destination |
🔗 Alineación con SAP Roadmap oficial
Este proyecto anticipa funcionalidades del SAP S/4HANA Cloud release 2608 (Q3 2026):
AI-assisted sales order creation from unstructured data — SAP Road Map Explorer
Autonomous Enterprise agents for O2C processes — SAP Sapphire 2026
📁 Estructura del repositorio
sap-sd-mcp-validation/
│
├── .gitignore # Excluye .env, __pycache__, .venv
├── requirements.txt # Dependencias Python
├── sap_sd_server.py # Servidor MCP SAP SD (FastMCP)
├── SAP_SD_MCP_Agent_Fabian_Acevedo.ipynb # Notebook Colab interactivo
└── README.md # Este archivo🤝 Sobre el autor
SAP Certified Implementation Consultant (C_S4CPB_2602) y SAP Certified Build Developer (C_LCNC_2601). Especializado en SAP BTP, Clean Core extensibility, y automatización de procesos O2C con IA.
Open to remote SAP consulting roles — LATAM / Global (EST/CST)
This server cannot be installed
Maintenance
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/fabianacevedo9006/sap-sd-mcp-validation'
If you have feedback or need assistance with the MCP directory API, please join our Discord server