Exposing a REST API as an MCP tool

Get started with MCP by exposing an existing REST API as a tool that AI agents can use.

Before you begin

Before you begin, ensure you have the following:

  • App Connect Enterprise v13.0.7 or later installed
  • At least one REST API flow deployed to an Integration Server
  • Basic understanding of App Connect Enterprise Integration Server
  • MCP Inspector utility (for testing)

About this task

In this task, you will configure an MCP server in the Integration Server and expose an existing REST API as an MCP tool and test it using the MCP Inspector utility.

Procedure

  1. Verify that the REST API is deployed and working

    Before exposing the REST API as an MCP tool, confirm that it is deployed and responding correctly.

    1. Test the REST API endpoint using curl or a web browser
      curl http://localhost:7800/orders/create
    2. Note the endpoint URL for reference
      It is necessary for configuring the MCP tool.
    The REST API should return a valid response, confirming it is deployed and accessible.
  2. Configure the MCP server in server.conf.yaml

    Add the minimal MCP configuration to enable the MCP server in your Integration Server.

    1. Open the server.conf.yaml file for your Integration Server
      This file is typically located in the Integration Server's work directory.
    2. Add the following MCP configuration:
      MCP:
        Runtime:
          mcpStartMode: "automatic"
          port: 7750
      • mcpStartMode: "automatic" - The MCP server starts automatically when MCP tools are deployed
      • port: 7750 - The default port for the MCP server
    3. Save the file
    4. Restart the Integration Server if it is currently running
      The configuration changes take effect after the server restarts.
  3. Expose the REST API through the App Connect Enterprise Web UI

    Use the Web UI to configure the REST API as an MCP tool.

    1. Open the App Connect Enterprise Web UI in your browser
      Navigate to http://localhost:7600 (or your configured Web UI port)
    2. Click the context window to open a list of options.
    3. Select Expose MCP tools.
    4. Select your REST API from the list of available APIs.
    5. Choose which operations to expose
      You can select all operations or choose specific ones to expose as MCP tools.
    6. Configure the tool details:
      • Tool name: Auto-generated based on your API
      • Tool title: Customize the display title for the tool
      • Tool description: Provide a clear description that AI agents will use to understand the tool's purpose
      • Enabled: Choose whether the tool is enabled or disabled
    7. Review your configuration and click Confirm.
    The REST API is now configured as an MCP tool.
  4. Verify that the MCP server is running
    1. Check the Integration Server logs
      Look for a message similar to: MCP Server started on port 7750
    2. Verify the MCP endpoint is accessible
      curl https://localhost:7750/mcp
      Note: By default, the MCP server runs with SSL enabled. If you have disabled SSL in your server.conf.yaml configuration, use http:// instead of https://.
    You receive a response from the endpoint if the MCP server is running correctly,

    If the MCP server is not running:

    • Check the server.conf.yaml file for syntax errors
    • Verify that port 7750 is not already in use by another application
    • Review the Integration Server logs for error messages

Results

Your REST API is now exposed as an MCP tool that AI agents can discover and use. The MCP server is running on your integration server and will automatically start when the server starts (if mcpStartMode is set to automatic).

What to do next

To test your MCP tool, you can use any MCP-compatible client or testing tool. For a list of available MCP developer tools and clients, see MCP Developer Tools.

Important: When connecting to the MCP server, you must use Streamable HTTP rather than Server-Sent Events (SSE) as the transport protocol.

You can also:

  • Configure additional security settings such as authentication and TLS. For more information, see Configuring MCP properties.
  • Expose additional REST APIs as MCP tools by repeating this process.
  • Monitor MCP server activity through the integration server logs.