mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-25 15:04:18 +02:00
Read FastMCP 1.x server metadata directly (SDK v2 drops _mcp_server wrapper)
This commit is contained in:
parent
739de66e8e
commit
3a0944e288
1 changed files with 5 additions and 3 deletions
|
|
@ -358,10 +358,12 @@ async def inspect_fastmcp_v1(mcp: FastMCP1x) -> FastMCPInfo:
|
|||
server_info.website_url if hasattr(server_info, "websiteUrl") else None
|
||||
)
|
||||
|
||||
# SDK v2's MCPServer (FastMCP 1.x) exposes name/instructions/version
|
||||
# directly; the v1 `_mcp_server` low-level wrapper attribute is gone.
|
||||
return FastMCPInfo(
|
||||
name=mcp._mcp_server.name,
|
||||
instructions=mcp._mcp_server.instructions,
|
||||
version=mcp._mcp_server.version,
|
||||
name=mcp.name,
|
||||
instructions=mcp.instructions,
|
||||
version=mcp.version,
|
||||
website_url=server_website_url,
|
||||
icons=server_icons,
|
||||
fastmcp_version=fastmcp.__version__, # Version generating this manifest
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue