nat.plugins.mcp.server.front_end_plugin#

Attributes#

Classes#

MCPFrontEndPlugin

MCP front end plugin implementation.

Module Contents#

logger#
class MCPFrontEndPlugin(full_config: nat.data_models.config.Config)#

Bases: nat.builder.front_end.FrontEndBase[nat.plugins.mcp.server.front_end_config.MCPFrontEndConfig]

MCP front end plugin implementation.

Initializes the FrontEndBase object with the specified NAT configuration.

Parameters#

full_configConfig

The configuration object to use for the front end.

get_worker_class() type[nat.plugins.mcp.server.front_end_plugin_worker.MCPFrontEndPluginWorkerBase]#

Get the worker class for handling MCP 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 MCP server.

async _run_with_mount(mcp: mcp.server.fastmcp.FastMCP) None#

Run MCP server mounted at configured base_path using FastAPI wrapper.

Args:

mcp: The FastMCP server instance to mount