This MCP Server provides an LLM interface for interacting with your Cloud Foundry foundation. It was built with the Spring AI MCP Server Boot Starter.
This MCP Server now uses the Streamable HTTP Transport, instead of SSE. If you are connecting to this server with Tanzu Platform Chat, be sure to consult the README for instructions on configuring the service binding for Streamable transport.
./mvnw clean packageWhen deploying the MCP server to Cloud Foundry, you can use a user-provided service to inject credentials instead of using environment variables. This approach keeps sensitive credentials out of your manifest files.
Create a user-provided service named cf-client with the required Cloud Foundry credentials:
cf create-user-provided-service cf-client -p '{
"apihost": "api.sys.mycf.com",
"username": "your-cf-username",
"password": "your-cf-password",
"org": "your-org",
"space": "your-space"
}'Or create it interactively by providing credentials one at a time:
cf create-user-provided-service cf-client -p "apihost, username, password, org, space"After deploying the application, bind the service:
cf bind-service cloud-foundry-mcp cf-client
cf restart cloud-foundry-mcpOr include the service binding in your manifest.yml:
applications:
- name: cloud-foundry-mcp
memory: 1G
instances: 1
path: target/cloud-foundry-mcp-0.0.1-SNAPSHOT.jar
services:
- cf-clientThe application will automatically read credentials from the cf-client service binding via the VCAP_SERVICES environment variable, as configured in src/main/resources/application.yaml.
If you need to update the credentials:
cf update-user-provided-service cf-client -p '{
"apihost": "api.sys.mycf.com",
"username": "new-username",
"password": "new-password",
"org": "new-org",
"space": "new-space"
}'
cf restart cloud-foundry-mcpThis MCP server exposes the following Cloud Foundry operations as tools:
- applicationsList - List all applications in a space
- applicationDetails - Get detailed information about a specific application
- cloneApplication - Clone an existing application
- scaleApplication - Scale application instances, memory, or disk quota
- startApplication - Start a stopped application
- stopApplication - Stop a running application
- restartApplication - Restart an application
- deleteApplication - Delete an application
- organizationsList - List all organizations
- organizationDetails - Get details about a specific organization
- spacesList - List all spaces in an organization
- getSpaceQuota - Get quota information for a space
- createSpace - Create a new space
- deleteSpace - Delete a space
- renameSpace - Rename an existing space
- serviceInstancesList - List all service instances in a space
- serviceInstanceDetails - Get details about a specific service instance
- serviceOfferingsList - List available service offerings
- bindServiceInstance - Bind a service instance to an application
- unbindServiceInstance - Unbind a service instance from an application
- deleteServiceInstance - Delete a service instance
- routesList - List all routes in a space
- createRoute - Create a new route
- deleteRoute - Delete a specific route
- deleteOrphanedRoutes - Delete all unmapped routes
- mapRoute - Map a route to an application
- unmapRoute - Unmap a route from an application
- addNetworkPolicy - Create network policy between applications
- listNetworkPolicies - List all network policies
- removeNetworkPolicy - Remove network policy between applications
All tools support multi-context operations with optional organization and space parameters to target different environments.
