Learn how to put your digital team to work with MuleSoft for Agentforce.
Contact Us 1-800-596-4880

MCP Connector 0.1.0-BETA Reference

Anypoint Connector for MCP (MCP Connector) allows Mule applications to act as both MCP servers and clients. This beta version includes support for tools and resources.

Configurations

Client

Configuration element that acts as a client and connects to an MCP server.

Parameters

Name Type Description Default Value Required

Name

String

Name for this configuration. Connectors reference the configuration with this name.

x

Connection

The connection types to provide to this configuration.

x

Client Name

String

Name the client uses to identify itself during the protocol initialization phase. This isn’t the same as the name given to this config element (which is later referenced through config-ref parameters). This name doesn’t need to be unique.

x

Client Version

String

Version the client uses to identify itself during the protocol initialization phase. This doesn’t need to match the connector or Mule application version.

x

Name

String

ID used to reference this configuration.

x

Expiration Policy

Configures the minimum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration.

Connection Types

SSE Client

The SSE (Server-Sent Events) Client connection type enables MCP Connector to establish a persistent, one-way (server-sent) connection to an MCP server using the SSE standard. This type of connection allows the MCP server to push real-time updates and messages to the client without the need for the client to constantly poll for new information.

Parameters
Name Type Description Default Value Required

Server Url

String

Base URL for the target MCP server.

x

Sse Endpoint Path

String

/sse

Request Timeout

Number

Sets the duration to wait for server responses before timing out requests.

30

Request Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time Unit for the Request Timeout parameter.

SECONDS

Reconnection Delay

Number

Specifies how long to wait before reinitializing the SSE connection when it times out or closes.

500

Reconnection Delay Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time Unit for the Reconnection Delay.

MILLISECONDS

Authentication

HttpRequestAuthentication

Tls Context Factory

TLS

Reconnection

When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.

Supported Operations

Server

Configuration element to act as an MCP server.

Parameters

Name Type Description Default Value Required

Name

String

Name for this configuration. Connectors reference the configuration with this name.

x

Connection

Connection types to provide to this configuration.

x

Server Name

String

Name this server uses to identify itself during the protocol initialization phase. This isn’t the same as the name given to this config element (which is later referenced through config-ref parameters). This name doesn’t need to be unique.

x

Server Version

String

Version this client uses to identify itself during the protocol initialization phase. This doesn’t need to match the connector or Mule application version.

x

Name

String

ID used to reference this configuration.

x

Subscribe

Boolean

Whether to allow clients to subscribe to resource updates.

true

List Changed

Boolean

Whether to enable notifications for changes to the tool list.

true

Connection Types

SSE Server

Exposes the MCP server using the Server-Sent Events (SSE) transport, as defined in HTTP With SSE. This allows MCP clients to establish persistent, one-way connections to this server to receive real-time updates and messages.

This connection type works only if Mule is started with the mule.http.service.implementation=NETTY system property.
Parameters
Name Type Description Default Value Required

Listener Config

String

Reference to the <http:listener-config> used to expose the SSE and messaging endpoints.

x

Sse Endpoint Path

String

Endpoint path clients use to initiate the SSE connection.

/sse

Messages Path

String

Path the messaging endpoint request will be sent to.

/message

Reconnection

When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.

Supported Operations

Operations

Call Tool

<mcp:call-tool>

Invokes a tool in a remote MCP server.

Parameters

Name Type Description Default Value Required

Configuration

String

Name of the configuration to use.

x

Tool Name

String

Name of the tool to invoke.

x

Arguments

Object

The tool’s input arguments.

#[payload]

Config Ref

ConfigurationProvider

Name of the configuration to use to execute this component.

x

Additional Properties

Object

#[null]

Target Variable

String

Name of the variable that stores the operation’s output.

Target Value

String

Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field.

#[payload]

Error Mappings

Array of Error Mapping

Set of error mappings

Reconnection Strategy

Retry strategy in case of connectivity errors.

Output

Type

Call Tool Response

Attributes Type

Any

For Configurations

Throws

  • MCP:CONNECTIVITY

  • MCP:RETRY_EXHAUSTED

List Resources

<mcp:list-resources>

