Guide

How to convert a REST API to an MCP server

You don't rebuild your API to make it work with AI agents. An MCP server sits in front of it: the agent asks the MCP server for a tool, and the MCP server makes the ordinary HTTP call to your API, the same call your own app would make.

So converting an API to an MCP server is mostly a job of description. Which endpoints should an agent use, what should each one be called, and what does the agent need to be told before it calls one? This guide covers where to start depending on what you already have, a small API converted end to end, and what changes when the API is big.

REST API vs MCP server: what's the difference?

They aren't competitors. The MCP server is a thin layer that describes your REST API in the form AI agents read.

AspectREST APIMCP server
Who calls itYour apps, your customers' code, other servicesAI agents such as Claude, ChatGPT and Cursor
How it is describedDocs written for developers, maybe an OpenAPI specTools with a name, a plain-language description and an input schema
How the caller picks what to callA developer reads the docs and writes the callThe agent reads the tool list and decides for itself
Who holds your API keyThe callerThe MCP server. The agent never sees it

Start from what you already have

You need some description of your endpoints. It doesn't have to be a spec.

An OpenAPI or Swagger spec
Paste its URL or upload the file. This is the most complete starting point. OpenAPI to MCP server explains what each part of the spec becomes.
A Postman collection
Export it as Collection v2.1 (.json) and upload it. Each request in it becomes an endpoint you can keep or leave out.
A few cURL commands
Paste a command in and it becomes an endpoint. If a command carries a key in a header, MCPEasy points it out and drops the value, so you add the key as a credential instead.
The code, but no docs
Point MCPEasy at the GitHub repository. Express and NestJS routes are read exactly; other languages are read by AI, once.
Nothing written down
Type the endpoints by hand: method, path and inputs. It takes about a minute per endpoint.

If you'd rather have a spec anyway, most frameworks can produce one in a few minutes. Get an OpenAPI spec from your framework.

A worked example: a small shop API

Say a shop has this API, built for its own website. A customer-support assistant should be able to answer "where is my order?" and help with cancellations.

Endpoints of the example shop API and the MCP tools they become
EndpointMCP toolWhy
GET /products?q=search_productsRead onlyKept. Customers ask about products.
GET /products/{id}get_productRead onlyKept. The id comes from search_products.
GET /orders/{id}get_orderRead onlyKept. The question asked most often.
POST /orders/{id}/cancelcancel_orderDestructiveKept, with "confirm with the customer first" in its description.
POST /admin/reindexNoneLeft out. Nobody should ask an assistant to rebuild the search index.
GET /healthNoneLeft out. It tells the agent nothing useful.

Six endpoints became four tools. The names say what each one does, so the agent doesn't have to guess what op_3 means.

The descriptions matter more than the names. "Get an order" is weak. "Look up one order by its order number and return its status, items and delivery date. Use it when a customer asks where their order is" tells the agent when to reach for it.

The one tool that changes data is labelled destructive and tells the agent to ask first. If you aren't ready for that, switch it off and start with the three read-only tools.

What changes when the API is big

Four tools are easy. Three hundred are not. When an agent connects and sees hundreds of tools at once, it spends a lot of its context reading them, and it picks the wrong one more often, especially when many of them look alike.

Leaving endpoints out is still the first step. After that, MCPEasy puts the tools of a big API into named groups of at most 40. The agent starts with four tools, list_groups, list_tools, search_tools and call_tool, so it looks at the groups first and opens only the one it needs. You keep one server and one link.

Each server also gets a short guide that agents read when they connect: what the API is for, common jobs step by step, and the rules. Every id input says which tool gives its value, so the agent knows to search for a customer before it asks for that customer's orders.

How to convert an API to an MCP server with MCPEasy

  1. 1

    Import what you have

    Create a server and choose the source: an OpenAPI URL or file, a Postman collection, cURL commands, your GitHub repository, or endpoints typed by hand.

  2. 2

    Choose the tools

    MCPEasy skips internal and health endpoints and writes a first description for each tool. Rename tools, rewrite descriptions, hide parameters the agent should never set, and switch off what you don't want used.

  3. 3

    Add your API's credentials

    The MCP server calls your API with your API key or token. It is encrypted at rest and never sent to the AI client.

  4. 4

    Test it in the Playground

    Ask questions the way a user would and watch each call: which tool the agent picked, the arguments it sent and what your API returned.

  5. 5

    Connect your AI client

    You get a hosted MCP endpoint with its own API keys and rate limits. Paste it into Claude, ChatGPT, Cursor, VS Code or your own agent.

Writing the MCP server yourself

You can also write one by hand with an official MCP SDK: one function per tool, each calling your API. For a handful of endpoints that you want full control over, that is a reasonable choice.

The part people underestimate is what comes after: hosting it, keeping the tools in step as the API changes, giving each agent or customer its own key, rate limits, and logs that show what an agent actually did. That is the part a hosted service takes off your hands.

Questions about converting an API to MCP

Can I convert an API to an MCP server without an OpenAPI spec?
Yes. MCPEasy also starts from a Postman collection, cURL commands, your code on GitHub, or endpoints typed by hand. A spec gives the most complete result, but it isn't required.
What is the difference between a REST API and an MCP server?
A REST API is called by code that a developer writes. An MCP server describes that API as tools an AI agent can choose from by itself, and then calls the REST API for it. The MCP server sits in front of the API; it doesn't replace it.
Can I turn a Postman collection into an MCP server?
Yes. Export the collection as Collection v2.1 (.json) and upload it when you create a server. Each request becomes an endpoint you can keep as a tool or leave out.
Do I have to change my API?
No. The MCP server calls your API over HTTP like any other client, with the credentials you give it.
What happens with an API that has hundreds of endpoints?
Leave out what agents shouldn't use, then let MCPEasy put the rest into groups of at most 40 tools. The agent starts with four tools for browsing and calling, instead of seeing everything at once.
Is it free to try?
Yes. The free plan includes 500 tool calls a month and needs no card. Paid plans start at $19 a month.

Convert your API to an MCP server

Bring a spec, a Postman collection, a few cURL commands or just your code. The free plan includes 500 tool calls a month.