Skip to main content

Documentation Index

Fetch the complete documentation index at: https://gofastmcp.com/llms.txt

Use this file to discover all available pages before exploring further.

fastmcp.server.openapi.server

FastMCPOpenAPI - backwards compatibility wrapper. This class is deprecated. Use FastMCP with OpenAPIProvider instead: 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”, providers=[provider])

Classes

FastMCPOpenAPI

FastMCP server implementation that creates components from an OpenAPI schema. .. deprecated:: Use FastMCP with OpenAPIProvider instead. This class will be removed in a future version. Example (deprecated):
from fastmcp.server.openapi import FastMCPOpenAPI
import httpx

server = FastMCPOpenAPI(
    openapi_spec=spec,
    client=httpx.AsyncClient(),
)