Lists all the available resources in the remote MCP server.

Parameters

Name Type Description Default Value Required

Configuration

String

Name of the configuration to use.

x

Config Ref

ConfigurationProvider

Name of the configuration to use to execute this component.

x

Streaming Strategy

Configures how Mule processes streams. Repeatable streams are the default behavior.

Target Variable

String

Name of the variable that stores the operation’s output.

Target Value

String

Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field.

#[payload]

Error Mappings

Array of Error Mapping

Set of error mappings

Reconnection Strategy

Retry strategy in case of connectivity errors.

Output

Type

Array of Resource Metadata

For Configurations

Throws

  • MCP:CONNECTIVITY

  • MCP:RETRY_EXHAUSTED

List Tools

<mcp:list-tools>

Lists all the available tools in the remote MCP server.

Parameters

Name Type Description Default Value Required

Configuration

String

Name of the configuration to use.

x

Config Ref

ConfigurationProvider

Name of the configuration to use to execute this component.

x

Streaming Strategy

Configures how Mule processes streams. Repeatable streams are the default behavior.

Target Variable

String

Name of the variable that stores the operation’s output.

Target Value

String

Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field.

#[payload]

Error Mappings

Array of Error Mapping

Set of error mappings

Reconnection Strategy

Retry strategy in case of connectivity errors.

Output

Type

Array of Tool Metadata

For Configurations

Throws

  • MCP:CONNECTIVITY

  • MCP:RETRY_EXHAUSTED

Ping

<mcp:ping>

Pings the remote server.

Parameters

Name Type Description Default Value Required

Configuration

String

Name of the configuration to use.

x

Config Ref

ConfigurationProvider

Name of the configuration to use to execute this component.

x

Target Variable

String

Name of the variable that stores the operation’s output.

Target Value

String

Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field.

#[payload]

Error Mappings

Array of Error Mapping

Set of error mappings.

Reconnection Strategy

Retry strategy in case of connectivity errors.

Output

Type

Any

Attributes Type

Any

For Configurations

Throws

  • MCP:CONNECTIVITY

  • MCP:RETRY_EXHAUSTED

Read Resource

<mcp:read-resource>

Reads a resource referenced by its URI.

Parameters

Name Type Description Default Value Required

Configuration

String

Name of the configuration to use.

x

Uri

String

x

Config Ref

ConfigurationProvider

Name of the configuration to use to execute this component.

x

Additional Properties

Object

#[null]

Target Variable

String

Name of the variable that stores the operation’s output.

Target Value

String

Expression that evaluates the operation’s output. The outcome of the expression is stored in the Target Variable field.

#[payload]

Error Mappings

Array of Error Mapping

Set of error mappings

Reconnection Strategy

Retry strategy in case of connectivity errors.

Output

Type

Resource Content

Attributes Type

Any

For Configurations

Throws

  • MCP:CONNECTIVITY

  • MCP:RETRY_EXHAUSTED

Add Static Resource

<mcp:add-static-resource>

Dynamically adds a resource by providing its metadata and static content.

Parameters

Name Type Description Default Value Required

Configuration

String

Name of the configuration to use.

x

Name

String

Resource name.

x

Uri

String

Resource URI.

x

Description

String

Resource description.

x

Mime Type

String

Resource MIME type.

x

Resource Content

Resource definition.

x

Config Ref

ConfigurationProvider

Name of the configuration to use to execute this component.

x

Error Mappings

Array of Error Mapping

Set of error mappings.

Reconnection Strategy

Retry strategy in case of connectivity errors.

For Configurations

Throws

  • MCP:CONNECTIVITY

  • MCP:RETRY_EXHAUSTED

Sources

On New Session Listener

<mcp:on-new-session-listener>

Parameters

Name Type Description Default Value Required

Configuration

String

Name of the configuration to use.

x

Primary Node Only

Boolean

Determines whether to execute this source on only the primary node when running Mule instances in a cluster.

Config Ref

ConfigurationProvider

Name of the configuration to use to execute this component.

x

Redelivery Policy

Defines a policy for processing the redelivery of the same message.

Reject With Status Code

Number

Reject With Message

String

Output

Type

New Session Request

