mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-15 01:59:10 +02:00
Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>
23 lines
864 B
Text
23 lines
864 B
Text
---
|
|
title: mcp_operations
|
|
sidebarTitle: mcp_operations
|
|
---
|
|
|
|
# `fastmcp.server.mixins.mcp_operations`
|
|
|
|
|
|
MCP protocol handler setup and wire-format handlers for FastMCP Server.
|
|
|
|
## Classes
|
|
|
|
### `MCPOperationsMixin` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/mixins/mcp_operations.py#L44" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
|
|
|
|
|
|
Mixin providing MCP protocol handler setup and wire-format handlers.
|
|
|
|
Note: Methods registered with SDK decorators (e.g., _list_tools_mcp, _call_tool_mcp)
|
|
cannot use `self: FastMCP` type hints because the SDK's `get_type_hints()` fails
|
|
to resolve FastMCP at runtime (it's only available under TYPE_CHECKING). When
|
|
type hints fail to resolve, the SDK falls back to calling handlers with no arguments.
|
|
These methods use untyped `self` to avoid this issue.
|
|
|