SAP BTP Cloud Foundry MCP Server
Allows to deploy, manage, and monitor applications on Cloud Foundry through the SAP BTP Cloud Foundry environment.
Provides tools for automating SAP BTP Cloud Foundry operations, including application lifecycle, service management, and environment configuration.
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 BTP Cloud Foundry MCP Serverlist all apps in my current space"
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 BTP Cloud Foundry MCP Server
An MCP (Model Context Protocol) server for automating SAP BTP Cloud Foundry operations. This server provides comprehensive tools for deploying, managing, and monitoring applications on SAP BTP Cloud Foundry.
🚀 Quick Start
Installation
For Cline (VS Code)
Install via NPM (recommended):
npx sap-btp-cf-mcp-serverAdd to your Cline MCP settings (
~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json):{ "mcpServers": { "sap-btp-cf": { "command": "npx", "args": ["-y", "sap-btp-cf-mcp-server"], "env": { "CF_API_ENDPOINT": "https://api.cf.us10.hana.ondemand.com", "CF_USERNAME": "your-username", "CF_PASSWORD": "your-password", "CF_ORG": "your-org", "CF_SPACE": "your-space" } } } }Restart VS Code
For Claude Desktop
Add to your Claude Desktop config (
~/Library/Application Support/Claude/claude_desktop_config.json):{ "mcpServers": { "sap-btp-cf": { "command": "npx", "args": ["-y", "sap-btp-cf-mcp-server"], "env": { "CF_API_ENDPOINT": "https://api.cf.us10.hana.ondemand.com", "CF_USERNAME": "your-username", "CF_PASSWORD": "your-password", "CF_ORG": "your-org", "CF_SPACE": "your-space" } } } }Restart Claude Desktop
From Source
git clone https://github.com/Shreesha4994/sap-btp-cf-mcp-server.git
cd sap-btp-cf-mcp-server
npm install
npm run buildRelated MCP server: ABAP-ADT-API MCP-Server
Features
Authentication & Session Management
cf_login- Authenticate with Cloud Foundrycf_target- Switch organization and/or spacecf_get_target- Get current target information
Application Management
cf_push- Deploy applicationscf_app- Get application detailscf_apps- List all applicationscf_start- Start an applicationcf_stop- Stop an applicationcf_restart- Restart an applicationcf_restage- Restage an applicationcf_scale- Scale application resourcescf_delete_app- Delete an applicationcf_logs- Get application logs
Environment Variables
cf_set_env- Set environment variablecf_unset_env- Unset environment variablecf_get_env- Get all environment variables
Service Management
cf_create_service- Create service instancecf_delete_service- Delete service instancecf_bind_service- Bind service to applicationcf_unbind_service- Unbind service from applicationcf_services- List all service instancescf_service- Get service instance detailscf_marketplace- List available services
Organization & Space Management
cf_orgs- List all organizationscf_spaces- List all spacescf_create_space- Create a new space
Route Management
cf_map_route- Map route to applicationcf_unmap_route- Unmap route from application
Deployment Workflows
cf_deploy_workflow- Complete deployment workflow (push, bind services, configure, start)
Prerequisites
Cloud Foundry CLI installed and accessible in PATH
SAP BTP account with appropriate permissions
Node.js installed
Configuration
The server is configured in the MCP settings with the following environment variables:
{
"sap-btp-cf": {
"command": "node",
"args": ["/path/to/sap-btp-cf-server/build/index.js"],
"env": {
"CF_API_ENDPOINT": "https://api.cf.us10.hana.ondemand.com",
"CF_USERNAME": "your-username",
"CF_PASSWORD": "your-password",
"CF_ORG": "your-org",
"CF_SPACE": "your-space"
}
}
}Getting Your Credentials
API Endpoint: Your region-specific CF API endpoint
US10:
https://api.cf.us10.hana.ondemand.comEU10:
https://api.cf.eu10.hana.ondemand.comCheck your SAP BTP Cockpit for your specific endpoint
Username/Password: Your SAP BTP credentials
Available from SAP BTP Cockpit
Organization & Space: Your target org and space
Optional - can be specified in tool calls if not set as defaults
Usage Examples
Deploy an Application
Deploy my application located at ./my-app with 2 instances and 512M memoryThis will use the cf_push tool.
Create and Bind Service
Create a HANA service instance called my-hana-db with plan hdi-shared, then bind it to my-appThis will use cf_create_service and cf_bind_service tools.
Complete Deployment Workflow
Deploy my-app from ./app-dir, bind services my-hana and my-xsuaa, and set environment variable NODE_ENV to productionThis will use the cf_deploy_workflow tool for a complete automated deployment.
Scale Application
Scale my-app to 3 instances with 1GB memoryThis will use the cf_scale tool.
View Logs
Show me the recent logs for my-appThis will use the cf_logs tool.
Development
Building
npm run buildProject Structure
sap-btp-cf-server/
├── src/
│ ├── index.ts # Main MCP server
│ ├── cf-client.ts # Cloud Foundry CLI wrapper
│ └── types.ts # TypeScript type definitions
├── build/ # Compiled JavaScript
├── package.json
└── tsconfig.jsonBenefits
Speed: Execute complex CF operations with simple commands
Error Prevention: Structured inputs with validation
Automation: Multi-step workflows in single operations
Consistency: Standardized deployment patterns
Integration: Seamless integration with other development tools
Troubleshooting
Server Not Connected
Verify the build path in MCP settings matches the compiled output location
Check that Node.js is installed and accessible
Ensure Cloud Foundry CLI is installed:
cf --version
Authentication Errors
Verify your credentials are correct
Check your API endpoint matches your region
Ensure you have appropriate permissions in the org/space
Tool Execution Errors
Check CF CLI is working:
cf targetVerify you're logged in:
cf authCheck application/service names are correct
📦 Installation from NPM
npm install -g sap-btp-cf-mcp-serverOr use directly with npx:
npx sap-btp-cf-mcp-server🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Fork the repository
Create your feature branch (
git checkout -b feature/AmazingFeature)Commit your changes (
git commit -m 'Add some AmazingFeature')Push to the branch (
git push origin feature/AmazingFeature)Open a Pull Request
📝 License
This project is licensed under the MIT License - see the LICENSE file for details.
👤 Author
Shreesha KJ
Email: s.kj@sap.com
GitHub: @Shreesha4994
🙏 Acknowledgments
Built with the Model Context Protocol SDK
Powered by Cloud Foundry CLI
Designed for SAP BTP Cloud Foundry
📊 Project Status
This project is actively maintained. Issues and feature requests are welcome!
Made with ❤️ for the SAP Developer Community
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
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/Shreesha4994/sap-btp-cf-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server