fastmcp/docs/python-sdk/fastmcp-server-openapi.mdx
2025-06-24 13:02:03 -05:00

58 lines
1.7 KiB
Text

---
title: openapi
sidebarTitle: openapi
---
# `fastmcp.server.openapi`
FastMCP server implementation for OpenAPI integration.
## Classes
### `MCPType` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/openapi.py#L76" target="_blank">↗</a></sup>
Type of FastMCP component to create from a route.
### `RouteType` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/openapi.py#L95" target="_blank">↗</a></sup>
Deprecated: Use MCPType instead.
This enum is kept for backward compatibility and will be removed in a future version.
### `RouteMap` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/openapi.py#L109" target="_blank">↗</a></sup>
Mapping configuration for HTTP routes to FastMCP component types.
### `OpenAPITool` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/openapi.py#L227" target="_blank">↗</a></sup>
Tool implementation for OpenAPI endpoints.
### `OpenAPIResource` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/openapi.py#L478" target="_blank">↗</a></sup>
Resource implementation for OpenAPI endpoints.
### `OpenAPIResourceTemplate` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/openapi.py#L597" target="_blank">↗</a></sup>
Resource template implementation for OpenAPI endpoints.
### `FastMCPOpenAPI` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/server/openapi.py#L651" target="_blank">↗</a></sup>
FastMCP server implementation that creates components from an OpenAPI schema.
This class parses an OpenAPI specification and creates appropriate FastMCP components
(Tools, Resources, ResourceTemplates) based on route mappings.