sap-btp-destination-mcp
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.
README
SAP BTP Destination MCP
App en Python para consumir un destination SAP BTP con OAuth2ClientCredentials, exponer un endpoint HTTP y publicar tools MCP sobre FastMCP.
Que hace
- Pide un access token al
Token Service URL. - Lee un destination usando
GET /destination-configuration/v1/destinations/<name>. - Expone endpoints REST para healthcheck y prueba del destination.
- Expone las mismas operaciones como tools MCP en
/mcp.
Variables de entorno
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.
Credenciales correctas para Destination Service
Para consumir el Destination Service de forma estándar en SAP BTP:
clientid,clientsecretyurisalen del service key del Destination Service.urlsale 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_KEYcon el JSON del service key del Destination ServiceSAP_XSUAA_CREDENTIALScon el JSON del service key del XSUAA
Ejemplo:
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"}'
Ejecutar local
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
uvicorn app.main:app --reload
Endpoints
GET /healthGET /destination/{destination_name}GET /destination/{destination_name}/call?path=destination-configuration/v1/subaccountDestinations- MCP endpoint:
GET/POST /mcp
Deploy a Cloud Foundry
cf 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.
Deploy estilo tutorial (recomendado)
Este flujo replica la idea del video de deploy en BTP pero usando tu app actual en Python.
- Logueate y selecciona org/space:
cf login
cf target -o "<tu-org>" -s "<tu-space>"
- Crea servicios (si no existen):
cf create-service destination lite mcp-destination
cf create-service xsuaa application mcp-xsuaa -c xs-security.json
- Prepara variables de despliegue:
cp vars.btp.example.yml vars.btp.yml
- Deploy con binding automatico a servicios:
./scripts/deploy_btp.sh
- Verifica que la app quedo arriba:
cf app sap-btp-mcp-python
Notas:
manifest.btp.ymldefine bindings adestinationyxsuaa.- La app toma credenciales desde
VCAP_SERVICES, asi que no necesitas setearSAP_CLIENT_SECRETmanualmente en CF.
Referencias
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.