Back to Fastmcp

__init__

docs/python-sdk/fastmcp-server-providers-openapi-__init__.mdx

4.0.0487 B
Original Source

fastmcp.server.providers.openapi

OpenAPI provider for FastMCP.

This module provides OpenAPI integration for FastMCP through the Provider pattern.

Example: ```python from fastmcp import FastMCP from fastmcp.server.providers.openapi import OpenAPIProvider import httpx2

client = httpx2.AsyncClient(base_url="https://api.example.com")
provider = OpenAPIProvider(openapi_spec=spec, client=client)
mcp = FastMCP("API Server", providers=[provider])
```