Introduction
Starting in version 2026.2, FME Flow now has MCP (Model Context Protocol) server capabilities, which allow users to build custom MCP servers that host callable MCP tools. Each tool is linked to a specific workspace that has been published to FME Flow, giving your AI agent secure, controlled access to your data workflows.
To make the most of this new feature, workspaces that are intended for use as an MCP tool should be authored using the MCP writer. This format currently supports text, image, and audio output content to be passed to your AI agent. In this tutorial, we will cover how to build an MCP server/tool in FME Flow, as well as how to author a workspace that returns image content to your MCP client. We will cover two scenarios - first, a basic example of how to retrieve existing images stored on a local or network file directory; and second, a slightly more complex example of how to build a workspace that generates an image based on user input, and then passes it to the MCP writer.
Depending on the MCP client/AI service you are using, you may run into file size limitations (disk space or pixel size). If you are attempting to return large image files via the MCP writer, you may want to do some additional image processing before writing your final image. Please see our other articles on common imagery tasks and raster resampling in FME for more information.
Requirements
- FME Form and FME Flow version 2026.2 or later
- MCP-compatible client/AI service
- If your FME Flow installation is publicly accessible, a cloud-based service can be used (e.g. Claude, Gemini, etc.)
- If your FME Flow installation is not publicly accessible, a local service can be used (e.g. LM Studio), or you can connect to a cloud service that has a local “developer mode” (see this support article from Anthropic for more information)
Step-by-Step Instructions
Part 1: Creating an MCP Server/Tool
1. Create an MCP Server on FME Flow
If you already have an MCP server in FME Flow that you would like to host these tools instead, skip this step and proceed with creating the MCP tools in Step 2 of this section.
Log in to the FME Flow user interface, and navigate to the MCP Servers section in the left-hand menu bar. Click Create to open the MCP server creation dialogue.
Provide the following values for our MCP server:
- Title: Image Tools MCP Server
- Name: imagetools
- Description: This MCP server hosts tools that will return image content to the end user via the MCP writer in an FME workspace.
- Job Queue: Default
- Authentication Method: Unauthenticated
Leave all other values as their defaults, and click Create.
2. Create MCP Tool
After creating the MCP server, switch from the Server Details tab to the Tools tab, and click Create to create a new tool. FME Flow allows you to create and save MCP tools even if they do not have an associated workspace. We will simply create the tool for now, and then assign our workspace to it in the next section of this tutorial.
Provide the following values in the tool creation dialogue, under the Details tab:
- Name: fme_logo_tool
- Title: FME logo tool
- Description: This tool retrieves an image of the FME logo in PNG format and presents it to the end user.
Leave all other values as their defaults, and click Create.
Our MCP server, as well as an associated tool, have been created on FME Flow. We are now ready to start authoring our workspaces, which will do all of the work “under the hood” for our tools.
Part 2: Retrieving Images from a File Directory
1. Open FME Workbench and Add AttributeFileReader
Start FME Workbench and click New to create a blank workspace. To get started with building our workspace, navigate to the ribbon menu above the canvas, click Transformer, then search for/select the AttributeFileReader.
In order for our MCP tool to process and display the image properly, our image must be passed in as Base64-encoded data. This transformer will ensure that our image file is read in the correct format.
Double-click the transformer on the canvas to open the transformer parameters. Provide the file path to wherever you have saved the FME logo image (linked in the Files section of this article) in the Source Filename. Then, change the Output Attribute Name of the File Contents to “data”, and click OK.
2. Add AttributeCreator and MCP Writer
In addition to our Base64-encoded image data, the MCP writer also requires a mimeType format attribute value to specify the format of the image file being passed in. To set this value, we will add an AttributeCreator to the canvas and connect it to the output of our AttributeFileReader. Since our logo is in PNG format, we will create our “mimeType” attribute with value “image/png”. See this page for a list of MIME type values for common data formats.
Finally, we will add our MCP Writer to the canvas. In the ribbon menu, click Writer, and then select the MCP (Model Context Protocol) format from the dropdown menu. Give your dataset a name (e.g. output), and click OK.
The writer dialogue will then present three feature type options, representing the current supported content types for the MCP format (Audio, Image, and Text Content). Since we are only concerned with images in this tutorial, deselect the Audio Content and Text Content feature types, then click OK.
Connect the output of the AttributeCreator to the input of the MCP writer. The final workspace should look something like this.
Now that our workspace is finished, we can publish it to FME Flow to be assigned to our MCP tool.
3. Publish Workspace to FME Flow and Assign to MCP Tool
From FME Workbench, publish the workspace to FME Flow. Name the workspace LogoImage.fmw, and place it in a repository of your choice, or, create a new repository (e.g. MCP Tutorial Workspaces) to store your MCP-enabled workspaces. Be sure to include the logo image along with the workspace by selecting the Upload data files option in the publishing wizard.
On the Register Services dialogue, select Job Submitter, and then click Publish.
When a job is submitted via an MCP tool on FME Flow, the transformation services for the associated workspace are not utilized. However, registering the workspace with the Job Submitter service allows the user to manually run the workspace on FME Flow for testing/troubleshooting purposes before connecting it to the MCP tool.
In FME Flow, navigate to the MCP server and tool that we created previously. Under the Details tab, select the appropriate Repository, as well as our newly-published Workspace.
In the Parameters tab, you will notice that we now have a tool parameter (DestDataset_MCP). Since our workspace is being used as an MCP tool, we will not be writing the output to a specific file/location. Therefore, we can ignore this parameter for now and leave it as the default. Alternatively, to prevent from seeing this in the tool dialogue, you can set the MCP destination parameter to Always Hide in the User Parameter dialogue before publishing to FME Flow.
Now that our tool has been configured, we can click Publish to save our changes and make our tool available to our MCP client. We can also start our MCP server by clicking on the green Start MCP Server button in the top-right corner of our MCP server page.
Now, we can finally connect to our MCP server and run our tool!
4. Connect to MCP Server and Run Tool
Using the URL value from the Server Details page in FME Flow, connect your MCP server to your MCP client.
This process will vary depending on the nature of your MCP client (e.g. on-premises vs. in the cloud), as well as the exact service being used (Claude, Gemini, LM Studio, etc.). Please reference the documentation for your specific MCP client for more details on connecting to an MCP server.
Once your server is connected, you will have access to the tool we have created (you may need to give explicit access to the tool, depending on the client you are using). Give your AI assistant a prompt similar to the following:Run fme_logo_tool
You can also use a more conversational approach to calling tools, rather than telling the model the exact name of the tool to run. If the model doesn’t run the expected tool, you may need to modify your server/tool descriptions so that the MCP client has clearer instructions on when to access a specific tool. An example of a more natural, conversational prompt would be something like:Get the FME logo image using the tool from the Image Tools MCP Server
The exact response format will vary depending on the client/assistant you are using. All the examples in this tutorial will show responses returned by Google’s Gemma 4 model running in LM Studio:
We now have a tool that is set up to retrieve and display image files stored on a local or network file directory!
Part 3: Generating an Image via Workspace
In this second scenario, we will be using a workspace that generates a map image that contains current aircraft location data around a given city. The aircraft data comes from an open-source API by ADSB.lol, and our base map will come from OpenStreetMap.
The user will provide a city name as an input parameter, which we will pass to our workspace via the MCP client. The workspace will generate the image based on the user input, and then present the final map image in the tool result.
1. Review Workspace Contents
Download the AirTrafficMap.fmw workspace file from the Files section of this article, and open it in FME Workbench.
The workspace is divided into 5 major sections:
- Based on the city name value provided by the user, an AttributeCreator will create latitude/longitude attributes to use in our data query.
- Using the lat/long values, an HTTPCaller sends a request to the ADSB.lol API, returning current flight data within 50 nautical miles of our city. We also do some attribute extracting and cleaning here to prep our data for visualization.
- Point geometries are created for each aircraft, which are then stylized as both point symbols, as well as labels containing each aircraft’s callsign.
- Using the bounding box of the returned data, the OpenStreetMap base map is read in, and the proper data attribution text is created.
- Finally, our vector layers are overlaid on our raster base map. The raster is then extracted as encoded data, and sent to our MCP writer.
2. Publish to FME Flow and Create an MCP Tool
This workspace is ready to go as-is, so we can now publish it to FME Flow, following the same process as our previous workspace.
After publishing the workspace, we will need to create an associated tool on our MCP server that will run the workspace. In FME Flow, navigate to our MCP server. Under the Tools dialogue, create a new tool with the following values in the Details tab:
- Name: air_traffic_tool
- Title: Air traffic tool
- Description: This tool generates a map in PNG format, which contains current aircraft data around a user-specified city.
- Repository: MCP Tutorial Workspaces (or whatever repository you’ve chosen)
- Workspace: AirTrafiicMap.fmw
Leave all other values as their defaults. Then, move to the Parameters tab and provide a Description for our CITY parameter (e.g. “The city value to be provided by the user”).
Click Create to create the tool, and then Publish to make it visible to the MCP client. Since our MCP server is still running and has already been connected to our MCP client, we can now run the tool!
3. Run Tool
In the MCP client chat, provide a prompt that will run our tool for one of the pre-determined city locations (Vancouver, Toronto, New York, London, Paris, or Rome), similar to the following:Show me an image of the current air traffic around the city of Rome
Your image will differ from the example above depending on when you run your workspace, as well as what city you have chosen.
We now have a functional MCP tool that generates a map image based on user input, and then presents the image to the user within our AI assistant chat - all thanks to the power of FME working behind the scenes!
Troubleshooting
If your MCP client does not recognize your MCP server or tool, ensure that your server on FME Flow is running, and that your tool has been saved and published.
If the air traffic workspace fails, there may not be any available flight data within 50 nautical miles of your chosen city. Check the job logs in FME Flow to see the exact nature of any errors that are not reported by the MCP client.
Additional Resources
Getting Started with MCP in FME
Getting Started with FME Flow as an MCP Server
Returning Text Content from an FME MCP Tool