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 "Deploy 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 MCP Validation Agent
SAP Clean Core AI Agent — Order-to-Cash Automation via MCP Protocol
Autor: Fabian Andrés Acevedo R. | Bogotá, Colombia
Certificaciones: C_S4CPB_2602 · C_LCNC_2601
LinkedIn: linkedin.com/in/fabian-acevedo-sap-cloud-data
🎯 El Problema
En entornos SAP SD, la validación manual de pedidos de venta introduce fricciones críticas:
Consultores SD deben verificar manualmente stock, pricing y crédito del cliente antes de crear cada orden.
Pedidos rechazados en etapas tardías del proceso generan reprocesos costosos.
La escalación de crédito a aprobadores depende de flujos manuales o correo electrónico.
Resultado: ciclos Order-to-Cash lentos, errores humanos y carga administrativa en el equipo de ventas.
Related MCP server: SAP MCP Server
✅ La Solución
Un agente de IA conversacional que, vía Model Context Protocol (MCP), conecta a Claude con las reglas de negocio SAP SD — validando materiales, precios y crédito de cliente en tiempo real, antes de crear el pedido, y escalando automáticamente a SAP Build Process Automation cuando se detecta crédito insuficiente.
Usuario (lenguaje natural)
↓
MCP Client (Claude claude-sonnet-4-6)
↓
SAP SD MCP Server (FastMCP)
├── validate_material_number() → Catálogo S/4HANA
├── check_pricing_conditions() → Pricing SD
├── verify_customer_credit_limit()→ Credit Management
└── create_sales_order() → Pedido de venta
↓
SAP Build Process Automation → Escalación de crédito (XSUAA / OAuth2)
↓
S/4HANA Core ← Clean Core ✅ (sin modificaciones al núcleo)Filosofía: Este agente opera en la periferia del ecosistema SAP — nunca modifica el núcleo ERP. Respeta el principio Clean Core usando únicamente APIs estándar (API_SALES_ORDER_SRV) y servicios BTP.
🏗️ Arquitectura
Capa | Componente | Rol |
Periferia | FastMCP Server ( | Expone herramientas SAP SD al agente IA |
Agente | Claude claude-sonnet-4-6 vía Anthropic API | Razonamiento, orquestación y respuesta en lenguaje natural |
Integración | SAP Build Process Automation API | Flujo de aprobación de crédito |
Autenticación | XSUAA / OAuth2 (SAP BTP) | Seguridad enterprise sin hardcoding de secrets |
Core ERP | SAP S/4HANA Cloud Public Edition | Fuente de verdad (en producción vía |
⚡ Demo — Casos de prueba validados
# | Escenario | Input | Resultado |
✅ 1 | Happy path | CUST-500 · MAT-1001 · 5u | Orden |
❌ 2 | Crédito insuficiente | CUST-501 · MAT-1001 · 10u | Rechazada → escalada a SAP Build |
❌ 3 | Sin stock | CUST-500 · MAT-1003 · 2u | Rechazada: stock = 0 |
❌ 4 | Material inexistente | CUST-500 · MAT-9999 · 1u | Rechazada: no existe en catálogo |
🚀 Instalación y uso
Prerrequisitos
Python 3.10+
Cuenta en Anthropic Console con API Key
Configuración
# 1. Clonar el repositorio
git clone https://github.com/fabianacevedo9006/sap-sd-mcp-validation.git
cd sap-sd-mcp-validation
# 2. Instalar dependencias
pip install -r requirements.txt
# 3. Configurar variables de entorno (ver .env.example)
cp .env.example .env
# Editar .env con tus credenciales.env.example:
ANTHROPIC_API_KEY=
BTP_TOKEN_URL=
BTP_API_BASE_URL=
BTP_CLIENT_ID=
BTP_CLIENT_SECRET=Ejecución (Google Colab)
Abre SAP_SD_MCP_Agent_Colab.ipynb en Google Colab y ejecuta las celdas en orden. El notebook guía el proceso completo en ~3 minutos.
📈 Valor de negocio
Reducción de carga administrativa en el departamento de ventas — el agente valida en segundos lo que antes requería múltiples consultas manuales en SAP GUI.
Trazabilidad completa: cada tool call queda registrada en el
audit_logcon timestamp, input y output — cumpliendo estándares de auditoría SAP.Escalación automática: pedidos con crédito insuficiente disparan un workflow en SAP Build Process Automation sin intervención manual.
Clean Core garantizado: cero modificaciones al núcleo ERP — arquitectura certificable bajo SAP Clean Core Assessment.
🗺️ Roadmap
Versión | Feature | Stack |
V1 ✅ | Material · Precio · Crédito · Pedido + SAP Build escalación | FastMCP · Mock data · BTP OAuth2 |
V2 |
| Scheduling logic |
V3 |
| Supply Chain logic |
V4 |
| SAP Build Process Automation API |
V5 | APIs reales S/4HANA Cloud vía Communication Arrangement | httpx · OAuth2 · |
🔗 Contexto SAP Discovery Mission
Este proyecto forma parte de la misión SAP Discovery Center:
"Soporte fundamental para iniciar la automatización de procesos a través de SAP Build"
Demuestra la fase Adopt de SAP Activate: configuración de SAP Build Process Automation integrada con un agente IA de periferia, respetando el modelo Clean Core de SAP S/4HANA Cloud Public Edition.
📄 Licencia
MIT — ver LICENSE
Tags: sap-btp · gen-ai · mcp-protocol · s4hana-cloud · clean-core · order-to-cash · sap-build · process-automation
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted MCP for denial, prior auth, reimbursement, workflow validation, batch scoring, and feedback.
Orchestration & technical-consulting MCP for end-to-end Salesforce, ServiceNow & HubSpot back-end.
Remote MCP for Living Stack offer discovery and buyer-authorized checkout preparation.
Let AI agents query data and act across all your business apps via MCP.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables interaction with SAP systems through RESTful APIs via MCP protocol. Supports calling SAP functions like BAPI with parameters and returns structured responses for SAP data operations.2-
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to securely connect with SAP ABAP and BTP services, allowing execution of function modules, BAPIs, table reads, and various BTP operations through MCP.1Apache 2.0
- FlicenseNot gradedqualityBmaintenanceMCP server for interacting with SAP S/4HANA OData services. It enables querying and controlled creation/update of sales orders, products, customers, and pricing conditions, with safety features like dry-run mode and ETag-based updates.-
- FlicenseNot gradedqualityBmaintenanceMCP server that enables AI platforms to search products, customers, and warehouses, and prepare and submit sales orders to a fixed ERP endpoint with per-session bearer authentication.-