Publish a Sample API to Exchange
Overview
MCP Bridge can only expose APIs that exist in Anypoint Exchange. In this step you’ll publish a minimal Photo Catalog API — a simple REST API with two endpoints — which you’ll turn into MCP tools in later steps.
If you already have an API in Exchange you want to use, you can skip to Create MCP Bridge Instance →.
Step 1 — Obtain the API spec
Download the API specification, or copy the following OAS 3.0 specification to a file and save on your machine:
openapi: "3.0.0"
info:
title: Photo Catalog API
version: "1.0.0"
description: Simple photo catalog for MCP Bridge workshop
paths:
/photos:
get:
operationId: listPhotos
summary: List all photos
description: Returns a paginated list of photos in the catalog.
parameters:
- name: album
in: query
required: false
schema:
type: string
description: Filter photos by album
- name: id
in: query
required: false
schema:
type: integer
default: 20
description: Filter photos by id
responses:
"200":
description: A list of photos
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/Photo"
/photos/{id}:
get:
operationId: getPhoto
summary: Get a photo by ID
description: Returns the full details of a single photo.
parameters:
- name: id
in: path
required: true
schema:
type: string
description: The photo's unique identifier
responses:
"200":
description: Photo details
content:
application/json:
schema:
$ref: "#/components/schemas/Photo"
"404":
description: Photo not found
components:
schemas:
Photo:
type: object
properties:
id:
type: string
albumId:
type: string
title:
type: string
url:
type: number
thumbnailUrl:
type: string
Step 2 — Publish the API
- Log in to MuleSoft Platform
- Navigate to APIs (under the APIs menu)
- Click Add API + → Register Manually
- In the dialog:
- Name:
Photo Catalog API - Type:
REST API - Specification File: Upload the file that you obtained from the previous step.
- Name:
- Click Create
Wait for the confirmation. Your API spec is now available. You can see the Overview link in the confirmation to view the asset.
Important: MCP Bridge references the asset from API catalog by name. The exact asset name (
Photo Catalog API) will be used when you select APIs during bridge configuration.
Step 3 — Create an API instance
MCP Bridge wraps API instances, not just specs. You need a running instance with an upstream URL.
- Go to APIs → Photo Catalog API
- Click Instances → Create Instance
- Choose the Managed Instance
- Under Environment, confirm Sandbox is selected
- Under Omni Gateway, select attendee-gateway
- Under Instance URL, type
photo-catalog - Under Version, select
1.0.0 - Under Label, type
Photo Catalog API
-
On the Target URL , for this workshop use:
https://jsonplaceholder.typicode.com/(A public mock server — sufficient for testing the bridge flow),
- Click Create Intance
Note the Instance ID — you’ll select this when creating the MCP Bridge.
Continue to Create MCP Bridge Instance →