Adding a Flex Gateway MCP Server Instance | MuleSoft Documentation
# Adding a Flex Gateway MCP Server Instance
Use Flex Gateway to protect MCP servers that need a flexible and performant gateway that works with distributed and microservices environments and fits into your CI/CD environments.
The following diagram shows the server instance’s upstream and downstream configurations. In this configuration, the downstream service is the service making requests that are completed by the upstream server. These terms represent the direction of dependency, not the direction of information.
## Add a New MCP Server Instance
  1. Navigate to **Anypoint Platform** > **API Manager**.
  2. In **API Administration** , click **Add** and select **Protect MCP server**.
  3. Select a Flex Gateway to deploy the server instance to from the list under **Select a gateway**.
If you don’t see a Flex Gateway listed, or you see a Flex Gateway but its status is **Not Running** , See Install Flex Gateway and Register and Run in Connected Mode for more information.  
---  
  4. Click **Next**.
  5. Select an MCP from the following options:
     * **Select MCP server from Exchange** : If you have an MCP server shared with you through Exchange that you want to manage.
       * Select the server from the list under **Select MCP server**. You can search for a specific server if needed.
     * **Register a new MCP server** : If you want to create a new MCP server asset.
       * Enter a **MCP server name** for the new MCP server asset.
Your server is published to in Exchange after it is protected.   
---  
  6. Click **Next**.
  7. Configure the downstream configuration settings:
Managed Flex Gateway
Field Name | Description | Required | Notes  
---|---|---|---  
Specifies the URL prefix for all server paths, relative to the host root. It must start with a leading slash `/`.  
**Client provider** | Specifies a client provider for the Server. | Anypoint Platform acts as the client provider by default. To configure an external client provider, see Client Providers.  
**Server label** | Specifies a label for the server instance. | If you have multiple managed instances of the same server, add a label to differentiate each instance from the others.  
**Advanced Options**  
**Consumer endpoint** | Specifies a proxy application’s address for consumers to use for sending requests.  
Self-Managed Flex Gateway (Connected Mode)
Field Name | Description | Required | Notes  
---|---|---|---  
Specifies whether to use HTTP or HTTPS. | If you select HTTPS, specify a TLS context for inbound traffic.  
**Inbound TLS** | TLS Context used for the inbound HTTPS traffic. | Configure a TLS Context for Flex Gateway before adding a TLS Context to your server.  
Specifies the number to use if the displayed port is incorrect. | Server instances can share the same port across the same target if the **Base path** is different for both instances.  
Specifies the URL prefix for all server paths, relative to the host root. It must start with a leading slash `/`.  
**Server label** | Specifies a label for the server instance. | If you have multiple managed instances of the same server, add a label to differentiate each instance from the others.  
**Advanced Options**  
**Consumer endpoint** | Specifies a proxy application’s address for consumers to use for sending requests.  
  8. Click **Next**.
  9. Configure one of the server upstream configurations:
Field Name | Description | Required | Notes  
---|---|---|---  
**MCP server upstream URL** | URL to access for the MCP server. This must end with a `/`. | For example, you can use the URL of your server asset in Exchange.  
**Outbound TLS** | TLS Context used for the outbound traffic to the upstream service | Configure a TLS Context for Flex Gateway before adding a TLS Context to your server.  
  10. Click **Next**.
  11. Review your selections and edit them if necessary.
  12. If you are ready to deploy, click **Save & Deploy**. Otherwise, you can select **Save** , to save the API instance and deploy it at a later time.
  13. After your MCP server instance is deployed, you must apply the MCP Support Policy for the server to enable the server to function properly.
  14. Click **Apply now** in the deployment banner.
If the banner is no longer visible, apply the **MCP support Policy** by following the steps in Applying Policies for Managed Flex Gateways and Connected Mode.   
---  
  15. Select the **MCP support Policy**.
There are no parameters to configure for the **MCP support Policy**.
  16. Click **Apply**
Your MCP server instance is now successfully deployed.