Add Routes

Once you create a server you can add API routes as either tools or resources. MCP resources are meant to be function that retrieve information (i.e. GET requests). MCP tools are meant to be functions that change the state of a system (i.e. POST, PATCH requests). Most MCP clients currently only support MCP tools - so for now we recommend adding all API routes as tools.

There are two options for adding routes - providing an OpenAPI spec or adding routes manually. We recommend starting with an OpenAPI spec if possible, you can always modify the imported routes or add routes manually later.

Import From OpenAPI Spec

Click Import Routes: If you have no routes, click the large Import OpenAPI Spec button. Once you have routes, use the import icon to the right.

MCP Fabric OpenAPI Spec Route Import Buttons

Specify OpenAPI Spec Path: MCP Fabric will attempt to fetch the openapi.json from BASE_ENDPOINT/openapi.json. If the OpenAPI spec is not found there, you will need to manually enter the path to the spec.

MCP Fabric will parse the spec and generate tools from it. You can choose which routes to import to your server. Generally you will only import a subset of all the routes available. Adding too many tools to your server may cause your LLM to hallucinate.

MCP Fabric OpenAPI Spec Route Import Modal

Import Routes: Once you have selected your desired routes, click Import Selected Routes.

Edit Routes: If the OpenAPI spec did not include good summaries and descriptions of the routes, you may want to update them to help your LLMs understand how to use the tools.

Manual Input

If the API does not have an OpenAPI spec, you can add routes manually. This is fine for simpler APIs but may be difficult for more complicated APIs.

Click Add Route: If you have no routes, click the large Add Route button. Once you have routes, use the add route button icon the right.

MCP Fabric Add API Route Buttons

Add route details

  • Method: The HTTP method.
  • Path: The route path after the base endpoint.
  • Name: The name of the MCP Tool / Resource.
  • Summary: A summary of what the tool / resource does.
  • Description: (Optional) A more detailed description of what the tool / resource does.
  • Primitive Type: The MCP primitive type, either Tool or Resource. Most MCP clients currently only support tools - so it you enter resource, it may not show up in your client.
  • Parameters: Path, query, header, & cookie parameters.
  • Request Body: The content schema of your request body. Generally only used if you imported from an OpenAPI Spec.
  • Responses: Responses from the API route. Generally only used if you imported from an OpenAPI Spec.

MCP Fabric Add API Route Form

Click Save