mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-20 20:44:17 +02:00
chore: Update SDK documentation (#2604)
Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>
This commit is contained in:
parent
ae3c2abbf6
commit
9d5ffa86b3
55 changed files with 3213 additions and 1480 deletions
|
|
@ -6,4 +6,22 @@ sidebarTitle: __init__
|
|||
# `fastmcp.server.openapi`
|
||||
|
||||
|
||||
OpenAPI server implementation for FastMCP - refactored for better maintainability.
|
||||
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.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue