nat.plugins.fastmcp.server.front_end_plugin#

FastMCP front end plugin implementation.

Attributes#

Classes#

FastMCPFrontEndPlugin

FastMCP front end plugin implementation.

Module Contents#

logger#
class FastMCPFrontEndPlugin#

Bases: nat.builder.front_end.FrontEndBase[nat.plugins.fastmcp.server.front_end_config.FastMCPFrontEndConfig]

FastMCP front end plugin implementation.

get_worker_class() type[nat.plugins.fastmcp.server.front_end_plugin_worker.FastMCPFrontEndPluginWorkerBase]#

Get the worker class for handling FastMCP routes.

get_worker_class_name() str#

Get the worker class name from configuration or default.

_get_worker_instance()#

Get an instance of the worker class.

async run() None#

Run the FastMCP server.

async _run_with_mount(
mcp: fastmcp.FastMCP,
worker: nat.plugins.fastmcp.server.front_end_plugin_worker.FastMCPFrontEndPluginWorkerBase,
) None#

Run FastMCP server mounted at configured base_path using FastAPI wrapper.

Args:

mcp: The FastMCP server instance to mount. worker: The FastMCP worker instance.