Provides integration with SAP Business One API, enabling programmatic access to SAP business data and operations through a secure Azure-hosted MCP server with VNet connectivity
SAP Business One MCP Server
SAP Business One MCP Server
Servidor MCP (Model Context Protocol) para integrar SAP Business One con Microsoft Copilot Studio.
##Características
-## Configuración
1. Variables de Entorn## Despliegue en AzureConexión ## Integración con Copilot St## Pruebas del Protocolo MCPdioersistente*## Estructura del Proyecto a SAP Business## TroubleshootingOne Service Layer API
- Creación de Sales Orders con validación completa
- Protocolo MCP Streamable compatible con Microsoft Copilot Studio
- Deployment en Azure Container Apps listo para producción
##Herramientas Disponibles
- sap_connect - Conectar a SAP Business One
- sap_status - Verificar estado de conexión
- sap_create_sales_order - Crear Sales Orders
##Requisitos
- Python 3.11+
- SAP Business One con Service Layer habilitado
- Variables de entorno configuradas
##Configuración
- Copiar
.env.example
a.env
:
- Configurar variables de entorno en
.env
:
- Instalar dependencias:
- Ejecutar servidor:
##Integración con Microsoft Copilot Studio
###1. Schema File
Usar sap-mcp-schema.yaml
como archivo de schema OpenAPI en Copilot Studio.
###2. Crear Custom Connector
- En Copilot Studio, ir a Tools → Add a tool → New tool → Custom connector
- Seleccionar Import OpenAPI file
- Subir el archivo
sap-mcp-schema.yaml
- Completar la configuración siguiendo la documentación oficial
###3. Configurar Host
Actualizar el host
en sap-mcp-schema.yaml
:
- Para desarrollo local:
localhost:8000
- Para producción:
your-domain.azurecontainerapps.io
##Deployment
###Azure Container Apps
- Configurar variables de entorno en Azure:
- Deploy usando el script:
###Docker
##Ejemplo de Uso
###Crear Sales Order
###Respuesta
##Health Check
##Licencia
MIT License
##Contribuir
- Fork el proyecto
- Crear feature branch (
git checkout -b feature/AmazingFeature
) - Commit cambios (
git commit -m 'Add some AmazingFeature'
) - Push to branch (
git push origin feature/AmazingFeature
) - Abrir Pull Request
##Objetivo
Exponer herramientas de SAP Business One Service Layer API mediante el protocolo MCP streamable para que Microsoft Copilot Studio pueda consumirlas como un custom connector.
##Arquitectura
##� Características
###Herramientas MCP Disponibles
sap_connect
: Conectar a SAP Business Onesap_status
: Verificar estado de conexiónsap_create_sales_order
: Crear Sales Orders con validación completa
###Recursos MCP Disponibles
sap://status
: Estado actual de la conexión SAP
###Endpoints HTTP
POST /mcp
: Endpoint principal para protocolo MCP streamableGET /health
: Verificación de salud del servidor
##🛠️ Configuración
###1. Variables de Entorno
Crea un archivo .env
basado en .env.example
:
Completa las variables:
###2. Desarrollo Local
El servidor estará disponible en http://localhost:8000
###3. Probar Localmente
##☁️ Despliegue en Azure
###Prerequisitos
- Azure CLI instalado y configurado
- Azure Container Registry creado
- Permisos para crear Container Apps
###Despliegue Automatizado
###Configurar Secrets en Azure
##🔌 Integración con Copilot Studio
###1. Crear Custom Connector
- Ir a Power Platform Admin Center
- Seleccionar Custom Connectors → New custom connector → Import from OpenAPI file
- Subir el archivo
sap-mcp-schema.yaml
- Configurar la URL del host con tu Container App:
###2. Configurar en Copilot Studio
- Abrir Copilot Studio
- Ir a Settings → Generative AI → Custom Actions
- Agregar el custom connector creado
- Las herramientas SAP aparecerán automáticamente como acciones disponibles
###3. Ejemplo de Uso en Copilot
##🧪 Pruebas del Protocolo MCP
###Ejemplo de Solicitud MCP
###Ejemplo de Respuesta MCP
##📁 Estructura del Proyecto
Desarrollo
###Agregar Nueva Herramienta
- Definir en
handle_list_tools()
:
- Implementar en
handle_call_tool()
:
##🔍 Troubleshooting
###Problemas Comunes
- Error de conexión SAP:
- Verificar variables de entorno
- Comprobar conectividad de red
- Validar credenciales
- Container App no responde:
- Verificar logs:
az containerapp logs show --name app-sap-mcp --resource-group rg-mcp-sap
- Comprobar variables de entorno en Azure
- Verificar logs:
- Copilot Studio no encuentra herramientas:
- Verificar schema OpenAPI
- Comprobar URL del host en custom connector
- Validar protocolo
mcp-streamable-1.0
###Logs y Debugging
Referencias
- Model Context Protocol (MCP)
- SAP Business One Service Layer API
- Microsoft Copilot Studio Custom Connectors
- Azure Container Apps
Contribución
- Fork el repositorio
- Crear rama feature:
git checkout -b feature/nueva-caracteristica
- Commit cambios:
git commit -am 'Agregar nueva característica'
- Push a la rama:
git push origin feature/nueva-caracteristica
- Crear Pull Request
##📄 Licencia
Este proyecto está bajo la Licencia MIT. Ver archivo LICENSE
para más detalles.
##🆘 Soporte
- Issues: GitHub Issues
- Documentación: Wiki del proyecto
- Contacto: Crear un issue para soporte técnico --secrets "sap-username=tu-usuario" "sap-password=tu-password"
###Configurar NSG para SAP
##📊 Verificación
###Ver logs de la aplicación
###Verificar conectividad
##🔐 Seguridad
###Variables de entorno configuradas:
SAP_BASE_URL
: URL de tu SAP Business One APISAP_COMPANY_DB
: Base de datos de la compañíaSAP_USERNAME
: Usuario SAPSAP_PASSWORD
: Contraseña SAP (almacenada como secreto)
###Mejores prácticas:
- Credenciales almacenadas como secretos de Container Apps
- VNet isolation para comunicación privada con SAP
- Contenedor ejecutándose con usuario no-root
- Recursos limitados (CPU/Memory)
##🛠️ Troubleshooting
###Error de conectividad a SAP
- Verificar que SAP esté ejecutándose
- Verificar NSG rules
- Verificar que las IPs sean correctas
- Verificar credenciales
###Error de despliegue
- Verificar permisos en Azure
- Verificar que el nombre del Container Registry sea único
- Verificar que la VNet exista
###Ver logs detallados
##📞 Soporte
Para problemas específicos:
- Revisar logs de Container Apps
- Verificar conectividad de red
- Probar credenciales SAP desde Postman
- Verificar configuración de secretos
##🔄 Actualizaciones
Para actualizar la aplicación:
This server cannot be installed
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 Business One API through Azure Container Apps with VNet connectivity. Provides secure access to SAP data and operations through natural language interface.
Related MCP Servers
- AsecurityAlicenseAqualityThis server provides a convenient API for interacting with Azure DevOps services, enabling AI assistants and other tools to manage work items, code repositories, boards, sprints, and more. Built with the Model Context Protocol, it provides a standardized interface for communicating with Azure DevOpsLast updated -2147MIT License
- -securityAlicense-qualityA comprehensive server that enables AI applications to interact with Microsoft 365 and Azure AD services through standardized Model Context Protocol interfaces.Last updated -1MIT License
- -securityAlicense-qualityEnables comprehensive integration with Azure AI services including OpenAI, Cognitive Services, Computer Vision, and Face API through a mission-critical MCP server. Provides enterprise-grade reliability with high availability, observability, chaos engineering, and secure multi-region deployment capabilities.Last updated -MIT License
- -securityFlicense-qualityEnables 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.Last updated -1