loading…
Search for a command to run...
loading…
A Python MCP server that authenticates with SAP BTP, reads Destination Service configurations, and exposes endpoints and MCP tools to access and call these dest
A Python MCP server that authenticates with SAP BTP, reads Destination Service configurations, and exposes endpoints and MCP tools to access and call these destinations.
App en Python para consumir un destination SAP BTP con OAuth2ClientCredentials, exponer un endpoint HTTP y publicar tools MCP sobre FastMCP.
Token Service URL.GET /destination-configuration/v1/destinations/<name>./mcp.Modo manual, tomando los datos del destination que pasaste:
SAP_DESTINATION_NAME=mcp-destination
SAP_DESTINATION_SERVICE_URL=https://destination-configuration.cfapps.us10.hana.ondemand.com
SAP_TOKEN_URL=https://mcp-test.authentication.us10.hana.ondemand.com/oauth/token
SAP_CLIENT_ID=sb-clone6ab3984cf18e4ae991b5b02eab972d9b!b646663|destination-xsappname!b62
SAP_CLIENT_SECRET=<tu-secret>
Podés copiarlas a un .env.
Para consumir el Destination Service de forma estándar en SAP BTP:
clientid, clientsecret y uri salen del service key del Destination Service.url sale del service key del XSUAA.Las credenciales de XSUAA por sí solas pueden emitir token, pero no necesariamente tienen autorización para llamar al Destination Service. Si pasa eso, SAP responde 403 Forbidden.
La app ahora soporta estos formatos además del .env manual:
VCAP_SERVICESSAP_DESTINATION_SERVICE_KEY con el JSON del service key del Destination ServiceSAP_XSUAA_CREDENTIALS con el JSON del service key del XSUAAEjemplo:
export SAP_DESTINATION_SERVICE_KEY='{"clientid":"...","clientsecret":"...","uri":"https://destination-configuration.cfapps.us10.hana.ondemand.com"}'
export SAP_XSUAA_CREDENTIALS='{"url":"https://mcp-test.authentication.us10.hana.ondemand.com"}'
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
uvicorn app.main:app --reload
GET /healthGET /destination/{destination_name}GET /destination/{destination_name}/call?path=destination-configuration/v1/subaccountDestinationsGET/POST /mcpcf push
cf set-env sap-btp-mcp-python SAP_DESTINATION_SERVICE_URL https://destination-configuration.cfapps.us10.hana.ondemand.com
cf set-env sap-btp-mcp-python SAP_TOKEN_URL https://mcp-test.authentication.us10.hana.ondemand.com/oauth/token
cf set-env sap-btp-mcp-python SAP_CLIENT_ID 'sb-clone6ab3984cf18e4ae991b5b02eab972d9b!b646663|destination-xsappname!b62'
cf set-env sap-btp-mcp-python SAP_CLIENT_SECRET '<tu-secret>'
cf restart sap-btp-mcp-python
Si la app está bindeada a destination y xsuaa, también puede resolver credenciales automáticamente desde VCAP_SERVICES.
Este flujo replica la idea del video de deploy en BTP pero usando tu app actual en Python.
cf login
cf target -o "<tu-org>" -s "<tu-space>"
cf create-service destination lite mcp-destination
cf create-service xsuaa application mcp-xsuaa -c xs-security.json
cp vars.btp.example.yml vars.btp.yml
./scripts/deploy_btp.sh
cf app sap-btp-mcp-python
Notas:
manifest.btp.yml define bindings a destination y xsuaa.VCAP_SERVICES, asi que no necesitas setear SAP_CLIENT_SECRET manualmente en CF.Выполни в терминале:
claude mcp add sap-btp-destination-mcp -- npx PRs, issues, code search, CI status
автор: GitHubDatabase, auth and storage
автор: SupabaseSecure file operations with configurable access controls.
Reference / test server with prompts, resources, and tools.
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории development