Imagine using multiple software applications in your business, such as a database, Salesforce for customer data management, QuickBooks for accounting, and an internal inventory system. These systems need to talk to each other and exchange information. Manually moving data between them is often a headache because it is error-prone, slow, and hard to maintain.
That’s where MuleSoft comes in. It provides a platform that enables seamless connections between different systems through connectors. It acts like a ready-made bridge to connect your apps and automate data flow, saving time and reducing errors with minimal maintenance. But what if you have an ancient and unique system, such as an EJB server or another popular system, that doesn’t have an existing prebuilt connector? No problem: MuleSoft provides SDK support to build a custom connector.
This guide explains MuleSoft connectors, their work, and why you may want to use them. We also discuss different types of connectors, including custom ones.
{{banner-large-graph="/banners"}}
All connectivity in Mule 4 is provided through MuleSoft connectors. Those are reusable, prebuilt integration components that allow Mule applications to talk to external systems, such as:
Without connectors, developers would have to manually write complex integration code handling authentication, request validation and formatting, error handling, retries, etc. A connector hides all these details and abstracts all that complexity, so you can configure them instead of coding everything from scratch.
For example, we can use the Salesforce connector to execute create contact or update opportunity actions in Salesforce. Developers can simply drag and drop the Salesforce connector into their MuleSoft Anypoint Studio workflow and configure it properly without writing any code. The connector handles authentication, manages HTTP requests, OAuth tokens, JSON parsing, and error handling, significantly reducing development time.

You can use a connector to connect to another MuleSoft application, specific software, databases, and various types of protocols without knowing the protocol details.
Say you have a Mule Restful `weather-api` application that you want to connect from another Mule application. The API is designed in the design center and published as a stable version in the company’s Mule Exchange.

The weather-api application has a single api endpoint /weather that takes a single parameter, city. Now go to your application where you want to call this API, then hit the `Search in exchange` button in the Mule Palette. You should be able to see all published applications in exchange like this:

After adding the weather-api as a dependency, you should be able to see a connector in Mule Palette containing all available operations:

In the general property section, you can see the parameters of the API, and the basic settings section requires the connection configurations like this:

You can use connectors to connect a Mule app to a specific software application and perform actions on the connected software application. For example, customers can have their SAP ERP and customer relationship management (CRM) systems. Using the SAP connector between SAP and CRM, they can automate their sales order processing. Similarly, the Salesforce connector can connect with other business applications, like data analytics and warehouse systems.
Database connectors can connect a Mule app to one or more databases and perform actions. Using a Database connector, a Mule app can connect to any relational database engine. MuleSoft also has connectors for NoSQL databases like MongoDB. You can use the MongoDB connector to read, write, receive, and send files on the server.
You can use connectors to send or receive data over various protocols to perform protocol operations without understanding the protocol. For example, an EJB connector can connect to an EJB server using the T3 Java RMI protocol. Using this connector, you can call remote EJB methods without knowing the details of the T3 protocol. Similarly, you can use Anypoint Connector for WebSockets to establish a bidirectional and full-duplex communication channel between a server and a client to send push notifications between them.
MuleSoft connectors are essential for several reasons:
Connectors can perform single or multiple actions in a Mule application. They can be placed in various locations within a Mule flow, depending on the capabilities of the connectors. A connector can act as any of the following:
MuleSoft has a collection of connectors designed to provide virtually any integration solution, from common SaaS applications to particular, proprietary systems. These connectors are categorized into three primary types, each serving a specific purpose.
Anypoint Exchange connectors are the backbone of the MuleSoft integration project. MuleSoft fully develops, tests, certifies, and supports them. These connectors are the most reliable option because they undergo rigorous testing to ensure they are robust, secure, and perform as expected within the Anypoint Platform. As an official product, these connectors come with full technical support, detailed documentation, and often dedicated forums for technical discussions. They are designed for the most common use cases across the global enterprise landscape.
Anypoint Exchange connectors are not just libraries but fully fledged components that understand the semantics of the target system. For example:
Partner connectors are developed by MuleSoft technology and system integration partners to extend integration capabilities and reach into specialized applications. These connectors are typically used in industry-specific insurance, telecom, or retail. They bring deep and insightful knowledge of that system’s API and business logic.
Primary support is provided by the partners who developed the connectors, not directly by MuleSoft. Although MuleSoft does not build these connectors, they must still pass the certification process to be listed in Anypoint Exchange, which ensures a minimum standard for security, stability, and usability within the platform.
A partner connector operates with the same seamless integration as an Anypoint Exchange connector. The only difference is that it is specialized and focused. Here are a couple of examples:
Custom connectors are the ideal solution for flexibility. They are built in-house by an organization’s developer or a third-party consultant to connect to a system without an existing connector. They are intended for mainframes, home-grown applications, or older technologies like EJB servers that were never designed with modern REST APIs.
MuleSoft provides an SDK for building connectors through a Maven-based Java project. To build a custom connector, follow these steps.
Step 1: Set up a Maven project
The Mule SDK uses Maven to manage dependencies and build the connector Java project. Start by creating a new Maven project and ensuring that the Mule SDK dependency is included:
<dependency>
<groupId>org.mule.sdk</groupId>
<artifactId>mule-sdk-api</artifactId>
<version>1.0.0</version>
</dependency>
Step 2: Define the connector
The Mule SDK uses annotations to define the connector and its operations, parameters, and configurations. The following highlights a few important classes:
@Configuration(name = "my-config")
public class MyConnectorConfig {
@Parameter
private String apiKey;
}
@Connector(name = "my-connector", friendlyName = "My Custom Connector")
public class MyConnector {
@Operation
public String greet(@Config MyConnectorConfig config, String name) {
return "Hello, " + name + "! Your API key is " + config.getApiKey();
}
}
Step 3: Build and test the connector in Anypoint Studio
Perform the following actions:
Anypoint Exchange offers hundreds of pre-built connectors that simplify the integration with popular applications and protocols. Real-world examples include Salesforce integration using the Salesforce connector or SAP order management using the SAP connector.
Many retail companies use Salesforce as their Customer relationship management (CRM) system to manage leads, opportunities, and customer interactions. These companies also use Enterprise Resource Planning (ERP) systems like SAP, NetSuite, or Oracle E-Business Suite to handle back-office operations such as order processing, inventory management, and finance. Without integration, these systems will work as silos, which leads to duplicate data entry, data inconsistency, and other issues. With MuleSoft, businesses can use the pre-built Salesforce connector and ERP connectors to automate flows to:
CurieTech AI can be used here; it is an intelligent assistant built specifically for software developers. The coding agents of CurieTech AI create these integrations.

