Podcast Title

Author Name

0:00
0:00
Album Art

How to Turn Any API into an AI-Controllable Tool with Postman's MCP Generator

By 10xdev team July 24, 2025

In one of my previous articles, I said that the front end is dead. To explain what I meant, I'm going to talk to you about APIs.

The Rise of AI-Driven Applications

Every app you build is controlled by its internal APIs, and when it needs to fetch data from external sources, it uses external APIs. These internal APIs can actually be hosted on MCP servers, which is a protocol that allows AI agents powered by large language models to control those APIs. If they are able to control the APIs, they can effectively control the entire application. This means you no longer need a traditional front end to manage everything, because AI models can now operate the whole app on your behalf.

You can use the fast-api-mcp library to set this up. These MCPS can now be integrated directly into AI agents, which you can configure inside your applications. I demonstrated a library called mcp-us where you simply plug in the MCP, and the library automatically gives you an agent. In this way, you are essentially programming large language models to control your application using these MCPs.

Now, when it comes to external APIs, if you are developing applications that rely heavily on outside data, you are still going to need them. For example, if your app wants to use location or navigation data from Google Maps, then it will need access to those external APIs. We are now moving toward AI-driven applications, so the question becomes: how would your AI agent access that data?

Introducing Postman's MCP Generator

Today, I want to show you a really simple way to make that happen. I'll be introducing you to Postman's new MCP generator. Postman, as you might know, is a platform used for testing APIs, but now they have introduced a powerful tool that lets you generate an MCP server for any API you want. What's even better is that the server is hosted locally, not on some remote platform. So, any application you build can include the MCP server right within it.

Let's search for Google Maps, just like I mentioned earlier. You'll see there are multiple API documentation sets available for it. If we open up the core APIs, we can see a wide variety of data ready for use.

Note: - The Air Quality API contains a huge amount of information that you can access and use freely. - The Roads API is another great example. You can pull whatever data you need and implement it in your application without much complexity.

Postman has provided a very straightforward method for setting this up. In this article, I'm going to show you how to generate an MCP server for any API you choose. The API documentation available is vast and detailed. You'll find documentation for platforms like Figma, X, and OpenAI, as well as financial APIs like those for Mastercard and Stripe. It's an incredibly wide-ranging collection, and the best part is you can generate MCP servers for any of them. Even if you do not want to integrate them into your own applications, you can still use them inside Claw Desktop, where they can be operated however you see fit.

Step-by-Step Guide to Generating an MCP Server

Let me guide you through the entire process of what you actually need to do.

  1. Find Your API: For any API you want to convert into an MCP server, you simply begin by searching for it. If you have learned programming the traditional way, you will probably remember that one of the very first projects many of us completed while learning to work with APIs was a simple weather map application. In my own case, I used the OpenWeatherMap API as part of my learning process. Right here, you can see several different types of APIs available for use.

  2. Select API Requests: This section is focused on documentation, but the important thing is that all of these APIs are going to be converted into tools for your MCP server. If we go ahead and select all of them, each of the three requests will be turned into individual tools that belong to a single MCP server. In our case, that would be the OpenWeather MCP server, which will now include these three tools. You can see that it shows three requests have been selected.

  3. Add and Generate: The next step is to add them, and once that is done, you will see that the requests have been added. Now, we just need to click on the Generate button. After about 10 to 30 seconds, the MCP server will be fully generated.

Running the MCP Server Locally

Once it is ready, you will notice that the MCP server has been created, but it is not hosted on any remote server. This MCP server is designed to run locally on your own machine. To make that possible, they provide a zip file that contains the complete codebase for the MCP server, which you can run locally.

  1. Download and Extract: All you need to do at this point is download the zip file. Once the zip file has been downloaded, extract it and place it into any folder you prefer. I am going to move it into this folder.

  2. Install Dependencies: Now that the folder has been successfully moved, I am going to open my terminal. I will navigate into the folder I just copied, which is named Postman-MCP-server. Inside this MCP server folder, I will run the command to install all the necessary dependencies.

    npm install
    

    If this part is unfamiliar, there is actually a full guide that explains everything I am doing right now.

  3. Run the Server: Once npm install completes, we are ready to run the server locally. All the dependencies have now been installed. The next command we need to run is:

    node mcp.server.js
    

    This JavaScript file will start our MCP server. Once that command has been run, the MCP server will be up and running. We can stop it at this point and also open it to see how it works.

