diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 19055052..00000000 Binary files a/.DS_Store and /dev/null differ diff --git a/modules/.DS_Store b/modules/.DS_Store deleted file mode 100644 index c858e8dd..00000000 Binary files a/modules/.DS_Store and /dev/null differ diff --git a/modules/ROOT/.DS_Store b/modules/ROOT/.DS_Store deleted file mode 100644 index c3288384..00000000 Binary files a/modules/ROOT/.DS_Store and /dev/null differ diff --git a/modules/ROOT/assets/.DS_Store b/modules/ROOT/assets/.DS_Store deleted file mode 100644 index a25ef3d6..00000000 Binary files a/modules/ROOT/assets/.DS_Store and /dev/null differ diff --git a/modules/ROOT/assets/image-source-files/.DS_Store b/modules/ROOT/assets/image-source-files/.DS_Store deleted file mode 100644 index 5a334282..00000000 Binary files a/modules/ROOT/assets/image-source-files/.DS_Store and /dev/null differ diff --git a/modules/ROOT/assets/image-source-files/mcp-bridge-instance.graffle b/modules/ROOT/assets/image-source-files/mcp-bridge-instance.graffle new file mode 100644 index 00000000..2b126953 Binary files /dev/null and b/modules/ROOT/assets/image-source-files/mcp-bridge-instance.graffle differ diff --git a/modules/ROOT/assets/images/mcp-bridge-instance.png b/modules/ROOT/assets/images/mcp-bridge-instance.png new file mode 100644 index 00000000..197b11e6 Binary files /dev/null and b/modules/ROOT/assets/images/mcp-bridge-instance.png differ diff --git a/modules/ROOT/nav.adoc b/modules/ROOT/nav.adoc index a510afe6..f8a4ca29 100644 --- a/modules/ROOT/nav.adoc +++ b/modules/ROOT/nav.adoc @@ -7,6 +7,7 @@ *** xref:create-instance-task-mule.adoc[Add a Mule Gateway API Instance] *** xref:create-instance-task-flex.adoc[Add a Flex Gateway API Instance] *** xref:create-instance-task-agent-tool.adoc[Add a Flex Gateway Agent or Tool instance] + *** xref:create-instance-task-mcp-bridge.adoc[Add a Flex Gateway MCP Bridge instance] *** xref:create-instance-public-exchange.adoc[Add an MCP Server from Public Exchange] ** xref:find-api-id-task.adoc[Obtain an API Instance ID] ** xref:export-api-latest-task.adoc[Export an API Instance] diff --git a/modules/ROOT/pages/_partials/task-add-api-instance.adoc b/modules/ROOT/pages/_partials/task-add-api-instance.adoc index 98d36acc..d003434b 100644 --- a/modules/ROOT/pages/_partials/task-add-api-instance.adoc +++ b/modules/ROOT/pages/_partials/task-add-api-instance.adoc @@ -14,12 +14,21 @@ Use Flex Gateway for any agent, broker, LLM, or MCP server that needs a flexible //end::flex-agent-tool-intro[] +//tag::mcp-bridge-intro[] +Use Flex Gateway MCP Bridge to create MCP servers to expose your current API instances as MCP tools so agents can discover and call them. + +//end::mcp-bridge-intro[] + //tag::mule-intro[] -Use Mule Gateway if you have APIs on Mule Runtime that need an API gateway to manage, observe, -and secure your APIs. +Use Mule Gateway if you have APIs on Mule Runtime that need an API gateway to manage, observe, and secure your APIs. //end::mule-intro[] +//tag::public-exchange-intro[] +Use Public Exchange to add an MCP Server from a public exchange asset. + +//end::public-exchange-intro[] + //tag::intro2[] There are three options for adding an API instance: @@ -227,7 +236,7 @@ include::partial$api-configuration-tables.adoc[tags=mule-proxy-upstream] //tag::last-steps[] . Review your selections and edit them if necessary. -. If you are ready to deploy, click **Save & Deploy**. Otherwise, you can select **Save**, to save the API instance +. If you are ready to deploy, click *Save & Deploy*. Otherwise, you can select *Save*, to save the instance and deploy it at a later time. + // end::last-steps[] \ No newline at end of file diff --git a/modules/ROOT/pages/add-api-instances.adoc b/modules/ROOT/pages/add-api-instances.adoc index 77c731d3..68f70ce2 100644 --- a/modules/ROOT/pages/add-api-instances.adoc +++ b/modules/ROOT/pages/add-api-instances.adoc @@ -9,3 +9,5 @@ include::partial$task-add-api-instance.adoc[tags=mule-intro] include::partial$task-add-api-instance.adoc[tags=flex-intro] * xref:create-instance-task-agent-tool.adoc[] + include::partial$task-add-api-instance.adoc[tags=flex-agent-tool-intro] +* xref:create-instance-task-mcp-bridge.adoc[] + +include::partial$task-add-api-instance.adoc[tags=mcp-bridge-intro] diff --git a/modules/ROOT/pages/create-instance-task-mcp-bridge.adoc b/modules/ROOT/pages/create-instance-task-mcp-bridge.adoc new file mode 100644 index 00000000..67b888bf --- /dev/null +++ b/modules/ROOT/pages/create-instance-task-mcp-bridge.adoc @@ -0,0 +1,88 @@ += Adding an MCP Bridge Instance +ifndef::env-site,env-github[] +include::_attributes.adoc[] +endif::[] +:product: flex + +Flex Gateway MCP Bridge enables you to create MCP servers from your existing API instances. With the MCP Bridge, you can expose your current API instances as MCP tools so agents can discover and call them. + +Define your MCP bridge by selecting API instances and mapping them to MCP tools. When an agent requests the list of available tools (`tools/list`),the gateway responds using an MCP descriptor that defines each tool's name, description, and input schema. When an agent calls a tool (`tools/call`), the MCP Bridge maps the tool name and arguments to an HTTP request based on your configuration. + +This diagram shows the relationship of the upstream and downstream configurations to your upstream service and agent client: + +image:mcp-bridge-instance.png[The MCP Bridge instance is deployed on a gateway between the upstream apis and downstream configuration] + +NOTE: MCP Bridge doesn't support API instances with multiple upstream services. + +== Before You Begin + +[[add-server]] +== Add a New Agent or Tool Instance + +To add and a new MCP Bridge for Flex Gateway: + +. Ensure that all API instances you want to add to your MCP Server are running on the same Flex Gateway you want to add your MCP Server to. +. To begin creating your MCP Server instance, you can start from these locations: +** From *API Instances*: +... Click on an API instance you want to add to an MCP Server. +... Click *Actions* > *Add to new MCP Server instance*. + +** From *Agent and Tool Instances*: +... Click *Add* > *MCP Bridge*. +. Select a Flex Gateway to deploy the MCP server instance to from *Select a gateway*. +. Click *Next*. +. Select the API instances you want to add to your MCP Server. +. Define a *MCP asset name*. +. Click *Next*. +. Configure the downstream configuration settings: ++ +.Managed Flex Gateway +[%collapsible] +==== +include::partial$api-configuration-tables.adoc[tags=flex-downstream-agent-tool-managed] +==== ++ +.Self-Managed Flex Gateway (Connected Mode) +[%collapsible] +==== +include::partial$api-configuration-tables.adoc[tags=flex-downstream-agent-tool-self-managed] +==== + +. Click *Next*. +. Configure the upstream services for your API instances: ++ +|=== +| Field Name | Description | Required | Notes +| *Route Label* | Label to better identify multiple API instances. | Yes | By default, the label if the API name. +| *Upstream URL* | URL to access for the upstream service. This must end with a `/`. | Yes | For example, you can use the URL of your asset in Exchange. +| *Outbound TLS* | TLS Context used for the outbound traffic to the upstream service | No | xref:gateway::flex-conn-tls-config.adoc[Configure a TLS Context for Flex Gateway] before adding a TLS Context to your server. +|=== ++ +To switch amoung API instances, select the name of the API. +. Click *Next*. +. Define your API Tools: +.. Select API to map to a tool. +.. Select an HTTP request *Method* and *Resource*. +.. Define an *AI tool name*. +.. Write a tool *Description*. +.. Review the suggested *Input schema* and update it if needed. +. Optionally, click *HTTP mapping* edit the autopopulated HTTP mapping: +.. Map incoming tool params to: ++ +*** *Query Parameters* +*** *URI Parameters* +*** HTTP *Headers* +*** Payload *Body* +.. Define DataWeave expressions to extract the tool params from the incoming request. +. Click *Next*. + +include::partial$task-add-api-instance.adoc[tags=last-steps] + +== Edit the MCP Bridge Instance + +== See Also + +* xref:latest-overview-concept.adoc[] +* xref:anypoint-code-builder::af-define-your-agent-network-specification.adoc[] +* xref:gateway::flex-install.adoc[] +* xref:gateway::flex-conn-reg-run.adoc[]