Now, describe the integration in plain English text and select an appropriate configuration like `Enable MUnit test`

Whenever a sales rep creates or updates a customer in Salesforce, MuleSoft automatically syncs that data with the ERP to create or update a corresponding customer, like this:

In this integration, the Salesforce connector and the SAP connector are used. The dependency can be found in pom.xml with version and other details:
<dependencies>
<!-- Salesforce Connector -->
<dependency>
<groupId>com.mulesoft.connectors</groupId>
<artifactId>mule-salesforce-connector</artifactId>
<version>10.18.0</version>
<classifier>mule-plugin</classifier>
</dependency>
<!-- SAP Connector -->
<dependency>
<groupId>com.mulesoft.connectors</groupId>
<artifactId>mule-sap-connector</artifactId>
<version>5.9.12</version>
<classifier>mule-plugin</classifier>
</dependency>
...
</dependencies>{{banner-large="/banners"}}
In many enterprises, SAP is the backend record system for order management, inventory, billing, and supply chain processing. However, front-end applications like e-commerce or mobile apps must interact with the SAP system to place orders, check availability, or track deliveries.
CurieTech AI can create this integration automatically. It uses artificial intelligence to automatically handle many time-consuming, repetitive jobs in building a MuleSoft application. These include writing code, creating diagrams for technical documentation, and generating tests to produce high-standard tested code.
In CurieTech AI, we can perform this integration using a coding agent by describing the task in plain English. Explain the task straightforwardly: “Process to do SAP Order Processing using the SAP connector.”

After clicking the `Coder` code generator the following screen will show up:

A sample configuration automatically generates a complete Order Management project using the SAP connector.

Then, download the project and import it into Anypoint Studio. Set up the SAP connector parameter in the property file and test the AI-generated order management project.

The SAP dependency can be found in pom.xml with version and other details:
<dependencies>
<!-- SAP Connector -->
<dependency>
<groupId>com.mulesoft.connectors</groupId>
<artifactId>mule-sap-connector</artifactId>
<version>5.9.12</version>
<classifier>mule-plugin</classifier>
</dependency>
...
</dependencies>The order management flow generated above is a bit complex, so we can use the diagram generator provided by the Documentation agent to draw a sequence diagram of the flow to understand it better.

The output of the AI agent is like this:

Now we can generate tests using the MUnit test generator of the Testing agent.


Here is the test of that order flow:

While MuleSoft connectors are robust, they’re not magic bullets; they come with some challenges:
{{banner-large-table="/banners"}}
MuleSoft connectors are the building blocks of powerful system integration. They eliminate major integration bottlenecks by providing a pre-built solution for the most common systems, like Salesforce, SAP, and databases, or by developing custom ones for unique or old systems. The benefits of connectors are clear: faster development, fewer errors, and simpler maintenance. As AI-driven integration evolves, the future promises even faster, smarter, and more resilient connectivity. Mule connectors are a strategic necessity today so businesses can stay ahead in an interconnected digital world.