Attributes Type

Any

For Configurations

Resource listener

<mcp:resource-listener>

Exposes a resource which content is generated by the execution of the owning flow. The flow will be executed for every received resources/read request. The user can choose to implement the flow so that the resource content is static or to make it dynamic. For instance, a dynamic resource could be a expenses.csv file, that is actually the result of executing a live DB query. Or a static resource could be a file obtained through Amazon S3 and locally cached using the <ee:cache> component.

Parameters

Name Type Description Default Value Required

Configuration

String

Name of the configuration to use.

x

Name

String

Name of the resource.

x

Description

String

Detailed enough description for an LLM to determine when to read this resource.

x

Uri

String

Resource URI.

x

Resource Mime Type

String

Resource MIME type.

x

Primary Node Only

Boolean

Determines whether to execute this source on only the primary node when running Mule instances in a cluster.

Config Ref

ConfigurationProvider

Name of the configuration to use to execute this component.

x

Redelivery Policy

Defines a policy for processing the redelivery of the same message.

Reconnection Strategy

Retry strategy in case of connectivity errors.

Resource Content

Defines the resource content and type. These parameters are evaluated when the flow finishes successfully (when the payload and variables available).

x

Output

Type

Resource Request

Attributes Type

For Configurations

Tool Listener

<mcp:tool-listener>

Exposes a tool which result is generated by the execution of the owning flow. The flow will be executed for every received tools/call request. When triggered, the flow will be executed with a message which payload is a Java map holding the input arguments. The tool response is generated when the flow finishes either successfully or with error. In both cases, the response can include several content items of different types. If no error response is defined, then a text content item holding the error’s description will be generated automatically.

Parameters

Name Type Description Default Value Required

Configuration

String

Name of the configuration to use.

x

Name

String

The tool’s name

x

Description

String

A detailed enough description for an LLM to determine when this tool should be called

x

Parameters Schema

String

A JSON schema defining an object which fields will act as the tool’s input arguments

x

Primary Node Only

Boolean

Determines whether to execute this source on only the primary node when running Mule instances in a cluster.

Config Ref

ConfigurationProvider

Name of the configuration to use to execute this component.

x

Redelivery Policy

Defines a policy for processing the redelivery of the same message.

Reconnection Strategy

Retry strategy in case of connectivity errors.

Responses

Response items when the flow finishes successfully.

x

On Error Responses

Content items when the flow finishes in error.

Output

Type

Object

Attributes Type

Request Attributes

For Configurations

Types

TLS

Configures TLS to provide secure communications for the Mule app.

Field Type Description Default Value Required

Enabled Protocols

String

Comma-separated list of protocols enabled for this context.

Enabled Cipher Suites

String

Comma-separated list of cipher suites enabled for this context.

Trust Store

Configures the TLS truststore.

Key Store

Configures the TLS keystore.

Revocation Check

Configures a revocation checking mechanism.

Truststore

Configures the truststore for TLS.

Field Type Description Default Value Required

Path

String

Path to the truststore. Mule resolves the path relative to the current classpath and file system.

Password

String

Password used to protect the truststore.

Type

String

Type of store.

Algorithm

String

Encryption algorithm that the truststore uses.

Insecure

Boolean

If true, Mule stops performing certificate validations. Setting this to true can make connections vulnerable to attacks.

Keystore

Configures the keystore for the TLS protocol. The keystore you generate contains a private key and a public certificate.

Field Type Description Default Value Required

Path

String

Path to the keystore. Mule resolves the path relative to the current classpath and file system.

Type

String

Type of store.

Alias

String

Alias of the key to use when the keystore contains multiple private keys. By default, Mule uses the first key in the file.

Key Password

String

Password used to protect the private key.

Password

String

Password used to protect the keystore.

Algorithm

String

Encryption algorithm that the keystore uses.

Standard Revocation Check

Configures standard revocation checks for TLS certificates.

Field Type Description Default Value Required

Only End Entities

Boolean

Which elements to verify in the certificate chain:

  • true

Verify only the last element in the certificate chain.

  • false

Verify all elements in the certificate chain.

Prefer Crls

Boolean

How to check certificate validity:

  • true

