As IDEs like Cursor, Windsurf, and VS Code evolve to support natural language and AI-assisted workflows, developers expect their tools to adapt. AI is transforming the software development lifecycle – especially in how developers build flows, deploy applications, and manage APIs within their IDEs.
Introducing MuleSoft, your way – a lightweight, AI-integrated server that brings MuleSoft’s development and deployment capabilities to any IDE that supports Model Context Protocol (MCP). Read on to learn how to leverage MuleSoft MCP Server via the Cursor AI IDE, using natural language to build and manage Mule applications.
What is the MuleSoft, your way?
It’s a lightweight, extensible service that exposes MuleSoft development capabilities to any IDE that supports the MCP standard. You can now leverage AI to:
- Create new Mule projects
- Generate or modify flows using natural language
- Run and debug locally
- Deploy applications to CloudHub 2.0 or Runtime Fabric
- Manage Anypoint Exchange assets
MuleSoft MCP Server acts as a bridge between AI-powered IDEs like Cursor, Windsurf, and VS Code, and MuleSoft’s platform services – enabling developers to build, deploy, and manage applications using natural language interactions within their editor.
8 steps to set up an MCP Server in Cursor IDE
We will discuss how to install the server, connect your IDE, and run a full Mule development cycle via natural language in eight detailed steps.
1. Install and launch the MuleSoft MCP Server
Before we begin, you need the following prerequisites:
- Java 17: Required for building and running Mule applications
- Apache Maven: Used to build Mule projects
- Node.js (22.x or later)
- An IDE with MCP support (e.g. Cursor, Windsurf, VS Code)
Launch the server directly from the npm registry using the following code:
npm install -g @mulesoft/mcp-server
2. Set up a connected app in Anypoint Platform
The MCP Server authenticates to Anypoint Platform using OAuth credentials from a connected app.
- Log in to Anypoint Platform
- In Access Management, click Connected Apps
- Click Create App
- Select Client Credentials grant type
- Assign the following permissions:
- Anypoint Code Builder: Mule Developer Generative AI User
- General: View Organization, View Connected Applications
- Exchange: Exchange Administrator, Exchange Contributor, Exchange Creator, Exchange Viewer
- Runtime Manager: Read Applications, Create Applications, Read Runtime Fabrics, CloudHub Network Viewer
- Anypoint Monitoring: Monitoring Viewer, Save and copy your Client ID and Client Secret
3. Configure the MCP Server in Cursor IDE
Cursor starts the MCP Server automatically after following these steps:
- Open Cursor IDE
- Go to Settings, then click MCP
- Click Add MCP Server
Then, paste this code into the field provided:
{
"mcpServers": {
"mulesoft": {
"command": "npx",
"args": ["-y", "@mulesoft/mcp-server", "start"],
"env": {
"ANYPOINT_CLIENT_ID": "<YOUR_CLIENT_ID>",
"ANYPOINT_CLIENT_SECRET": "<YOUR_CLIENT_SECRET>",
"ANYPOINT_REGION": "<REGION_NAME>"
}
}
}
}
In your code, replace YOUR_CLIENT_ID, YOUR_CLIENT_SECRET, and REGION_NAME with these values:
- <YOUR_CLIENT_ID> and <YOUR_CLIENT_SECRET> are values from your connected app
- <REGION_NAME> is optional and by default it will be PROD_US. The other values are PROD_EU, PROD_CA, PROD_JP
After you save the server configuration, Cursor automatically launches and manages the MuleSoft MCP Server process. You now can use AI to invoke MuleSoft tools like project creation, flow generation, deployment, and Anypoint Exchange operations.
4. Create and build a Mule project using AI
With the MCP Server running behind the scenes, automatically launched and managed by Cursor, you can interact with MuleSoft tools through natural language. One of the most powerful features is the ability to create and scaffold an entire Mule project using a simple input.
Example message: Create a Mule project that creates an order in NetSuite every time an Opportunity in Salesforce is updated to stage Closed Won. |
After you enter your message, here’s what happens:
- Create a new project directory in your workspace
- Includes standard Mule folder structure (for example, src/main/mule, src/test, pom.xml)
- Directory is named using what was in your request or using default naming conventions
- Generate a pom.xml file
- Includes the correct dependencies for Mule runtime
- Configured to use Maven for build and packaging
- Set up a mule-artifact.json file
- Defines metadata such as required Mule runtime version
- Enables deployment to CloudHub or Runtime Fabric
- Create the base flow file
- Named appropriately (for example, app.xml)
- Configuration added to global.xml.
- Includes the requested structure: listener, logger, transformer, etc.
- Wired for testing and expansion
5. Locally run and test your Mule application
After you create and build your Mule application, the next step is to test it locally. This process is fully automated and seamless. Instead of manually compiling and launching the runtime, you can simply enter a message inside Cursor.
Example message: Run this Mule app locally. |
This invokes the run_local_mule_application tool, a powerful utility provided by the MCP Server that handles the lifecycle of local deployment from access authentication to runtime orchestration. Here’s what happens behind the scenes after you enter your message:
The MCP Server automatically executes a nine-step local deployment workflow:
- Authenticates with Anypoint Platform: Uses your connected app credentials to get an access token
- Checks if the JAR file exists: If it doesn’t, the project is automatically built using Maven
- Retrieves available Mule runtime versions: Checks the versions that are supported locally
- Parses mule-artifact.json: Reads your project’s required runtime version
- Finds the closest matching runtime version: Ensures compatibility without forcing manual overrides
- Downloads and extracts the runtime if needed: Download it if it is not already present on your machine.
- Stops any existing Mule runtime: Prevents port conflicts or state issues from older sessions.
- Deploys the application JAR: Deploys your compiled application into the runtime’s /apps directory.
- Starts the runtime: Your app locally launches and listens to endpoints.
After your app is running, you can immediately test your flow using the following steps:
- Send requests to your endpoints using Postman, curl, or a browser
- View real-time console logs within Cursor
- Ask AI to interpret logs or explain errors
- Adjust the flow and re-run the app as needed
No manual runtime installation or configuration is needed. The MCP Server takes care of versioning, downloading, and orchestration behind the scenes. This gives you the full power of local testing with none of the setup friction. Because the server intelligently detects changes and rebuilds as necessary, you can iterate rapidly.
- Debug early and often
- Validate runtime behavior
- Confirm flow logic before deploying
6. Deploy your Mule application to CloudHub
After testing your application locally, you’re ready to deploy it to the cloud without leaving your IDE or writing any deployment scripts. In Cursor, simply send your request.
Example message: Deploy this application to my Sandbox environment and make sure it’s secure, highly available, and performant. |
This triggers the deploy_mule_application tool, which handles everything from building and publishing your app to deploying it to your chosen MuleSoft environment and runtime target.
If you don’t specify the target or runtime, the MCP Server will:
- Use CloudHub 2.0 US-East-2 Shared Space as the default target
- Select the latest compatible Mule runtime based on your project’s mule-artifact.json
If you want to override those, use the following message:
Example message: Deploy using runtime 4.9.4:2e-java17 and target cloudhub-eu-west. |
When the deploy tool runs, depending on whether you’re deploying a local project or an existing Exchange asset, the tool automatically:
- Builds the project using Maven: This occurs if a .jar doesn’t exist or the project was recently modified
- Publishes the application to Anypoint Exchange: Ensures consistent versioning and artifact reuse
- Selects the deployment environment: This is based on your input (Sandbox or Production)
- Chooses the appropriate runtime and deployment targets: Defaults to CloudHub 2.0 in US-East-2 unless overridden
- Applies enterprise-grade deployment options:
- Secure Mode: Adds enhanced security policies
- High Availability: Enables fault-tolerant deployment
- Performance Optimization: Tunes runtime for higher throughput
- Replicas: Adjusts replica count for scaling
- Deploys the application: With full tracking of deployment status and versioning
After deployment, AI confirms deployment success/failure, target region and environment, running version and status, replica count, runtime version, and security settings.
Example follow-up messages: What is the status of my salesforce-netsuite-integration app in Sandbox?How many replicas are running?Is my application secured? |
By handling Maven builds, Anypoint Exchange publishing, and CloudHub orchestration, the MCP Server eliminates the need for CI/CD scripts or manual deployments. You get a new deployment experience for AI-driven, context-aware development.
7. List and monitor deployed applications
After your Mule applications are deployed to CloudHub 2.0 or Runtime Fabric, the next challenge is keeping track of what’s running and how it’s performing. The list_applications tool enables full visibility into your deployed applications directly from your IDE. You can list, filter, and monitor apps across environments – all using natural language requests in Cursor.
Example requests: List all applications in my Sandbox Environment Show me the second page of deployed applications Get the status and logs for salesforce-netsuite-integration Does salesforce-netsuite-integration have any recent CPU spikes? |
Depending on your request, the list_application tool can:
- Return a list of deployed applications in a given environment
- Filter by a specific application name
- Retrieve deployment status, target info (CloudHub 2.0 or Runtime Fabric), runtime version, replica and worker configuration, CPU and memory metrics, and recent logs (up to 100 entries)
8. Search for assets in Anypoint Exchange
One of the most powerful features of the MuleSoft ecosystem is Anypoint Exchange, a centralized repository where developers publish, share, and discover reusable APIs, connectors, templates, and components. Thanks to the search_asset_in_exchange tool, you can now search Anypoint Exchange directly from your IDE using natural language messages.
Example messages: Find the salesforce-netsuite-integration asset in Anypoint Exchange Search for all assets related to salesforce-netsuite-integration Is there a connector for Salesforce? |
This invokes the search_asset_in_exchange tool, which queries Anypoint Exchange for the provided asset name and returns detailed metadata about the result. When an asset is found, you receive the following information:
The future of MuleSoft development with AI-enhanced IDEs
With the rise of AI-enhanced development environments, MuleSoft, your way bridges the gap between powerful backend tooling and natural language-driven workflows. Whether you’re using Cursor, Windsurf, or any MCP-compatible IDE, you now have direct access to the full lifecycle of Mule application development without leaving your editor.
Here’s what you can now do inside your IDE:
- Create a Mule project using natural language
- Generate flows without writing boilerplate
- Test your application locally with automated runtime orchestration
- Deploy your app to CloudHub 2.0 or Runtime Fabric, with enterprise-grade configurations
- Search, create, and manage existing assets in Anypoint Exchange
- Monitor and inspect deployed applications, metrics, and logs
This unlocks a faster, more intuitive, and more flexible way to build MuleSoft integrations – fully aligned with the way modern developers work. To get started, install your prerequisites, configure MCP in Cursor, and begin building with natural language today.