Something went wrong. Try again.
mirror of github.com/PrefectHQ/fastmcp
Something went wrong. Try again.
12345678910111213141516171819202122232425262728---title: __init__sidebarTitle: __init__---
# `fastmcp.server.openapi`
OpenAPI server implementation for FastMCP.
.. deprecated:: This module is deprecated. Import from fastmcp.server.providers.openapi instead.
The recommended approach is to use OpenAPIProvider with FastMCP:
from fastmcp import FastMCP from fastmcp.server.providers.openapi import OpenAPIProvider import httpx
client = httpx.AsyncClient(base_url="https://api.example.com") provider = OpenAPIProvider(openapi_spec=spec, client=client)
mcp = FastMCP("My API Server") mcp.add_provider(provider)
FastMCPOpenAPI is still available but deprecated.