Check the Certification Revocation List (CRL) for certificate validity.

  • false

Use the Online Certificate Status Protocol (OCSP) to check certificate validity.

No Fallback

Boolean

Whether to use the secondary method to check certificate validity:

  • true

Use the method that wasn’t specified in the Prefer Crls field (the secondary method) to check certificate validity.

  • false

Don’t use the secondary method to check certificate validity.

Soft Fail

Boolean

What to do if the revocation server can’t be reached or is busy:

  • true

Avoid verification failure.

  • false

Allow the verification to fail.

Custom OCSP Responder

Configures a custom OCSP responder for certification revocation checks.

Field Type Description Default Value Required

Url

String

URL of the OCSP responder.

Cert Alias

String

Alias of the signing certificate for the OCSP response. If specified, the alias must be in the truststore.

CRL File

Specifies the location of the certification revocation list (CRL) file.

Field Type Description Default Value Required

Path

String

Path to the CRL file.

Reconnection

Configures a reconnection strategy for an operation.

Field Type Description Default Value Required

Fails Deployment

Boolean

When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.

Reconnection Strategy

Reconnection strategy to use.

Reconnect

Field Type Description Default Value Required

Frequency

Number

How often in milliseconds to reconnect.

Count

Number

How many reconnection attempts to make.

blocking

Boolean

If false, the reconnection strategy runs in a separate, non-blocking thread.

true

Reconnect Forever

Field Type Description Default Value Required

Frequency

Number

How often in milliseconds to reconnect.

blocking

Boolean

If false, the reconnection strategy runs in a separate, non-blocking thread.

true

Expiration Policy

Configures an expiration policy strategy.

Field Type Description Default Value Required

Max Idle Time

Number

Configures the maximum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration.

Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Max Idle Time field.

Call Tool Response

Field Type Description Default Value Required

Contents

x

Error

Boolean

false

Call Tool Response Content

Field Type Description Default Value Required

Type

Enumeration, one of:

  • text

  • image

  • resource

Content type.

x

Text

String

Content’s payload when type is text.

Mime Type

String

Content’s MIME type.

Data

Binary

Content’s payload when type is image.

Resource

Content’s payload when type is resource.

Audience

Array of Enumeration, one of:

  • USER

  • ASSISTANT

Describes who the intended consumer of this data is. It can include multiple entries to indicate content useful for multiple audiences.

Priority

Number

Describes how important this data is for operating the server. A value of 1 means "most important", which indicates that the data is required. A value of 0 means "least important", which indicates that the data is entirely optional.

Resource Content

Field Type Description Default Value Required

Uri

String

Resource URI

x

Mime Type

String

Resource MIME type.

x

Text

String

Content of a text resource. Null for BLOB data types.

Blob

Binary

Content of a BLOB resource. Null for text data types.

Error Mapping

Field Type Description Default Value Required

Source

Enumeration, one of:

  • ANY

  • REDELIVERY_EXHAUSTED

  • TRANSFORMATION

  • EXPRESSION

  • SECURITY

  • CLIENT_SECURITY

  • SERVER_SECURITY

  • ROUTING

  • CONNECTIVITY

  • RETRY_EXHAUSTED

  • TIMEOUT

Target

String

x

Resource Metadata

Field Type Description Default Value Required

Uri

String

Resource URI.

x

Name

String

Name of the resource.

x

Description

String

Description of the resource.

x

Mime Type

String

MIME type of the resource.

x

Repeatable In Memory Iterable

Field Type Description Default Value Required

Initial Buffer Size

Number

The amount of memory to allocate to consume the stream and provide random access to it. If the stream contains more data than can fit into this buffer, then the buffer expands according to the Buffer Size Increment value, with an upper limit of the Max In Memory Size value. instances.

100

Buffer Size Increment

Number

Amount by which the buffer size expands if it exceeds its initial size. Setting a value of 0 or lower specifies that the buffer can’t expand.

100

Max Buffer Size

Number

Maximum size of the buffer. If the buffer size exceeds this value, Mule raises a STREAM_MAXIMUM_SIZE_EXCEEDED error. A value of less than or equal to 0 means no limit.

Repeatable File Store Iterable