Another important thing to keep in mind is that every MCP server you create will include environment variables or API keys that need to be set. Postman handles this by automatically inserting them into your .env file. All you need to do is retrieve the appropriate keys, paste them into the file, and your MCP server will be ready to use. You no longer have to pass the API key manually through the MCP server command, which is a helpful feature.

This is the MCP server file, and this is the MCP that has been generated for us. You can go ahead and modify it however you want, which is a really useful option.

Now, Postman has also mentioned that we can test the MCP server using Postman itself. This functionality is not limited to just the MCP servers generated by Postman; you can test any MCP server using Postman, which is incredibly convenient.

Integrating with an AI Agent (Cursor Example)

But what if you want to run your MCP server in Cursor? I am going to show you how to do that.

First, I need to get the API key. I am here in the OpenWeather dashboard and I have my API key available. Now, I am going to head back into Cursor, open the .env file, and paste my API key there.

Now, here in Cursor, in the MCP servers section, this is what you are going to do:

  1. Add a Global MCP Server: First, we are going to add a global MCP server. Since we do not have a template to paste at the moment, I am going to ask it to generate a simple MCP template that will be used with Node going forward.

  2. Configure the Path: The template has now been generated. We do not need the environment file that came with it, so let's go ahead and remove that. You can see that the command is currently set to run with Node. Next, we need to replace the path with the actual location of our MCP server. To do that, go back to your terminal. You will see the path where your MCP server is located. To get the full path, simply type the command to print the working directory and press enter. The output will give you the complete directory path.

  3. Update Settings: Inside Cursor, you are going to paste that full path, followed by the file name mcp.server.js. For example:

    /path/to/your/Postman-MCP-server/mcp.server.js
    

    The command stays as node, and now you can rename the server to anything you like. For example, let's name it Weather MCP Agent.

At this point, we have the Weather MCP Agent created. Press Command + S to save the JSON file. If you go back into your settings, you will see that the MCP server is now listed, and all the tools are available. These tools include get_weather_history, get_current_weather, and get_forecasted_weather. There are no issues showing up, which means the API key has been placed correctly and everything is being accessed without any problems.

Demonstration and Possibilities

The MCP server is now running, and you can follow this same approach for any other platform. Whether you are working with Windin, Surf, Cloud, or Desktop, it will work with all of them. If you want to build agents around it, you can use the mcp-us library. This is a very powerful library that allows you to use MCP servers as agents directly in your code.

For instance, if your application is based around weather information, you could add this MCP server agent into it and create a feature where a user gives a voice command with the name of a place, and the app automatically returns the weather data. There is so much you can do with this.

If you browse through the available options, you will notice there are a huge number of documented APIs. For example, you can use the Discord API if you are building a social media automation tool that reposts content across different platforms. Everything is already here, and you do not have to build it manually; a language model can handle everything for you through the MCP server.

If you run a search, you will even find an official Instagram API workspace. You can also find one for Facebook and for X as well. This is a really powerful tool, and the number of things you can build with it is truly impressive.

Here is an example of an interaction. I asked it about the weather in the UK, specifically in Birmingham. It called the tool, passed in the location along with the units in which we wanted the temperature, and successfully retrieved the current weather. It used the get_current_weather tool and it responded that the temperature is 18°C. If we go and check, we can confirm that it is accurately fetching the data from the OpenWeather API.

That brings us to the end of this article. As always, thank you for reading, and I'll see you in the next one.

Join the 10xdev Community

Subscribe and get 8+ free PDFs that contain detailed roadmaps with recommended learning periods for each programming language or field, along with links to free resources such as books, YouTube tutorials, and courses with certificates.

Recommended For You

Up Next