Field Type Description Default Value Required

In Memory Objects

Number

Maximum number of instances to keep in memory. If more than the maximum is required, content on the disk is buffered.

Buffer Unit

Enumeration, one of:

  • BYTE

  • KB

  • MB

  • GB

Unit for the In Memory Objects field.

Tool Metadata

Field Type Description Default Value Required

Name

String

Name of the tool.

x

Description

String

A detailed enough description for an LLM to determine when to call this tool.

x

Input Schema

String

JSON Schema describing the tool’s input parameters.

x

New Session Request

Field Type Description Default Value Required

Session Id

String

x

Additional Properties

Object

x

Redelivery Policy

Configures the redelivery policy for executing requests that generate errors. You can add a redelivery policy to any source in a flow.

Field Type Description Default Value Required

Max Redelivery Count

Number

Maximum number of times that a redelivered request can be processed unsuccessfully before returning a REDELIVERY_EXHAUSTED error.

Message Digest Algorithm

String

Secure hashing algorithm to use if the Use Secure Hash field is true. If the payload of the message is a Java object, Mule ignores this value and returns the value that the payload’s hashCode() returned.

Message Identifier

One or more expressions that determine if a message was redelivered. This property can be set only if the Use Secure Hash field is false.

Object Store

ObjectStore

Configures the object store that stores the redelivery counter for each message.

Redelivery Policy Message Identifier

Configures how to identify a redelivered message and how to find out when the message was redelivered.

Field Type Description Default Value Required

Use Secure Hash

Boolean

If true, Mule uses a secure hash algorithm to identify a redelivered message.

Id Expression

String

One or more expressions that determine when a message was redelivered. You can set this property only if the Use Secure Hash field is false.

Resource Request

Field Type Description Default Value Required

Requested Uri

String

x

Request Attributes

Field Type Description Default Value Required

Session Id

String

x

Request Id

String

x

Additional Properties

Object

x

Text Tool Response Content

Field Type Description Default Value Required

Text

String

x

Audience

Array of Enumeration, one of:

  • USER

  • ASSISTANT

Describes who the intended consumer of this data is. It can include multiple entries to indicate content that’s useful for multiple audiences.

Priority

Number

Describes how important this data is for operating the server. A value of 1 means "most important", which indicates that the data is required. A value of 0 means "least important", which indicates that the data is entirely optional.

Image Tool Response Content

Field Type Description Default Value Required

Audience

Array of Enumeration, one of:

  • USER

  • ASSISTANT

Describes who the intended consumer of this data is. It can include multiple entries to indicate content useful for multiple audiences.

Priority

Number

Describes how important this data is for operating the server. A value of 1 means "most important", which indicates that the data is required. A value of 0 means "least important", which indicates that the data is entirely optional.

Data

Binary

The raw image content, without Base64 encoding.

Mime Type

String

The image MIME type.

Text Resource Tool Response Content

Field Type Description Default Value Required

Audience

Array of Enumeration, one of:

  • USER

  • ASSISTANT

Describes who the intended consumer of this data is. It can include multiple entries to indicate content useful for multiple audiences.

Priority

Number

Describes how important this data is for operating the server. A value of 1 means "most important", which indicates that the data is required. A value of 0 means "least important", which indicates that the data is entirely optional.

Uri

String

Resource URI.

Mime Type

String

The resource MIME type.

Text

String

Resource text.

Blob Resource Tool Response Content

Field Type Description Default Value Required

Audience

Array of Enumeration, one of:

  • USER

  • ASSISTANT

Describes who the intended consumer of this data is. It can include multiple entries to indicate content useful for multiple audiences.

Priority

Number

Describes how important this data is for operating the server. A value of 1 means "most important", which indicates that the data is required. A value of 0 means "least important", which indicates that the data is entirely optional.

Blob

Binary

The raw resource content, without Base64 encoding.

x

Uri

String

Resource URI.

Mime Type

String

The resource MIME type.

Text Resource

Field Type Description Default Value Required

Text

String

Text content.

x

Blob Resource

Field Type Description Default Value Required

Blob

Binary

The raw resource content, without Base64 encoding.

x

View on GitHub